Repository navigation
release hops: write release_id into every release project description - #159
Merged
Merged
Conversation
Tools that consume the ppg:releases:* projects need to know which release
their binaries belong to. Every release hop now writes
release_id: <id>
as the last line of each target project's description, where <id> is the
current release.yaml tag without its product prefix (ppg/18.7-1 -> 18.7-1,
ppg/common-1 -> common-1).
The marker is written after the project's mirror meta is applied (that
rewrites the description) and before the project's osc release, so the
description already names the release when the binaries land. This covers
hop 1 (sync prerelease), hop 2 (sync release --from) and the legacy
single-hop sync release, for the top project and every subproject.
On pre-release projects source_commit is still written only after a
complete copy, because hop 2 relies on it as the populate-complete marker.
A new set_project_description_markers() writes several markers in one meta
edit, so the post-copy write appends source_commit then release_id and
release_id stays the last line. On release projects the hop-2 meta apply
drops the pre-release source_commit, leaving release_id alone.
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
32deae0 landed the file unformatted, which fails the black step of the Python Tests workflow on every PR based on current main. Formatting only. Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
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
Tools that consume the
ppg:releases:*projects need to know which release their binaries belong to.What
Every release hop writes
as the last line of each target project's description, top project and every subproject.
<id>is the currentrelease.yamltag without its product prefix:ppg/18.7-1→18.7-1,ppg/common-1→common-1. A malformed tag stops the run before anything is written.osc release, so the description already names the release when the binaries land.sync prerelease), hop 2 (sync release --from) and the legacy single-hopsync release, all throughrelease_tree(..., release_id=...).source_commitis still written only after a complete copy (hop 2 relies on it). A newset_project_description_markers()writes several markers in one meta edit, so the post-copy write appendssource_committhenrelease_id, andrelease_idstays last.source_commit, so they end withrelease_idalone.sync pushnever touches:releases:projects, so the marker stays until the next release.Docs:
docs/PERCONA_OBS_TOOL.md,.github/copilot-instructions.md, the two-hop spec.Tests
New cases for the tag→id helper (major, common, malformed), multi-key marker order and replacement in one meta write,
release_treewriting the marker before each copy, hop 1's finalsource_commit+release_idorder, and hop 2 / legacy passing the id. Full suite: 697 passed; pyright 0 errors.Not yet exercised on a live OBS: the next populate of PR #148 should leave each pre-release description ending with
source_committhenrelease_id.