SNOW-2912540: rewrite telemetry tests to verify the actual wire payload - #4323
Draft
sfc-gh-fpawlowski wants to merge 6 commits into
Draft
Conversation
This was referenced Aug 20, 2026
Author
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-capture-fixture
branch
from
August 20, 2026 17:14
3d8fa0d to
e0d3906
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-telemetry-tests
branch
3 times, most recently
from
August 21, 2026 06:53
8ccaf7b to
246d926
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## SNOW-2912540-mitmproxy-capture-fixture #4323 +/- ##
=======================================================================
Coverage 89.26% 89.26%
=======================================================================
Files 171 171
Lines 44709 44709
Branches 7688 7688
=======================================================================
Hits 39909 39909
Misses 3660 3660
Partials 1140 1140 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-capture-fixture
branch
from
August 21, 2026 08:35
d7af463 to
9084ff3
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-telemetry-tests
branch
4 times, most recently
from
August 21, 2026 09:45
7cf1721 to
3346408
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-capture-fixture
branch
2 times, most recently
from
August 21, 2026 09:59
a45ae31 to
8f91d4a
Compare
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-telemetry-tests
branch
4 times, most recently
from
August 21, 2026 13:14
6451408 to
3f1ca0e
Compare
9 tasks
sfc-gh-fpawlowski
force-pushed
the
SNOW-2912540-mitmproxy-telemetry-tests
branch
from
August 21, 2026 13:35
3f1ca0e to
fc2d729
Compare
Migrates the 10 single-check TelemetryDataTracker call sites in tests/integ/test_telemetry.py to a new WireTelemetryChecker that verifies telemetry against the real /telemetry/send payload captured by the mitmproxy fixture, instead of the connector's in-process _log_batch buffer (removed on the Universal Driver, drivers#1104/BD#58). Session.close() is the only lever that reliably forces an immediate flush on both drivers (send_log_batch/send_batch are no-ops on the Universal Driver, where flush is core-owned) -- confirmed against the Rust core source: close() blocks synchronously on the flush via an in-process PyO3 call, no subprocess or async race involved. WireTelemetryChecker closes its session as part of each check, so it needs a dedicated session rather than the shared module-scoped one; extracted _build_session() out of the `session` fixture in conftest.py so both it and the (now fully-configured) `mitmproxy_session` fixture share the same setup/teardown logic. Also fixes a copy-paste bug from the mitmproxy_session fixture's initial commit: its finally block referenced an undefined `session` variable and called an unrelated cleanup helper meant for a different fixture. test_udf_call_and_invoke, test_sproc_call_and_invoke, and test_udtf_call_and_invoke stay on the mock-patch-based TelemetryDataTracker (from the prior commit) -- each calls the tracker multiple times against one session, which is incompatible with close-to-flush. tests/integ/modin/test_telemetry.py's one remaining case also stays on the mock-patch fix, for the same reason.
cursor
Bot
force-pushed
the
SNOW-2912540-mitmproxy-capture-fixture
branch
from
September 2, 2026 06:45
7a6d3eb to
4c2c0cc
Compare
cursor
Bot
force-pushed
the
SNOW-2912540-mitmproxy-telemetry-tests
branch
from
September 2, 2026 06:45
fc2d729 to
bdedeaf
Compare
…-mitmproxy-telemetry-tests Co-authored-by: Filip Pawłowski <sfc-gh-fpawlowski@users.noreply.github.com>
…-mitmproxy-telemetry-tests Co-authored-by: Filip Pawłowski <sfc-gh-fpawlowski@users.noreply.github.com>
…-mitmproxy-telemetry-tests Co-authored-by: Filip Pawłowski <sfc-gh-fpawlowski@users.noreply.github.com>
…-mitmproxy-telemetry-tests Co-authored-by: Filip Pawłowski <sfc-gh-fpawlowski@users.noreply.github.com>
…-mitmproxy-telemetry-tests Co-authored-by: Filip Pawłowski <sfc-gh-fpawlowski@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-NNNNNNN
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.