Skip to content

SNOW-2032706: Implement AWS SDK strategy for GCS #2228

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sfc-gh-anbauer
Copy link
Collaborator

@sfc-gh-anbauer sfc-gh-anbauer commented Jun 25, 2025

Overview

SNOW-2032706
Implement strategy to access GCS bucket via XML api and virtual style URLs on SPCS using AWS SDK.

Pre-review self checklist

  • PR branch is updated with all the changes from master branch
  • The code is correctly formatted (run mvn -P check-style validate)
  • New public API is not unnecessary exposed (run mvn verify and inspect target/japicmp/japicmp.html)
  • The pull request name is prefixed with SNOW-XXXX:
  • Code is in compliance with internal logging requirements

External contributors - please answer these questions before submitting a pull request. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Issue: #NNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency or upgrading an existing one
    • I am adding new public/protected component not marked with @SnowflakeJdbcInternalApi (note that public/protected methods/fields in classes marked with this annotation are already internal)
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

@sfc-gh-anbauer sfc-gh-anbauer requested a review from a team as a code owner June 25, 2025 08:27
@sfc-gh-anbauer sfc-gh-anbauer changed the title SNOW-2032706 Implement AWS SDK strategy for GCS SNOW-2032706: Implement AWS SDK strategy for GCS Jun 25, 2025
@sfc-gh-anbauer sfc-gh-anbauer force-pushed the anbauer-SNOW-2032706-jdbc-driver-support-xml-api-2 branch from ca55888 to 862b01a Compare June 25, 2025 08:40
Comment on lines +86 to +103
} else {
logger.debug("no credentials provided, configuring bucket client without credentials");
amazonS3Builder.withCredentials(
new AWSStaticCredentialsProvider(new BasicAWSCredentials("", "")));
}

Choose a reason for hiding this comment

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

I don't think this code branch can ever succeed. Can we throw an exception instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was implemented for the GCS part. Not sure how to trigger it

Choose a reason for hiding this comment

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

It used to be possible to have signed URLs in ~2022, but this case should not happen now. This should really never happen. I would rather remove the check altogether with the assumption that the token is always present, instead of this fallback to the empty string.

@sfc-gh-anbauer sfc-gh-anbauer force-pushed the anbauer-SNOW-2032706-jdbc-driver-support-xml-api-2 branch from 862b01a to b06f65a Compare June 30, 2025 12:34
@sfc-gh-anbauer sfc-gh-anbauer force-pushed the anbauer-SNOW-2032706-jdbc-driver-support-xml-api-2 branch from b06f65a to a64035d Compare July 1, 2025 11:23
@sfc-gh-pbulawa
Copy link
Collaborator

Can you add tests for the new class please?

@sfc-gh-anbauer sfc-gh-anbauer force-pushed the anbauer-SNOW-2032706-jdbc-driver-support-xml-api-2 branch from c06b030 to 33f17e6 Compare July 4, 2025 09:47
Copy link
Collaborator

@sfc-gh-pbulawa sfc-gh-pbulawa left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

4 participants