fix(cli): make TestDataset teardown best-effort to fix flaky copy-annotations test#449
Merged
Merged
Conversation
…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
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.
test_create_dataset_copy_annotationsintermittently failed CI. The test kicks off an async--copy-annotations-from, which locks the source dataset server-side; the RAIITestDataset::dropthen.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