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-761256 Fix finish_download in gcs_storage_client #1488

Merged
merged 3 commits into from
Mar 24, 2023
Merged

Conversation

sfc-gh-sfan
Copy link
Contributor

Description

After super().finish_download(), self.intermediate_dst_path has either been deleted or removed. We should use the dst file name instead.

Testing

Existing test. I'm curious to learn how to test as well

Please answer these questions before submitting your pull requests. Thanks!

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

    Fixes SNOW-761256

  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 adding a new telemetry message
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    After super().finish_download(), self.intermediate_dst_path has either been deleted or removed. We should use the dst file name instead.

Description

After super().finish_download(), self.intermediate_dst_path has
either been deleted or removed. We should use the dst file name
instead.

Testing

Existing test. I'm curious to learn how to test as well
@sfc-gh-sfan sfc-gh-sfan requested review from a team, sfc-gh-stan and sfc-gh-achandrasekaran and removed request for a team March 23, 2023 23:21
@sfc-gh-sfan
Copy link
Contributor Author

What's really interesting is that the file is still downloaded and we could return the correct GET result. Given this is running in multithreading and only on a child thread, this stacktrace is actually not brought up. I'm planning to use caplog to make check if there are exceptions, but let me know if there is a better way otherwise.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #1488 (27a00f2) into main (eda6206) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1488      +/-   ##
==========================================
- Coverage   81.95%   81.91%   -0.04%     
==========================================
  Files          61       61              
  Lines        8616     8616              
  Branches     1273     1273              
==========================================
- Hits         7061     7058       -3     
- Misses       1223     1225       +2     
- Partials      332      333       +1     
Impacted Files Coverage Δ
src/snowflake/connector/gcs_storage_client.py 78.16% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@sfc-gh-stan sfc-gh-stan left a comment

Choose a reason for hiding this comment

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

🚢 🚢

@sfc-gh-sfan sfc-gh-sfan merged commit 012cacd into main Mar 24, 2023
@sfc-gh-sfan sfc-gh-sfan deleted the shixuan_gcp branch March 24, 2023 20:05
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants