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

DAT tearDown should cleanup *all* schemas used #29312

Merged
merged 9 commits into from
Aug 11, 2023
Merged

Conversation

evantahler
Copy link
Contributor

@evantahler evantahler commented Aug 9, 2023

This PR investigates why we have so many test schemas lingering in our databases. It looks like we create a few extra schemas in DAT so we can test writing to other namespaces. However, the test doesn't clean up after itself. To address this, we:

  1. Store all the schemas DAT uses in a new TEST_SCHEMAS
  2. change the method signature of DestinationAcceptanceTest.tearDown to now also pass TEST_SCHEMAS to implementors. DBs with persistent servers (Snowflake, BigQuery, Redshift) can now choose to delete all these schemas on teardown.

Note: this is still brittle to the test suite crashing (we won't cleanup) but should be a lot cleaner than what we are doing now, which is nothing.

Reviewers:
Start with DestinationAcceptanceTest.java and then check out the teardown changes in RedshiftStagingS3DestinationAcceptanceTest.java and SnowflakeInsertDestinationAcceptanceTest.java. BigQuery DB tests seem ok because we create and then destroy a whole dataset each time, and all other changes are just the method signature.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@octavia-squidington-iii
Copy link
Collaborator

destination-kafka test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 10mn01s

Step Result
Validate airbyte-integrations/connectors/destination-kafka/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-kafka docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-kafka:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-kafka test

@octavia-squidington-iii
Copy link
Collaborator

destination-keen test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 10mn08s

Step Result
Validate airbyte-integrations/connectors/destination-keen/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-keen docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-keen:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-keen test

@octavia-squidington-iii
Copy link
Collaborator

destination-tidb test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 17mn25s

Step Result
Validate airbyte-integrations/connectors/destination-tidb/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-tidb docker image for platform linux/x86_64
Build airbyte/normalization-tidb:dev
./gradlew :airbyte-integrations:connectors:destination-tidb:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-tidb test

@octavia-squidington-iii
Copy link
Collaborator

destination-redpanda test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 05mn02s

Step Result
Validate airbyte-integrations/connectors/destination-redpanda/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-redpanda docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-redpanda:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-redpanda test

@octavia-squidington-iii
Copy link
Collaborator

destination-gcs test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 10mn25s

Step Result
Validate airbyte-integrations/connectors/destination-gcs/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-gcs docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-gcs:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-gcs test

@octavia-squidington-iii
Copy link
Collaborator

destination-snowflake test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 45mn53s

Step Result
Validate airbyte-integrations/connectors/destination-snowflake/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-snowflake docker image for platform linux/x86_64
Build airbyte/normalization-snowflake:dev
./gradlew :airbyte-integrations:connectors:destination-snowflake:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-snowflake test

@octavia-squidington-iii
Copy link
Collaborator

destination-doris test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 04mn02s

Step Result
Validate airbyte-integrations/connectors/destination-doris/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-doris docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-doris:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-doris test

@octavia-squidington-iii
Copy link
Collaborator

destination-postgres-strict-encrypt test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 14mn05s

Step Result
Validate airbyte-integrations/connectors/destination-postgres-strict-encrypt/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-postgres-strict-encrypt docker image for platform linux/x86_64
Build airbyte/normalization:dev
./gradlew :airbyte-integrations:connectors:destination-postgres-strict-encrypt:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-postgres-strict-encrypt test

@octavia-squidington-iii
Copy link
Collaborator

destination-oracle test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 303mn41s

Step Result
Validate airbyte-integrations/connectors/destination-oracle/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-oracle docker image for platform linux/x86_64
Build airbyte/normalization-oracle:dev
./gradlew :airbyte-integrations:connectors:destination-oracle:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-oracle test

@octavia-squidington-iii
Copy link
Collaborator

destination-kinesis test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 10mn33s

Step Result
Validate airbyte-integrations/connectors/destination-kinesis/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-kinesis docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-kinesis:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-kinesis test

@octavia-squidington-iii
Copy link
Collaborator

destination-databricks test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 50mn32s

Step Result
Validate airbyte-integrations/connectors/destination-databricks/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-databricks docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-databricks:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-databricks test

@octavia-squidington-iii
Copy link
Collaborator

destination-mongodb-strict-encrypt test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 05mn52s

Step Result
Validate airbyte-integrations/connectors/destination-mongodb-strict-encrypt/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-mongodb-strict-encrypt docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-mongodb-strict-encrypt:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-mongodb-strict-encrypt test

@octavia-squidington-iii
Copy link
Collaborator

destination-bigquery test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 33mn40s

Step Result
Validate airbyte-integrations/connectors/destination-bigquery/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-bigquery docker image for platform linux/x86_64
Build airbyte/normalization:dev
./gradlew :airbyte-integrations:connectors:destination-bigquery:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-bigquery test

@octavia-squidington-iii
Copy link
Collaborator

destination-teradata test report (commit 1d9f2c4327) - ✅

⏲️ Total pipeline duration: 14mn53s

Step Result
Validate airbyte-integrations/connectors/destination-teradata/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-teradata docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-teradata:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-teradata test

@octavia-squidington-iii
Copy link
Collaborator

destination-e2e-test test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 05mn23s

Step Result
Validate airbyte-integrations/connectors/destination-e2e-test/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-e2e-test docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-e2e-test:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-e2e-test test

@octavia-squidington-iii
Copy link
Collaborator

destination-mssql-strict-encrypt test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 26mn33s

Step Result
Validate airbyte-integrations/connectors/destination-mssql-strict-encrypt/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-mssql-strict-encrypt docker image for platform linux/x86_64
Build airbyte/normalization-mssql:dev
./gradlew :airbyte-integrations:connectors:destination-mssql-strict-encrypt:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-mssql-strict-encrypt test

@octavia-squidington-iii
Copy link
Collaborator

destination-oracle-strict-encrypt test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 33mn16s

Step Result
Validate airbyte-integrations/connectors/destination-oracle-strict-encrypt/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-oracle-strict-encrypt docker image for platform linux/x86_64
Build airbyte/normalization-oracle:dev
./gradlew :airbyte-integrations:connectors:destination-oracle-strict-encrypt:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-oracle-strict-encrypt test

@octavia-squidington-iii
Copy link
Collaborator

destination-redshift test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 53mn22s

Step Result
Validate airbyte-integrations/connectors/destination-redshift/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-redshift docker image for platform linux/x86_64
Build airbyte/normalization-redshift:dev
./gradlew :airbyte-integrations:connectors:destination-redshift:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-redshift test

@octavia-squidington-iii
Copy link
Collaborator

destination-starburst-galaxy test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 23mn49s

Step Result
Validate airbyte-integrations/connectors/destination-starburst-galaxy/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-starburst-galaxy docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-starburst-galaxy:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-starburst-galaxy test

@octavia-squidington-iii
Copy link
Collaborator

destination-mssql test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 303mn56s

Step Result
Validate airbyte-integrations/connectors/destination-mssql/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-mssql docker image for platform linux/x86_64
Build airbyte/normalization-mssql:dev
./gradlew :airbyte-integrations:connectors:destination-mssql:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-mssql test

@octavia-squidington-iii
Copy link
Collaborator

destination-rockset test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 08mn50s

Step Result
Validate airbyte-integrations/connectors/destination-rockset/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-rockset docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-rockset:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-rockset test

@octavia-squidington-iii
Copy link
Collaborator

destination-scylla test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 06mn21s

Step Result
Validate airbyte-integrations/connectors/destination-scylla/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-scylla docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-scylla:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-scylla test

@evantahler
Copy link
Contributor Author

There are too many connectors to test here. I'm merging this because:

  • BQ is OK
  • Snowflake has one (real) test failure, and it is a permission error
  • Redshift has one (real) test failure, and it is a timeout

@evantahler evantahler merged commit 9f515a8 into master Aug 11, 2023
@evantahler evantahler deleted the evan/test-cleanup branch August 11, 2023 18:40
@octavia-squidington-iii
Copy link
Collaborator

destination-mariadb-columnstore test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 92mn16s

Step Result
Validate airbyte-integrations/connectors/destination-mariadb-columnstore/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-mariadb-columnstore docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-mariadb-columnstore:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-mariadb-columnstore test

@octavia-squidington-iii
Copy link
Collaborator

destination-iceberg test report (commit 1d9f2c4327) - ❌

⏲️ Total pipeline duration: 04mn56s

Step Result
Validate airbyte-integrations/connectors/destination-iceberg/metadata.yaml
Connector version semver check
QA checks
Build connector tar
Build destination-iceberg docker image for platform linux/x86_64
./gradlew :airbyte-integrations:connectors:destination-iceberg:integrationTest

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=destination-iceberg test

harrytou pushed a commit to KYVENetwork/airbyte that referenced this pull request Sep 1, 2023
* DAT `tearDown` should cleanup *all* schemas used

* redshift too

* push all method signature changes

* Automated Commit - Format and Process Resources Changes

* use hashset

* TEST_SCHEMAS on setup as well

* fix call

* Automated Commit - Format and Process Resources Changes

---------

Co-authored-by: evantahler <evantahler@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues connectors/destination/azure-blob-storage connectors/destination/bigquery connectors/destination/bigquery-denormalized connectors/destination/cassandra connectors/destination/clickhouse connectors/destination/clickhouse-strict-encrypt connectors/destination/csv connectors/destination/databricks connectors/destination/dev-null connectors/destination/doris connectors/destination/dynamodb connectors/destination/e2e-test connectors/destination/elasticsearch connectors/destination/elasticsearch-strict-encryp connectors/destination/exasol connectors/destination/gcs connectors/destination/iceberg connectors/destination/kafka connectors/destination/keen connectors/destination/kinesis connectors/destination/local-json connectors/destination/mariadb-columnstore connectors/destination/mongodb connectors/destination/mongodb-strict-encrypt connectors/destination/mqtt connectors/destination/mssql connectors/destination/mssql-strict-encrypt connectors/destination/mysql connectors/destination/mysql-strict-encrypt connectors/destination/oracle connectors/destination/oracle-strict-encrypt connectors/destination/postgres connectors/destination/postgres-strict-encrypt connectors/destination/pubsub connectors/destination/pulsar connectors/destination/redis connectors/destination/redpanda connectors/destination/redshift connectors/destination/rockset connectors/destination/s3-glue connectors/destination/scylla connectors/destination/selectdb connectors/destination/snowflake connectors/destination/starburst-galaxy connectors/destination/teradata connectors/destination/tidb connectors/destination/vertica connectors/destination/yugabytedb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants