Repository navigation
Add check_merge_conflicts.py to simulate dependencies.yaml merges bef… - #270
Draft
Zubair Maalick (zmaalick) wants to merge 3 commits into
Draft
Zubair Maalick (zmaalick) wants to merge 3 commits into
Zubair Maalick (zmaalick) wants to merge 3 commits into
Conversation
Zubair Maalick (zmaalick)
marked this pull request as draft
December 2, 2026 09:21
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.
Add check_merge_conflicts.py to simulate dependencies.yaml merges before extracting
PR Summary
Sci/Tech Reviewer:
Code Reviewer:
Adds
github_scripts/check_merge_conflicts.py, a pre-flight check that simulates thedependencies.yamlmerges done bymerge_sources.py/get_git_sources.pyusinggit merge-tree, without a working copy or compile, so conflicts are found in seconds before a suite is submitted.For each repository it reports which branches have drifted onto newer releases than the base, the merge step where the extract would fail, the conflicting files by type (code/housekeeping/other) and which branch they clash with, and a suggested merge order.
By default it models the per-file
CONFLICT_RULESresolution from #269 (--resolver legacymodels the currentCONFLICT_IGNORESbehaviour). Exit status is 0 if the extract would succeed, 1 if it would fail or a branch has drifted, and 2 on errors.Tested with 4 new unit tests on local repos, and against u-ed285 and o-ab147, where it reproduced the real extract failures (same failing step and files).
`
Once merged, we can add this script in
rose-suite.confas:[file:bin/check_merge_conflicts.py]
source=git:localmirrors:MetOffice/SimSys_Scripts.git::github_scripts/check_merge_conflicts.py::main
`
Code Quality Checklist
Testing
Security Considerations
AI Assistance and Attribution
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review