Commit 8725395
committed
ci/test: deflake retry tests under merge-queue load
Two compounding fixes for the flake observed on PR #812's merge_group
run, where test_oserror_retries and test_retry_max_count_not_exceeded
failed with `assert mock_validate_conn.call_count == 6` because
unexpected `/telemetry-ext` requests had been counted alongside the
intended session-endpoint retries.
1. tests/e2e/common/retry_test_mixins.py — strengthen
`_isolated_from_telemetry()` with two additional defensive patches:
- TelemetryClient._send_telemetry → no-op
- TelemetryClient._export_event → no-op
The existing factory swap installs NoopTelemetryClient for connections
created during the test, but doesn't cover real TelemetryClient
instances that slip in via other paths (stale module-global,
pre-existing client created before the test entered, or code that
bypasses initialize_telemetry_client). Patching at the class level
for the duration of the context catches all of them.
Verified locally: test_oserror_retries goes from flaky-on-CI to 5/5
green in consecutive runs.
(test_retry_max_count_not_exceeded still fails on this branch but
also fails on baseline main — pre-existing `'SimpleHttpResponse'
object has no attribute 'version_string'` issue, unrelated.)
2. .github/workflows/code-coverage.yml — serialise merge_group runs.
Previous concurrency group was keyed on github.ref, which is per-PR
in the queue (`gh-readonly-queue/main/pr-N-…`). That allowed multiple
queue entries to hammer the same warehouse in parallel, stressing
telemetry / retry paths that single-PR runs don't exercise.
Group merge_group + workflow_dispatch under a single fixed name
(`e2e-mq-serial`) so they run one at a time. PR-event runs keep
per-ref grouping + cancel-in-progress for fast author feedback.
Trade-off: queue throughput drops to one ~17-min run at a time. For
this repo's PR volume that's acceptable, and the alternative is
flaky merges.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>1 parent 00dc084 commit 8725395
2 files changed
Lines changed: 43 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
| |||
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
58 | 79 | | |
59 | 80 | | |
60 | 81 | | |
61 | 82 | | |
62 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
63 | 88 | | |
64 | 89 | | |
65 | 90 | | |
| |||
0 commit comments