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

SNOW-0000: [APPS-53008] SnowflakeFileTransferAgent avoid query history clutter and enable test mocks #2100

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

Conversation

sfc-gh-jchernandez
Copy link
Collaborator

@sfc-gh-jchernandez sfc-gh-jchernandez commented Feb 27, 2025

Overview

Addresses points A and B of APPS-53008

  • A. avoid query history clutter, we need to tag the underlying sql statements issued to GS to be tagged as internal
  • B. deep test SnowflakeTransferAgent functionality
    • we cannot easily mock the StorageClient which is static final initialized on the class
    • modifying the final qualifier is not safe and was deemed impractical, see PR, discarded test due to unsafe reflection

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.

Copy link

github-actions bot commented Feb 27, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sfc-gh-jchernandez sfc-gh-jchernandez changed the title SNOW-0000: [APPS-53008] SNOW-0000: [APPS-53008] SnowflakeFileTransferAgent avoid query history clutter and enable test mocks Feb 27, 2025
@sfc-gh-jchernandez
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

@sfc-gh-jchernandez sfc-gh-jchernandez marked this pull request as ready for review February 27, 2025 15:17
@sfc-gh-jchernandez sfc-gh-jchernandez requested a review from a team as a code owner February 27, 2025 15:17
@sfc-gh-jchernandez
Copy link
Collaborator Author

@sfc-gh-pmotacki special consideration was taken to leave the public untouched

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.

1 participant