-
Notifications
You must be signed in to change notification settings - Fork 4.5k
🐛 Destination Redshift: Fix DATs blind spot - connection check #13090
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
🐛 Destination Redshift: Fix DATs blind spot - connection check #13090
Conversation
…um. Code refactoring and clean-up.
…um. Code refactoring and clean-up.
/test connector=connectors/destination-redshift
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the goal of the ticket was more focused on understanding why DestinationAcceptanceTest#testCheckConnection
didn't fail. Were you able to checkout a broken version and investigate that? (the issue says 6ef2f80 was the latest broken version)
@edgao Also, I think maybe it is somehow related to connection version bumping and the difference in the connector's specification (before the issue the version was |
…tion_check # Conflicts: # docs/integrations/destinations/redshift.md
…pot_connection_check' into otsukanov/12459_Fix_DATs_blind_spot_connection_check # Conflicts: # docs/integrations/destinations/redshift.md
/publish connector=connectors/destination-redshift
|
/publish connector=connectors/destination-redshift
|
/publish connector=connectors/destination-redshift
|
this was my bad, the issue had the wrong commit hash. I think |
@edgao I have switched to the commit, looks like the problem was here: Line 60 in ae8c4f2
and here: Lines 76 to 79 in ae8c4f2
As Destination Redshift operated RedshiftCopyS3Destination.java before, for S3 Staging processing - the reasonable exception was thrown. Also, I have tried The issue we faced. |
@edgao found why this doesn't work on CI. The problem in GCM, the file SECRET_DESTINATION-REDSHIFT__CREDS doesn't contain info about the bucket that's why S3 flow never triggers. 🙂 Here is the log https://github.com/airbytehq/airbyte/runs/6621069306?check_suite_focus=true#step:11:8804 Lines 52 to 72 in ae8c4f2
|
Updated secrets. Can now switch my job to the detective I think. 😁 |
nice catch! thanks for looking into it 👍 |
…tehq#13090) * airbyte-12459: Removed RedshiftDataTmpTableMode.java as not needed enum. Code refactoring and clean-up. * airbyte-12459: Removed RedshiftDataTmpTableMode.java as not needed enum. Code refactoring and clean-up. * airbyte-12459: Merged master. * airbyte-12459: Merged master. * auto-bump connector version Co-authored-by: Oleksandr Sheheda <[email protected]> Co-authored-by: Octavia Squidington III <[email protected]>
What
Investigating the issue I was able to find that problem appears due to
redshiftDataTmpTableMode
which was passed into RedshiftCopyS3Destination.java (Deprecated class) and subsequently fixed in the next PR:https://github.com/airbytehq/airbyte/pull/12002/files
Looks like
getSqlOperations()
was called in some parent class (abstract class) and this was the root cause of the issue.Currently, the CopyConsumerFactory approach was replaced with
StagingOperations
, and Redshift no longer uses CopyConsumerFactory.(PR https://github.com/airbytehq/airbyte/pull/12601/files#diff-d6c1570221cad1a2b3eeb081801329eb)
How
Locally, I was not able to reproduce the issue with the latest Dest. redshift version. The only thing I have done is remove
redshiftDataTmpTableMode
as we don't need it anymore. The main purpose of mentioned ENUM was to support multipleDATA TMP table types (e.g. VARCHAR and SUPER) - this is not required, as we have only SUPER now. Let's follow the KISS principle.
Also, I found that we have the next integration tests:
Both are the child of
DestinationAcceptanceTest
which containstestCheckConnection()
method to verify whether the connection with the DB source was established successfully. ("Test connection button" on UI)Recommended reading order
x.java
Pre-merge Checklist
Expand the relevant checklist and delete the others.
New Connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/SUMMARY.md
docs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampledocs/integrations/README.md
airbyte-integrations/builds.md
Airbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereUpdating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing/publish
command described hereConnector Generator
-scaffold
in their name) have been updated with the latest scaffold by running./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates
then checking in your changesTests
Unit
Put your unit tests output here.
Integration
Put your integration tests output here.
Acceptance
Put your acceptance tests output here.