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-1346547: add check for session expiry when getting query result #1160

Merged
merged 9 commits into from
Jun 26, 2024

Conversation

sfc-gh-ext-simba-jl
Copy link
Collaborator

@sfc-gh-ext-simba-jl sfc-gh-ext-simba-jl commented Jun 18, 2024

Description

drivers issue 957: https://github.com/snowflakedb/snowflake-sdks-drivers-issues-teamwork/issues/957

The root cause is that the heartbeat process has renewed the session token here but the new token in the get query result request's header was not updated in getQueryResultWithRetriesForAsyncMode().

This PR adds a check for session expiry in getQueryResultWithRetriesForAsyncMode() and update the token in the header if needed. Similar to ODBC's implementation here, where there should be a check for the session expired code 390112 during the getting query result request and allows a retry after updating the session token.

Checklist

  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes missing coverage. Please review.

Project coverage is 71.63%. Comparing base (24ae28b) to head (2b6b0bb).
Report is 1 commits behind head on master.

Files Patch % Lines
async.go 88.46% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1160      +/-   ##
==========================================
+ Coverage   71.60%   71.63%   +0.03%     
==========================================
  Files          54       54              
  Lines       12092    12117      +25     
==========================================
+ Hits         8658     8680      +22     
- Misses       3434     3437       +3     

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

@sfc-gh-ext-simba-jl sfc-gh-ext-simba-jl marked this pull request as ready for review June 19, 2024 00:24
@sfc-gh-ext-simba-jl sfc-gh-ext-simba-jl requested a review from a team as a code owner June 19, 2024 00:24
connection_test.go Outdated Show resolved Hide resolved
connection_test.go Show resolved Hide resolved
async.go Outdated Show resolved Hide resolved
async.go Show resolved Hide resolved
async.go Show resolved Hide resolved
connection_test.go Show resolved Hide resolved
@sfc-gh-ext-simba-jl sfc-gh-ext-simba-jl merged commit 7ec87ef into master Jun 26, 2024
38 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2024
@sfc-gh-ext-simba-jl sfc-gh-ext-simba-jl deleted the 957-session-expire-after-1-hr branch June 26, 2024 21:19
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.

None yet

2 participants