Allow skipping 'basetest' or 'newtest' phases (#37) #39
No reviewers
Labels
No labels
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/rmdepcheck!39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "alternate-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This allows you to skip either the 'basetest' or 'newtest'
'phase'. If you skip basetest, we will only run checks on
the new package repository against the modified base repos;
if you skip newtest, we will only run checks on the modified
base repos.
This is intended to be used for ELN. ELN's buildroot contains
more packages than are in its published repositories. The ELN
maintainers don't consider repoclosure of the buildroot as a
goal. So for the base phase we should check the published
repositories. However, for the newtest phase, we need to check
against the buildroot, because the packages under test may be
destined for the buildroot and thus have buildroot-only
dependencies. We don't want to report a failure if their
dependencies cannot be satisfied from the published repositories.
We can cover both cases by allowing the phases to be run
separately, so for ELN we will run the basetest phase against
the published repositories, and the newtest phase against the
buildroot repository.
Signed-off-by: Adam Williamson awilliam@redhat.com
AI Code Review
📋 MR Summary
Adds a
--skipargument to bypass either the 'basetest' or 'newtest' phase, primarily to support the ELN buildroot use case.--skipargument to argparse with choices 'basetest' and 'newtest'.get_modified_and_new_repoclosureto conditionally skip executingrepoclosurefor the specified phase.Detailed Code Review
The implementation neatly solves the ELN buildroot problem by allowing selective phase execution. The logic for skipping the subprocess calls is correct and preserves existing behavior when the flag is not used. The included end-to-end tests robustly verify the new functionality using mock repositories. There is only a minor type-hinting issue regarding the default value of the new argument from
argparse.📂 File Reviews
📄 `rmdepcheck.py` - Introduces the `--skip` argument and modifies the core function to respect it.
skipparameter inget_modified_and_new_repoclosureis typed asstr. However, if the--skipargument is not provided via the CLI,argparseassigns it a value ofNone. This will cause a type-hinting violation (e.g., for mypy) whenargs.skipis passed to the function.None.✅ Summary
skipparameter inget_modified_and_new_repoclosureto accommodateNone.🤖 AI Code Review | Generated with ai-code-review | Model:
gemini-3.1-pro-preview⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.
15047e9b56b269b5e617Allow skipping 'installability' or 'repoclosure' (#37)to Allow skipping 'basetest' or 'newtest' phases (#37)This is an alternative to #38 . This one is simpler and, I think, allows us to be more correct, because we can ensure the buildroot is not in scope for the solver during the basetest phase - with the #38 approach it will be, which could cause false passes in corner cases, I guess.
The main drawback of this is it does mean we have to run rmdepcheck twice on ELN, and cope with that in the pipeline somehow. I guess we either report two separate results, or we have to combine the exit codes and outputs of the two executions into one.
@yselkowitz @lecris thoughts?
It would be possible to write this such that we always run both phases, but you can configure different sets of base repos for each. It just felt awkward, as it would mean adding I guess two new args -
--newbasereposand--newnmbaserepos, I guess - and the appropriate logic to run throughget_modified_and_new_repoclosuretwice internally, or even have it internally run twice...I dunno, this seemed simpler. But maybe that would still be simpler than this plus the required pipeline tweaks?Having stewed on it, I think I'll try and come up with the least ugly internal-two-phase version of this that I can tomorrow. It just makes it easier on the pipelines if we can do it that way.
Actually it turns out this was not sophisticated enough. I'm pretty sure I'll be going with some version of #40 here, so closing this.
Pull request closed