Skip to content

🐛Destination-Snowflake: updated check method to handle more errors - #18970

Merged
Eugene (etsybaev) merged 16 commits into
masterfrom
etsybaev/16833-destination-snowflake-add-fix-to-check-method
Nov 9, 2022
Merged

Eugene (etsybaev) merged 16 commits into
masterfrom
etsybaev/16833-destination-snowflake-add-fix-to-check-method

Conversation

@etsybaev

@etsybaev Eugene (etsybaev) commented Nov 4, 2022 •

Copy link
Copy Markdown
Contributor

What

Closes #16833

We have 2 known errors that may occur during Sync stage, but the Check method doesn't handle it.

How

Updated check method to handle at least 2 more errors:

Created a follow-up ticket https://app.zenhub.com/workspaces/destinations-6332532d6893ce001c7a56a7/issues/airbytehq/airbyte/19113

Tested locally:
Selection_048
Selection_049

Tested with valid creds, still can connect:
Selection_050

Recommended reading order

  1. AbstractJdbcDestination.java
  2. SnowflakeInsertDestinationAcceptanceTest.java
  3. Other classes

🚨 User Impact 🚨

No user impact expected for existing users

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/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
  • If new credentials are required for use in CI, add them to GSM. 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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command 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

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@github-actions

github-actions Bot commented Nov 4, 2022 •

Copy link
Copy Markdown
Contributor

Affected Connector Report

NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:

  • Run integration tests
  • Bump connector version
  • Add changelog
  • Publish the new version

✅ Sources (0)

Connector Version Changelog Publish
  • See "Actionable Items" below for how to resolve warnings and errors.

❌ Destinations (20)

Connector Version Changelog Publish
destination-azure-blob-storage 0.1.6 ⚠
(doc not found)
✅
destination-clickhouse 0.2.0 ✅ ✅
destination-clickhouse-strict-encrypt 0.2.0 ✅ ⚠
(not in seed)
destination-databricks 0.3.1 ✅ ✅
destination-dynamodb 0.1.7 ✅ ✅
destination-gcs 0.2.12 ✅ ✅
destination-mariadb-columnstore 0.1.7 ✅ ✅
destination-mssql 0.1.22 ✅ ✅
destination-mssql-strict-encrypt 0.1.22 ✅ ⚠
(not in seed)
destination-mysql 0.1.20 ✅ ✅
destination-mysql-strict-encrypt ❌ 0.1.21
(mismatch: 0.1.20)
✅ ⚠
(not in seed)
destination-oracle 0.1.19 ✅ ✅
destination-oracle-strict-encrypt 0.1.19 ✅ ⚠
(not in seed)
destination-postgres 0.3.26 ✅ ✅
destination-postgres-strict-encrypt 0.3.26 ✅ ⚠
(not in seed)
destination-redshift 0.3.51 ✅ ✅
destination-rockset 0.1.4 ❌
(changelog missing)
✅
destination-snowflake 0.4.39 ✅ ✅
destination-tidb 0.1.0 ✅ ✅
destination-yugabytedb 0.1.0 ✅ ✅
  • See "Actionable Items" below for how to resolve warnings and errors.

Actionable Items

(click to expand)

Category Status Actionable Item
Version ❌
mismatch
The version of the connector is different from its normal variant. Please bump the version of the connector.
⚠
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
Changelog ⚠
doc not found
The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like source-jdbc is not published or documented). Please double-check to make sure that it is not a bug.
❌
changelog missing
There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog.
Publish ⚠
not in seed
The connector is not in the seed file (e.g. source_definitions.yaml), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug.
❌
diff seed version
The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the /publish command to publish the latest version.

@etsybaev

Copy link
Copy Markdown
Contributor Author

#18962 - same tests also failed on master #18962

@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 4, 2022 16:06 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 4, 2022 20:48 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 5, 2022 16:00 Inactive
@etsybaev Eugene (etsybaev) changed the title [16833] Destination-Snowflake: updated check method to handle "No Act… [16833] Destination-Snowflake: updated check method to handle more errors Nov 7, 2022
@etsybaev
Eugene (etsybaev) marked this pull request as ready for review November 7, 2022 14:46
@etsybaev
Eugene (etsybaev) requested a review from a team as a code owner November 7, 2022 14:46
@etsybaev Eugene (etsybaev) changed the title [16833] Destination-Snowflake: updated check method to handle more errors 🐛Destination-Snowflake: updated check method to handle more errors Nov 7, 2022
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 7, 2022 17:47 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 7, 2022 19:18 Inactive
@etsybaev

Eugene (etsybaev) commented Nov 7, 2022 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3413368226
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3413368226
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 14      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    14      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     166      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         189     48    75%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 595    400    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1441    629    56%

Build Passed

Test summary info:

All Passed

@ryankfu Ryan Fu (ryankfu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update javadoc comments then should be good

@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 8, 2022 20:13 Inactive

@ryankfu Ryan Fu (ryankfu) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, let's also link the ticket for updating attemptSQLCreateAndDropTableOperations but otherwise looks good

@etsybaev

Eugene (etsybaev) commented Nov 8, 2022 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3422957410
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3422957410
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 14      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    14      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     166      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         189     48    75%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 595    400    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1441    629    56%

Build Passed

Test summary info:

All Passed

@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 8, 2022 20:31 Inactive
@grishick Greg Solovyev (grishick) added the team/destinations Destinations team's backlog label Nov 8, 2022
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 9, 2022 11:29 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 9, 2022 12:04 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 9, 2022 15:33 Inactive
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 9, 2022 17:40 Inactive
@etsybaev

Eugene (etsybaev) commented Nov 9, 2022 •

Copy link
Copy Markdown
Contributor Author

/test connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3430473655
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/3430473655
Python tests coverage:

Name                                                              Stmts   Miss  Cover
-------------------------------------------------------------------------------------
normalization/transform_config/__init__.py                            2      0   100%
normalization/transform_catalog/reserved_keywords.py                 14      0   100%
normalization/transform_catalog/__init__.py                           2      0   100%
normalization/destination_type.py                                    14      0   100%
normalization/__init__.py                                             4      0   100%
normalization/transform_catalog/destination_name_transformer.py     166      8    95%
normalization/transform_catalog/table_name_registry.py              174     34    80%
normalization/transform_config/transform.py                         189     48    75%
normalization/transform_catalog/utils.py                             51     14    73%
normalization/transform_catalog/dbt_macro.py                         22      7    68%
normalization/transform_catalog/catalog_processor.py                147     80    46%
normalization/transform_catalog/transform.py                         61     38    38%
normalization/transform_catalog/stream_processor.py                 595    400    33%
-------------------------------------------------------------------------------------
TOTAL                                                              1441    629    56%

Build Passed

Test summary info:

All Passed

@github-actions github-actions Bot added the area/documentation Improvements or additions to documentation label Nov 9, 2022
@etsybaev
Eugene (etsybaev) temporarily deployed to more-secrets November 9, 2022 19:06 Inactive
@etsybaev

Eugene (etsybaev) commented Nov 9, 2022 •

Copy link
Copy Markdown
Contributor Author

/publish connector=connectors/destination-snowflake

🕑 Publishing the following connectors:
connectors/destination-snowflake
https://github.com/airbytehq/airbyte/actions/runs/3431074615


Connector Did it publish? Were definitions generated?
connectors/destination-snowflake ✅ ✅

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

@etsybaev
Eugene (etsybaev) merged commit 089c405 into master Nov 9, 2022
@etsybaev
Eugene (etsybaev) deleted the etsybaev/16833-destination-snowflake-add-fix-to-check-method branch November 9, 2022 20:24
@octavia-squidington-iii
Octavia Squidington III (octavia-squidington-iii) temporarily deployed to more-secrets November 9, 2022 20:24 Inactive
Akash Kulkarni (akashkulk) pushed a commit that referenced this pull request Dec 2, 2022
…18970)

* [16833] Destination-Snowflake: updated check method to handle "No Active Warehouse" error or user has incorrect permissions

This branch was previously deployed

1 inactive deployment
more-secrets — e67dee08 Deployed Nov 9, 2022 by octavia-squidington-iii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/destination/jdbc connectors/destination/snowflake team/destinations Destinations team's backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate why permission problems are not caught in CHECK method Fail check when user has incorrect permission to target Snowflake warehouse

6 participants