Skip to content

fix(cli): make TestDataset teardown best-effort to fix flaky copy-annotations test#449

Merged
joe-prosser merged 1 commit into
masterfrom
joe/RE-12798-flaky-copy-annotations-teardown
Jul 9, 2026
Merged

fix(cli): make TestDataset teardown best-effort to fix flaky copy-annotations test#449
joe-prosser merged 1 commit into
masterfrom
joe/RE-12798-flaky-copy-annotations-teardown

Conversation

@joe-prosser

Copy link
Copy Markdown
Collaborator

test_create_dataset_copy_annotations intermittently failed CI. The test kicks off an async --copy-annotations-from, which locks the source dataset server-side; the RAII TestDataset::drop then .unwrap()ed a failed delete and panicked — failing the test (and risking aborting the process) over a teardown issue.

Teardown is now best-effort: retry the delete briefly (60s), then log a warning and orphan the dataset instead of panicking. The retry window is deliberately short — the copy can hold the lock for well over the previous 15-minute default, and we orphan in that case regardless, so a long retry only made the drop hang.

Verified against the test backend: the test now passes (the previously-panicking 403 becomes a warning) and drops from ~875s to ~68s — that one test had been dominating the whole suite's runtime.

RE-12798

…otations test

test_create_dataset_copy_annotations intermittently failed CI. The test
kicks off an async --copy-annotations-from, which locks the source dataset
server-side; TestDataset::drop then unwrapped a failed delete and panicked,
failing the test over a teardown issue.

Teardown is now best-effort: retry the delete briefly (60s), then warn and
orphan the dataset instead of panicking. The short window is deliberate --
the copy can hold the lock well beyond the previous 15-minute default, and
we orphan in that case regardless, so a long retry only made the drop hang
(and dominated the whole suite runtime).

RE-12798
@joe-prosser joe-prosser self-assigned this Jul 9, 2026
@joe-prosser joe-prosser merged commit 4b81545 into master Jul 9, 2026
7 checks passed
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.

1 participant