Repository navigation
Notebook sync durability test: pick the abandoned-restore victims in the state's own order - #15548
Merged
Merged
Conversation
…the state's own order
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
tests/python/test_docker_nb_refresh_state_durability.py::test_an_abandoned_restore_puts_the_tree_backcan fail on a Linux runner with no change involved, e.g.Repo tests (CPU, studio)on #15529 (job 122110779747, base ca640b8):Cause
The test deletes 50 notebooks and caps file size so that appends to the rewritten state start failing about 488 records in, then checks that section 1b stopped restoring after the first failed append. It picked the victims by name (the 50 highest), assuming they are the last 50 records. But
unsloth_sync_notebooks.shwrites the state infindorder, which is directory order. On XFS that happens to be creation order, so the victims straddle the cap and about 38 are restored. On ext4 (the runner's filesystem) directory order follows a per-filesystem hash, so the 50 highest names can all sit before the cap, every one of them is restored before any append fails, and the test reports a broken guard that is not broken.The script is right: it rewrites the state in its own order and stops restoring after the first failed append. Only the test's choice of victims depended on the filesystem.
Change
The victims are now the last 50 records in the state file's own order, so they straddle the cap whatever the directory order is. A new assert also requires at least one restore before the cap, so a setup where the victims miss the boundary fails loudly instead of passing without exercising the guard.
Verification (local)
[ "$rs_ok" = 1 ] || continueguard from the script fails the test in every one of those orders.