Skip to content

🎉 Destination GCS: fix connection check #10299

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 6 commits into from
Feb 13, 2022
Merged

Conversation

tuliren
Copy link
Contributor

@tuliren tuliren commented Feb 12, 2022

What

  • Resolves Investigate GCS destination integration test failure #9631.
  • The check operation of the GCS destination uses native S3 TransferManager to test the multipart upload. However, in the sync operation, we use StreamTransferManager to do the job. It looks like the former requires two more permissions than the latter: multipartUpload.list and multipartUpload.listAll.
  • This PR fixes this issue by using the StreamTransferManager to test the multipart upload. In this way, the check reflects what actually happens in the sync. In this way, users do not need to grant the client unnecessary permissions just to pass the connection check.
  • The same check is applied to both S3 and GCS.

🚨 User Impact 🚨

  • None expected.

Pre-merge Checklist

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
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the new connector version is published, connector version bumped in the seed directory 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

@github-actions github-actions bot added the area/connectors Connector related issues label Feb 12, 2022
@tuliren tuliren temporarily deployed to more-secrets February 12, 2022 20:56 Inactive
@tuliren tuliren temporarily deployed to more-secrets February 12, 2022 20:56 Inactive
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Feb 12, 2022
@tuliren
Copy link
Contributor Author

tuliren commented Feb 12, 2022

/test connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1834837170
✅ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1834837170
No Python unittests run

@tuliren
Copy link
Contributor Author

tuliren commented Feb 12, 2022

/test connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1834837268
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1834837268
No Python unittests run

@tuliren tuliren requested review from etsybaev and edgao February 12, 2022 20:59
@tuliren tuliren marked this pull request as ready for review February 12, 2022 20:59
@tuliren tuliren temporarily deployed to more-secrets February 12, 2022 20:59 Inactive
@tuliren tuliren temporarily deployed to more-secrets February 12, 2022 20:59 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets February 12, 2022 21:00 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets February 12, 2022 21:00 Inactive
@tuliren
Copy link
Contributor Author

tuliren commented Feb 12, 2022

/publish connector=connectors/destination-s3

🕑 connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1834870216
❌ connectors/destination-s3 https://github.com/airbytehq/airbyte/actions/runs/1834870216

@tuliren
Copy link
Contributor Author

tuliren commented Feb 12, 2022

/publish connector=connectors/destination-gcs

🕑 connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1834870467
✅ connectors/destination-gcs https://github.com/airbytehq/airbyte/actions/runs/1834870467

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets February 12, 2022 21:14 Inactive
@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets February 12, 2022 21:14 Inactive
@tuliren
Copy link
Contributor Author

tuliren commented Feb 13, 2022

S3 version is bumped in #10256. I will revert its version bump here, and do it in a separate PR.

@tuliren tuliren temporarily deployed to more-secrets February 13, 2022 00:15 Inactive
@tuliren tuliren temporarily deployed to more-secrets February 13, 2022 00:15 Inactive
@tuliren tuliren merged commit 28916dc into master Feb 13, 2022
@tuliren tuliren deleted the liren/fix-gcs-check-command branch February 13, 2022 00:30
@@ -33,7 +41,15 @@ public static void main(final String[] args) throws Exception {
@Override
public AirbyteConnectionStatus check(final JsonNode config) {
try {
attemptS3WriteAndDelete(S3DestinationConfig.getS3DestinationConfig(config), config.get("s3_bucket_path").asText());
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just replace all usages of this method, or is it possible that the staging warehouse destinations do actually need those extra permissions? E.g.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would depend on the use case, i.e. how the warehouse uses the S3 or other staging bucket. Since there is no complaint from the community about any permission issue for those destinations, we have not looked into them yet.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate GCS destination integration test failure
3 participants