Repository navigation
test(location): rebuild past the changed-build order skew before replanning - #1577
Merged
Merged
Conversation
…anning The served-location replan test failed intermittently in CI: after a rebuild and its sync, the location reported daily_orders, order_count and orders as changed instead of nothing. `--changed` compares a relation with each of its executions within 5 s of its newest, so a rebuild that starts within 5 s of the previous build still reports that build's edit and its consumers' inputs as unknown. Locally the rebuild started 5.6 s after the first build; a faster runner started it inside the window. With the window widened to 10 s the test failed every time with exactly the CI report. The test now starts the rebuild at least the order skew after the first build returned. The publication tests share one ORDER_SKEW_SECONDS instead of each defining it.
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.
Why
The served-location replan test failed intermittently in CI. After a rebuild and its sync, the location's "what changed" report listed
daily_orders,order_countandordersinstead of nothing.The location log from the latest failure shows a single publication, and the second plan follows the sync after the rebuild. That sync read the same rows a passing run reads. The plan was right for its input:
--changedcompares a relation with each of its executions within 5 s of the newest. A rebuild that starts within 5 s of the previous build therefore still reports that build's edit, and lists the rebuilt nodes' consumers as having unknown inputs. Locally the rebuild started 5.6 s after the first build, so a faster runner landed inside the window.Changes
ORDER_SKEW_SECONDSinpublication/helpers.pyinstead of each defining it.No product change: the skew is deliberate.
Verification
test_changed.pystill passes with the shared constant.make check-cipassed apart fromcheck-control-client, which compared the client with an out-of-date localsqbbuild; this change touches only tests, and CI runs that check on a fresh build.