Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get default configured catalog from discover command #8232

Merged

Conversation

augan-rymkhan
Copy link
Contributor

@augan-rymkhan augan-rymkhan commented Nov 24, 2021

What

By default SAT should take configured catalog from discovery command and use the default configuration.

How

  1. if configured_catalog_path is not provided then generate ConfiguredAirbyteCatalog from discovered_catalog fixture (result of discover command) in configured_catalog_fixture.

  2. Remove default value from configured_catalog_path in config.py

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

Are there any breaking changes? If yes, please make sure to include it here and in any changelogs with the 🚨🚨 emoji
What is the end result perceived by the user?

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the new connector version is published, connector version bumped in the seed directory as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 24, 2021 14:09 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 25, 2021 05:41 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 25, 2021 07:43 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 25, 2021 09:10 Inactive
@augan-rymkhan augan-rymkhan self-assigned this Nov 25, 2021
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 25, 2021 11:20 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets November 26, 2021 09:24 Inactive
@augan-rymkhan augan-rymkhan temporarily deployed to more-secrets December 2, 2021 05:24 Inactive
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing i'm not sure about: do we currently require the developer to opt out explicitly of syncing some streams?

for example if there are streams A and B and the user provides a configured catalog containing only A, does the test fail? IMO it should unless the user explicitly configured an option saying that they are skipping the stream, as well as providing a reason

@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Dec 2, 2021

One thing i'm not sure about: do we currently require the developer to opt out explicitly of syncing some streams?

for example if there are streams A and B and the user provides a configured catalog containing only A, does the test fail? IMO it should unless the user explicitly configured an option saying that they are skipping the stream, as well as providing a reason

One thing i'm not sure about: do we currently require the developer to opt out explicitly of syncing some streams?

for example if there are streams A and B and the user provides a configured catalog containing only A, does the test fail? IMO it should unless the user explicitly configured an option saying that they are skipping the stream, as well as providing a reason

@sherifnada No, it will not fail, in that case.
The code change in this PR implements the following, If configured_catalog_path is not provided in acceptance-test-config.yaml then SAT takes configured catalog from discover command's result.

As I understand, your requirements are

  • All streams must be in the file specified by configured_catalog_path, to test all the existing streams?

  • If developer wants to skip tests for some streams, those streams must be marked explicitly as skipped with the reason

    Correct?

@sherifnada
Copy link
Contributor

sherifnada commented Dec 2, 2021

Correct. The idea is that this test should verify data is coming from all streams except if the developer explicitly opts out.

@augan-rymkhan
Copy link
Contributor Author

@sherifnada
Discussed it with the team on standup call.
I created a new ticket for that. If it's ok can we merge this PR?

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate issue for the comment is good w me 👍🏼

@augan-rymkhan
Copy link
Contributor Author

augan-rymkhan commented Dec 3, 2021

/publish connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1534569675
✅ bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1534569675

@jrhizor jrhizor temporarily deployed to more-secrets December 3, 2021 09:23 Inactive
@augan-rymkhan augan-rymkhan merged commit cfa6815 into master Dec 3, 2021
@augan-rymkhan augan-rymkhan deleted the arymkhan/default-configured-catalog-from-discovery branch December 3, 2021 09:32
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* Get default configured catalog from discover command

* remove default path in configured_catalog_path in config.py

* formatted code for conftest.py

* Changed version of SAT and update CHANGELOG.md

Co-authored-by: Auganbay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SAT: Configured catalog should be taken from discovery result by default
6 participants