Repository navigation
Commit 24fe976
test(migrations): Scope reverse idempotency snapshot to Snuba databases (#8592)
`test_reverse_idempotency_all` snapshots `system.tables` before and
after reversing each group's latest migration twice. The snapshot
included ClickHouse's own `system.*` tables, and ClickHouse creates log
tables such as `system.query_metric_log` lazily in the background. When
one of those appeared mid-test, the before and after snapshots differed
and the test failed for reasons unrelated to migrations.
That happened on [attempt 1 of this
run](https://github.com/getsentry/snuba/actions/runs/39140651685/job/117714460279):
the failure diff contains `system.query_metric_log`, and the same image
passed on retry. Because the whole workflow was rerun, 34 already-green
jobs ran again, which cost about 184 runner-minutes.
The snapshot now only covers the databases of Snuba's configured
clusters, the same set `_drop_all_tables` uses. It selects `(database,
name, create_table_query)` ordered by `(database, name)`. Every group,
the double reversal, and the comparison of all Snuba tables across
groups are unchanged.
A side benefit: the failure output used to print every `system` table
definition (about 15k log lines). It now only prints Snuba tables.
<!-- junior-request-attribution:start -->
via **Joshua Li**.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:local%3Aweb%3Ad2c357b94d471741d23c9928 -->
--
[View Junior Session in
Sentry](https://sentry.sentry.io/explore/conversations/local%3Aweb%3Ad2c357b94d471741d23c9928/?project=4510944073809921)
<!-- junior-session-footer:end -->
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Joshua Li <joshua.li@sentry.io>1 parent 2bd3e71 commit 24fe976
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
321 | 330 | | |
322 | 331 | | |
323 | 332 | | |
| |||
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
0 commit comments