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-950923 fix to provide QueryID for failures during GET/PUT file operations #825

Merged
merged 17 commits into from
Feb 21, 2024

Conversation

sfc-gh-mhofman
Copy link
Collaborator

@sfc-gh-mhofman sfc-gh-mhofman commented Nov 30, 2023

Description

QueryID is super helpful when solving issues but it was not reachable when PUT/GET operation got failed at the command/exception level.
It was not available for successful scenario for PUT/GET commands as well.
This change actually introduces a new type of exception prior to the one used previously - FileNotFoundException/DirectoryNotFoundException and this previous exception is now an inner exception of SnowflakeDbException which we had to use to provide QueryId.
In rare cases (for instance when a connection was not opened) request to PUT/GET file on stage might still end up with a base Exception since QueryId won't be created in such a case.

Checklist

  • Code compiles correctly
  • Code is formatted according to Coding Conventions
  • Created tests which fail without the change (if possible)
  • All tests passing (dotnet test)
  • Extended the README / documentation, if necessary
  • Provide JIRA issue id (if possible) or GitHub issue id in PR name

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (9d61e81) 84.35% compared to head (9297cff) 84.21%.

Files Patch % Lines
...lake.Data/Core/FileTransfer/SFFileTransferAgent.cs 60.46% 15 Missing and 2 partials ⚠️
Snowflake.Data/Core/SFStatement.cs 81.15% 9 Missing and 4 partials ⚠️
Snowflake.Data/Client/SnowflakeDbCommand.cs 25.00% 2 Missing and 1 partial ⚠️
Snowflake.Data/Core/SFBindUploader.cs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #825      +/-   ##
==========================================
- Coverage   84.35%   84.21%   -0.14%     
==========================================
  Files          88       88              
  Lines        9336     9387      +51     
  Branches      874      883       +9     
==========================================
+ Hits         7875     7905      +30     
- Misses       1235     1251      +16     
- Partials      226      231       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch from 52fcfaf to e280fba Compare January 15, 2024 09:54
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch from 84bd1fe to dbbb98a Compare January 17, 2024 15:24
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch from 6ffaffb to c232a6f Compare January 31, 2024 08:33
@sfc-gh-mhofman sfc-gh-mhofman requested a review from a team February 1, 2024 12:36
README.md Outdated Show resolved Hide resolved
Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs Outdated Show resolved Hide resolved
Snowflake.Data.Tests/IntegrationTests/SFPutGetTest.cs Outdated Show resolved Hide resolved
Snowflake.Data.Tests/UnitTests/SFFileTransferAgentTests.cs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch from 2e8efd1 to 8f394c8 Compare February 16, 2024 15:50
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch 2 times, most recently from 7c94eda to cf51ef3 Compare February 20, 2024 09:05
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch 3 times, most recently from 32cc219 to 92897e3 Compare February 21, 2024 13:13
@sfc-gh-mhofman sfc-gh-mhofman force-pushed the SNOW-950923-getqueryid-for-put-and-get branch from 92897e3 to 7ca5fe9 Compare February 21, 2024 13:31
@sfc-gh-mhofman sfc-gh-mhofman merged commit fd193e1 into master Feb 21, 2024
18 of 20 checks passed
@sfc-gh-mhofman sfc-gh-mhofman deleted the SNOW-950923-getqueryid-for-put-and-get branch February 21, 2024 16:47
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
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.

4 participants