Validate client session keep alive heartbeat frequency type fix#2839
Merged
sfc-gh-fpawlowski merged 4 commits intosnowflakedb:mainfrom Apr 9, 2026
Conversation
Contributor
|
@sfc-gh-fpawlowski can you please review? |
…_frequency_type_fix
Contributor
sfc-gh-fpawlowski
left a comment
There was a problem hiding this comment.
Looks good to me, left one small comment and started workflows. If they pass we can merge this PR 👍
| value = self.client_session_keep_alive_heartbeat_frequency | ||
|
|
||
| if self.client_session_keep_alive_heartbeat_frequency is None: | ||
| # This is an unlikely scenario but covering it just in case. |
Contributor
There was a problem hiding this comment.
nit: We may want to leave this comment for reference.
Added comment removed before
sfc-gh-fpawlowski
approved these changes
Apr 9, 2026
Contributor
sfc-gh-fpawlowski
left a comment
There was a problem hiding this comment.
Fixed comment, lgtm 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-3311068: _validate_client_session_keep_alive_heartbeat_frequency handles None incorrectly due to int() cast order #2837
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
This change fixes the validation order in
_validate_client_session_keep_alive_heartbeat_frequency(). The validator now handlesNonebefore attempting integer conversion, which restores the intended fallback behavior and avoids raisingTypeErrorwhenNoneis assigned through the Python setter path. It preserves conversion of non-Nonevalues such as"10"to integers and keeps the existing range clamping behavior.N/A