Repository navigation
ci(schema-parity): an exhausted walk-back tells a PR branched while dev was broken to merge dev in (#3395) - #4013
Merged
Conversation
…ev was broken to merge dev in (#3395) The exhausted-walk message advised "raise MAX_BASE_WALKBACK in the fix PR". That is the right remedy for the PR that repairs the base branch, and the wrong one for any other PR branched inside the broken range and checked after the fix landed: its merge-base is still the broken commit, and merging the repaired base branch in moves it past the break with no change to the bound. The message now names both cases, and the comment on MAX_BASE_WALKBACK says that only the fix PR can ever need a larger bound. The bound stays at 20. New self-test: a PR branched inside the broken range, with the bound at 1, exits 2 and is told to merge the base branch in; after merging it, the guard passes from the fixed merge-base with no walk-back warning. Red against the previous message (the advice assertion), green now.
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.
Summary
Part of #3395, which #3974 fixed on
dev(the issue stays open until the release). A follow-up to #3974, from @dolho's review note onMAX_BASE_WALKBACK.When the merge-base can't build its install,
scripts/ci/check_sqlite_upgrade_parity.pywalks back first-parent ancestors (bounded byMAX_BASE_WALKBACK = 20) and exits 2 once the walk is exhausted. Its message told every PR to "raise MAX_BASE_WALKBACK in the fix PR". That is the right advice for the one PR that repairs the base branch. Any other PR branched inside the broken range and checked after the fix landed gets the same wrong advice: its merge-base is still the broken commit, and what it needs is to merge the repaired base branch in, which moves the merge-base past the break with no change to the bound.Changes
MAX_BASE_WALKBACKsays only the fix PR can ever need a larger bound. The bound stays at 20:schema-parityhas about 200 push runs ondevsince mid-July with none failing, and 20 first-parent commits is roughly a day and a half ofdev.test_exhausted_walk_clears_once_the_repaired_base_is_merged_in: a PR branched inside the broken range, with the bound at 1, exits 2 and is told to merge the base branch in; after merging it, the guard passes from the fixed merge-base with no walk-back warning.tests/registry.json: one sentence added to the existing entry's description.No docs: CI-script message change (bug-fix tier).
Journey Impact: none: a CI guard's failure message and its self-test. No runtime code, endpoint, UI or migration behaviour changes.
Test Plan
Mutation:
dev'sscripts/ci/check_sqlite_upgrade_parity.pyrestored with the tests kept →tests/unit/test_sqlite_upgrade_parity_guard.py1 failed, 26 passed (test_exhausted_walk_clears_once_the_repaired_base_is_merged_in, on the advice assertion).Validation:
tests/unit/test_sqlite_upgrade_parity_guard.py→ 27 passed.test_sqlite_upgrade_parity_guard.py test_schema_parity.py test_migrations.py test_alembic_parity_guard.py test_2338_journey_catalog.py→ 131 passed under pytest-randomly seeds 11, 222 and 3333 (Python 3.12).mypy --strictclean on the script;tests/lint_sys_modules.pyandtests/lint_root_test_placement.pypass;git diff --checkclean; gitleaks over the branch commit found no leaks.Unverified: not run under CI's Python 3.13 image (the change is a string and a test over synthetic git repositories); the full
tests/unittier was not run.