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

Enable full SAT for the Redshift source #19915

Merged
merged 10 commits into from
Dec 8, 2022

Conversation

DoNotPanicUA
Copy link
Contributor

@DoNotPanicUA DoNotPanicUA commented Nov 30, 2022

What

Enable SAT for the Redshift source

Configured test instances

  • sat_test_dataset

Found issues

SAT related issues:

  • in case of default value for the configured_catalog_path, the SAT doesn't take the file by default, but sync all available streams from the source.

@DoNotPanicUA DoNotPanicUA changed the title Aleonets/19895 sat redshift Enable full SAT for the Redshift source Nov 30, 2022
@DoNotPanicUA DoNotPanicUA linked an issue Nov 30, 2022 that may be closed by this pull request
@DoNotPanicUA

This comment was marked as outdated.

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Nov 30, 2022

✔️ SAT passed. The master branch contains issues in the Status report.

/test connector=connectors/source-redshift

🕑 connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3585021128
❌ connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3585021128
🐛

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:26: `future_state` not specified, skipping.
============ 29 passed, 1 skipped, 31 warnings in 396.11s (0:06:36) ============

@DoNotPanicUA DoNotPanicUA marked this pull request as ready for review November 30, 2022 17:31
@DoNotPanicUA DoNotPanicUA requested a review from a team as a code owner November 30, 2022 17:31
@DoNotPanicUA DoNotPanicUA requested review from evantahler and a team November 30, 2022 17:31
Copy link
Contributor

@evantahler evantahler left a comment

Choose a reason for hiding this comment

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

👍

Similar question to BQ - should we document the test instance's details in some way

@@ -4,4 +4,26 @@ connector_image: airbyte/source-redshift:dev
tests:
spec:
- spec_path: "src/test-integration/resources/expected_spec.json"
timeout_seconds: "1200"
Copy link
Contributor

Choose a reason for hiding this comment

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

lol, redshift.

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Dec 2, 2022

/test connector=connectors/source-redshift

🕑 connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3603527916
✅ connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3603527916
Python tests coverage:

	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       140      5    96%   87, 93, 238, 242-243
	 source_acceptance_test/conftest.py                     199     93    53%   35, 41-43, 48, 53, 59, 65, 71, 77-79, 98, 103-105, 111-113, 119-120, 125-126, 131, 137, 146-155, 161-166, 181, 205, 236, 242, 250-255, 263-268, 276-289, 294-300, 307-318, 325-341
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              398    111    72%   53, 58, 87-95, 100-107, 111-112, 116-117, 299, 337-354, 363-371, 375-380, 386, 419-424, 462-469, 512-514, 517, 582-590, 602-605, 610, 666-667, 673, 676, 712-722, 735-760
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       112     50    55%   23-26, 32, 36, 39-68, 71-73, 76-78, 81-83, 86-88, 91-93, 96-114, 148-150
	 source_acceptance_test/utils/json_schema_helper.py     107     13    88%   30-31, 38, 41, 65-68, 96, 120, 192-194
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1569    350    78%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:26: `future_state` not specified, skipping.
============ 29 passed, 1 skipped, 31 warnings in 200.30s (0:03:20) ============

@DoNotPanicUA
Copy link
Contributor Author

+1

Similar question to BQ - should we document the test instance's details in some way

the doc.

@alafanechere
Copy link
Contributor

+1
Similar question to BQ - should we document the test instance's details in some way

the doc.

I think we shall create connector-specific docs for better visibility for our community. I would suggest adding a README under integration-tests + a source specific script

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Dec 7, 2022

/test connector=connectors/source-redshift

🕑 connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3639930982
❌ connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3639930982
🐛

Comment on lines +2 to +3
You can find the SQL scripts in this folder if you need to create or fix the SAT dataset.
For more instructions and information about valid scripts, please check this [doc](https://docs.google.com/document/d/1k5TvxaNhKdr44aJIHWWtLk14Tzd2gbNX-J8YNoTj8u0/edit#heading=h.ls9oiedt9wyy).
Copy link
Contributor

@alafanechere alafanechere Dec 7, 2022

Choose a reason for hiding this comment

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

I don't think we should link a Google Doc here, it's not or usual approach to documentation and can break accessibility.

Moreover I would suggest you add the following to the README:

  • Share the requirements in terms of Redshift setup to run the tests on it.
  • Explain the role of each SQL script.
  • Explain technically how to seed the DB.

I think these instructions will differ for each source, so I'm not in favor of a central document. If there are common instructions that can be useful for all database sources, feel free to edit https://github.com/airbytehq/airbyte/blob/master/docs/connector-development/testing-connectors/source-acceptance-tests-reference.md#L1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the point, all instructions are the same. The difference is only in the credentials required for the connection and the SQL syntax. It's common for any SQL source.
@evantahler created the doc and said to put all related instructions there.

P.S. If we have a new demand to improve or rework something, it's better to create a new issue and discuss it at the planning meeting with the whole team. No need to hold the integration tests for the source as a hostage of this discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm being asked to be a tie-breaker, in the spirt of "done is better than perfect", I think the google doc is OK for now. We can move the contents into the public repo once we are done with all the Java sources, and we can see how similar/different the instructions will be. Also, the doc currently links to secrets, which is helpful, and shouldn't be in this repo.

@alafanechere
Copy link
Contributor

alafanechere commented Dec 7, 2022

/test connector=connectors/source-redshift

🕑 connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3642819153
❌ connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3642819153
🐛 https://gradle.com/s/ekzst7wglpa7y

Build Failed

Test summary info:

Could not find result summary

Copy link
Contributor

@alafanechere alafanechere left a comment

Choose a reason for hiding this comment

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

I updated your branch to get the test working again. Feel free to merge once they pass.

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Dec 8, 2022

/test connector=connectors/source-redshift

🕑 connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3648031147
✅ connectors/source-redshift https://github.com/airbytehq/airbyte/actions/runs/3648031147
Python tests coverage:

	 Name                                                 Stmts   Miss  Cover   Missing
	 ----------------------------------------------------------------------------------
	 source_acceptance_test/base.py                          12      4    67%   16-19
	 source_acceptance_test/config.py                       140      5    96%   87, 93, 238, 242-243
	 source_acceptance_test/conftest.py                     208     92    56%   36, 42-44, 49, 54, 77, 83, 89-91, 110, 115-117, 123-125, 131-132, 137-138, 143, 149, 158-167, 173-178, 193, 217, 248, 254, 262-267, 275-280, 288-301, 306-312, 319-330, 337-353
	 source_acceptance_test/plugin.py                        69     25    64%   22-23, 31, 36, 120-140, 144-148
	 source_acceptance_test/tests/test_core.py              398    111    72%   53, 58, 87-95, 100-107, 111-112, 116-117, 299, 337-354, 363-371, 375-380, 386, 419-424, 462-469, 512-514, 517, 582-590, 602-605, 610, 666-667, 673, 676, 712-722, 735-760
	 source_acceptance_test/tests/test_incremental.py       158     14    91%   52-59, 64-77, 240
	 source_acceptance_test/utils/asserts.py                 39      2    95%   62-63
	 source_acceptance_test/utils/common.py                  94     10    89%   16-17, 32-38, 72, 75
	 source_acceptance_test/utils/compare.py                 62     23    63%   21-51, 68, 97-99
	 source_acceptance_test/utils/connector_runner.py       133     33    75%   24-27, 46-47, 50-54, 57-58, 73-75, 78-80, 83-85, 88-90, 93-95, 124-125, 159-161, 208
	 source_acceptance_test/utils/json_schema_helper.py     107     13    88%   30-31, 38, 41, 65-68, 96, 120, 192-194
	 ----------------------------------------------------------------------------------
	 TOTAL                                                 1599    332    79%

Build Passed

Test summary info:

=========================== short test summary info ============================
SKIPPED [1] ../usr/local/lib/python3.9/site-packages/source_acceptance_test/tests/test_incremental.py:26: `future_state` not specified, skipping.
================== 29 passed, 1 skipped in 384.72s (0:06:24) ===================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable SAT for hosted sources - Redshift
4 participants