Repository navigation
test: rewrite the layer record in one step under the live server in test_a_start_serves_the_page_with_its_own_leaf - #6668
Merged
Merged
Conversation
test_a_start_serves_the_page_with_its_own_leaf deleted layer.json before writing its replacement. The replaced server's row publisher could refresh inside that gap: read_page_registry's compose read the layer through load_registry, then found no record and failed its assertion, and the publisher's failure exits the server, so running_server found none. A macOS dispatch at the base failed 3 of 36 copies this way, with that traceback in the server's own log. LAYER.write already replaces the file atomically, as page init writes it, so the test now rewrites the record without the gap. Closes #6665
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_a_start_serves_the_page_with_its_own_leafdeletedlayer.jsonand then wrote its replacement while the replaced server was still running. The server's row publisher refreshes about every two seconds. When a refresh landed inside that gap,read_page_registry'scomposeread the layer throughload_registry, then found no record and failedassert record is not None. A failed refresh exits the server (RowPublisher.run), sorunning_serverfound no server at line 1028.LAYER.writealready replaces the file atomically, the waypage initwrites it, so the test now rewrites the record without deleting it first. The test still covers what it set out to: a server over a layer selecting an unknown package. Anabsentpackage is reported as an activation error and does not crash the server.Evidence, all from macOS
cidispatches of this test alone (--workers 3 --load 2):composeassertion traceback above. An earlier probe also failed 2 of 36 with the lease released and the port refusing connections (run 44924777467).The test came in with #5977.
Left as is
composereads the layer record twice, so a record deleted between those reads crashes the serving process. In Leaf itself the record changes only throughpage init, which restarts the server and replaces the file atomically (served_state/reading.py,held_page_reading). That makes this window reachable only by deletinglayer.jsonby hand under a live server. This PR changes only the test.Closes #6665 — automated triage