Skip to content

SNOW-2912540: use IS_V5_DRIVER for cursor request_id access - #4314

Open
sfc-gh-fpawlowski wants to merge 3 commits into
SNOW-2912540-secret-detector-importfrom
SNOW-2912540-request-id-compat
Open

SNOW-2912540: use IS_V5_DRIVER for cursor request_id access#4314
sfc-gh-fpawlowski wants to merge 3 commits into
SNOW-2912540-secret-detector-importfrom
SNOW-2912540-request-id-compat

Conversation

@sfc-gh-fpawlowski

@sfc-gh-fpawlowski sfc-gh-fpawlowski commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • The UD's SnowflakeCursor exposes the client-generated request UUID as a public request_id property; _request_id is only a backward-compat alias slated for removal.
  • The legacy v4 connector is the opposite: it only ever sets self._request_id as a plain instance attribute in cursor.py, with no public request_id property at all.
  • Branch on IS_V5_DRIVER at the one call site that reads this — execute_and_notify_query_listener in server_connection.py — and its unit test mock.
  • Investigated (but left untouched) the other _request_id-named attributes in the repo: AstBatch._request_id and AstBuilder's request-id generation are Snowpark's own self-generated UUIDs for the AST Bind/Eval batching protocol — unrelated to the connector cursor, same name by coincidence.

Test plan

  • grep -rn "\._request_id\b" src/ tests/ confirms only the AST-batch (unrelated) and the fixed call sites remain

Checklist

  • I acknowledge that I have ensured my changes to be thread-safe

Stack (via Graphite)

🤖 Generated with Claude Code

The UD's SnowflakeCursor exposes the client-generated request UUID as
a public `request_id` property; `_request_id` is only a backward-compat
alias slated for removal. The legacy v4 connector is the opposite: it
only ever sets `self._request_id` as a plain instance attribute and has
no public `request_id` property. Branch on IS_V5_DRIVER in the one call
site that reads this (execute_and_notify_query_listener) and its unit
test mock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sfc-gh-fpawlowski
sfc-gh-fpawlowski force-pushed the SNOW-2912540-request-id-compat branch from e899f6f to da5debe Compare August 15, 2026 12:22
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.97%. Comparing base (69382c5) to head (9a8a97c).

Additional details and impacted files
@@                           Coverage Diff                            @@
##           SNOW-2912540-secret-detector-import    #4314       +/-   ##
========================================================================
+ Coverage                                67.33%   80.97%   +13.64%     
========================================================================
  Files                                      170      170               
  Lines                                    44666    44666               
  Branches                                  7680     7680               
========================================================================
+ Hits                                     30075    36169     +6094     
+ Misses                                   11874     6975     -4899     
+ Partials                                  2717     1522     -1195     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants