Skip to content

release hops: write release_id into every release project description - #159

Merged
rjd15372 merged 2 commits into
mainfrom
release-id-marker
Oct 16, 2026
Merged

rjd15372 merged 2 commits into
mainfrom
release-id-marker

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

Why

Tools that consume the ppg:releases:* projects need to know which release their binaries belong to.

What

Every release hop writes

release_id: <id>

as the last line of each target project's description, top project and every subproject. <id> is the current release.yaml tag 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.

  • When: after the project's mirror meta is applied (that rewrites the description) and before its osc release, so the description already names the release when the binaries land.
  • Where: hop 1 (sync prerelease), hop 2 (sync release --from) and the legacy single-hop sync release, all through release_tree(..., release_id=...).
  • Pre-release projects: source_commit is still written only after a complete copy (hop 2 relies on it). 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 last.
  • Release projects: the hop 2 meta apply drops the pre-release source_commit, so they end with release_id alone. sync push never touches :releases: projects, so the marker stays until the next release.
  • Dry-runs print the release id they would write.

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_tree writing the marker before each copy, hop 1's final source_commit + release_id order, 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_commit then release_id.

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>
@rjd15372
rjd15372 merged commit 2beb516 into main Oct 16, 2026
5 checks passed
@rjd15372
rjd15372 deleted the release-id-marker branch October 19, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant