Skip to content

SAT: add test case to check supported_sync_modes field is not empty #14800

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

Merged
merged 2 commits into from
Jul 19, 2022

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Jul 18, 2022

What

Closing #13027
Pydantic is already validating that the list of supported_sync_modes contains only full_refresh or/and incremental but this field is not declared as required (it's a TODO).
Before attempting a protocol change, SAT can ensure this rule is enforced.
I don't think this will solve https://github.com/airbytehq/airbyte-internal-issues/issues/587 as the source-e2e-test is a java connector. @pedroslopez do you confirm I can't run SAT on a java source?

How

Add a test to check that all streams defined in a catalog have the supported_sync_modes field set to a nonempty list.

NB: I added some Pytest syntactic sugar to lighten the conditional raise in the unit test with the does_not_raise context.

🚨 User Impact 🚨

All connector builds that are not passing this new test will fail.

@alafanechere alafanechere marked this pull request as ready for review July 18, 2022 16:36
@alafanechere alafanechere requested a review from pedroslopez July 18, 2022 17:09
@alafanechere
Copy link
Contributor Author

alafanechere commented Jul 18, 2022

/test connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/2692228513
✅ bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/2692228513
No Python unittests run

Build Passed

Test summary info:

All Passed

@alafanechere alafanechere self-assigned this Jul 18, 2022
Copy link
Contributor

@pedroslopez pedroslopez left a comment

Choose a reason for hiding this comment

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

Nice job!

@pedroslopez do you confirm I can't run SAT on a java source?

SATs can be run against any source, regardless of the language it's implemented in or whether it uses our CDK or not. We should be able to run SAT on source-e2e-test, but it looks like we haven't yet moved the java connectors to use the new SAT (see issue #5176)

@alafanechere
Copy link
Contributor Author

alafanechere commented Jul 19, 2022

/publish connector=bases/source-acceptance-test auto-bump-version=false

🕑 Publishing the following connectors:
bases/source-acceptance-test
https://github.com/airbytehq/airbyte/actions/runs/2696226423


Connector Did it publish? Were definitions generated?
bases/source-acceptance-test

if you have connectors that successfully published but failed definition generation, follow step 4 here ▶️

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.

2 participants