Use the same z-stream branch creation logic as rhpkg implementation - #744
Use the same z-stream branch creation logic as rhpkg implementation#744antbob wants to merge 4 commits into
Conversation
PR Summary by QodoAlign z-stream branch creation with rhpkg (-z-pending first, verify push/commit)
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
|
this reverts previous changes and instead applies only to older z-streams. it now behaves identically to rhpkg --create-z-stream-branch --allow-pending for older z-streams only, for leading z-streams the behavior stays as it was before so this should address most (all?) the concerns related to the original patch. |
a11ff65 to
a63b724
Compare
|
added z-stream branch creation info propagation to MR notes so the branching point is clear to reviewer/s. |
| if await is_older_zstream(branch): | ||
| _, ref = await get_latest_z_pending_build(package, branch) | ||
| else: | ||
| _, ref = await get_latest_candidate_build(package, branch) | ||
| if source_branch := self._find_source_branch(repo, branch): | ||
| source_branch = self._find_source_branch(repo, branch) | ||
| if source_branch and source_branch.endswith("-main"): | ||
| ref = await self._find_latest_same_nvr_ref( | ||
| repo, | ||
| package, | ||
| ref, | ||
| source_branch, | ||
| ) |
There was a problem hiding this comment.
It was established that -z-pending is correct also for leading Z-Streams, so we can get rid of the condition and get_latest_candidate_build(). And it would probably make sense to ditch the NVR walk (_find_latest_same_nvr_ref()) as well, @TomasKorbar WDYT?
The rhpkg is the reference implementation for z-stream branch creation logic. As we're still seeing a great deal of z-stream branch creation failures i've decided doing exactly what rhpkg does is the best way to address those issues. The main changes to the current logic are:
Also some changes related to logging so when these kinda errors occur the MCP logs actually have some useful data/output to troubleshoot.