Skip to content

qa / project versions: read package versions from OBS builds - #177

Merged
mohitj1988 merged 11 commits into
mainfrom
obs-built-versions
Oct 20, 2026
Merged

mohitj1988 merged 11 commits into
mainfrom
obs-built-versions

Conversation

@rjd15372

Copy link
Copy Markdown
Collaborator

Why

EXPECTED_VERSIONS (sent to the Jenkins QA jobs so they check the versions we actually ship) was derived by parsing each package's obs/_service locally, with one heuristic per service type. When a package's version could not be derived it was silently dropped, and the test suites fell back to their own tables. Release PR #148 hit this with pgBackRest 2.60.0 (download_url): every container, server and tarball lane failed against correct binaries. 8f803fe patched that service type; this PR removes the class of bug.

OBS already knows the answer: every built binary carries its version in its file name.

Spec: docs/superpowers/specs/2026-10-20-obs-built-versions-design.md · Plan: docs/superpowers/plans/2026-10-20-obs-built-versions.md

What

  • percona_obs/obs_versions.py (new): one GET /build/<prj>/_result?view=binarylist per OBS project (cached per run) gives every package's versrel per repository; source artifacts (.src.rpm, .dsc) are preferred; _version_from_binary now reads them. Aggregates are covered: OBS lists aggregated binaries under the aggregating package. A 404 means "project absent"; any other error stops the command naming the project.
  • qa run computes EXPECTED_VERSIONS from the OBS project under test for every lane (PR, staging, nightly, pre-release):
    • value = upstream version (versrel without release); the repositories of the instance's slice must agree;
    • a conflict aborts the run before any trigger only if a selected lane sends that package; other conflicts are warnings;
    • packages without binaries are left out and named in one warning (no silent drop);
    • the local tree still decides which packages (artifact-recipe packages excluded; first provider wins and a name taken by a higher-priority project stays taken);
    • PR lanes read packages absent from the PR project from the fallback root (image-fallback-rootprj); a present package whose build failed never falls back;
    • release mirrors take their structure from the staging project named by release.yaml and read versions from the pre-release (production ppg:releases:* is never read);
    • a missing project under test is an error.
  • qa show computes EXPECTED_VERSIONS only with --expected-versions, so CI matrix detection (list_qa_matrix.py) makes no OBS request.
  • project release stops baking EXPECTED_VERSIONS into release mirrors; copied package lanes carry package: <pkg>, a new validated qa-entry key that restricts the entry to that package's line.
  • project versions --online: package rows use the same batch request (one per project instead of per package × repository), keep printing the full versrel (now from the first repository in sorted order) and warn when repositories disagree. Image rows unchanged.
  • Docs: docs/PERCONA_OBS_TOOL.md, .github/copilot-instructions.md, the two-hop release spec.

Verification

  • pytest: 737 passed; pyright: 0 errors; black --check percona_obs/ tests/: clean.
  • Live, read-only qa show --expected-versions --json on build.opensuse.org (-P isv) and labs (-P labsmain) for ppg:staging:{17,18,19} and their :containers: all exit 0, no conflicts, percona-pgbackrest=2.60.0 everywhere, percona-postgresql=19.0.1~rc1 on staging:19. Compared with the old local parser the lane sets are identical and the values only gain packages the parser could not see (GIS libraries, llvm-21, ppg-server, build dependencies; labs container lanes grow from 50 to 89 lines).

Follow-up after merge

Refresh release PR #148 (project release for 17 and 18): its mirrors lose the baked values and the release lanes compute from the pre-release projects.

EXPECTED_VERSIONS and project versions --online read package versions
from the binaries OBS built (one binarylist request per project) instead
of parsing obs/_service locally, with an agreement check across the
instance's repositories. qa run computes them for every lane;
project release stops baking them into the release mirrors.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
One binarylist request per project gives every package's versrel per
repository; source artifacts (.src.rpm, .dsc) are preferred and
_version_from_binary now reads them. Helpers normalise to the upstream
version, check that repositories agree, or pick the first repository.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
qa run now reads versions from the pre-release on OBS, so the cut no
longer writes them into the release mirror qa: entries. Copied package
lanes carry package: <name> so qa run still gives them only their own
package's line.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
qa run reads each package's version from the OBS project under test
(one binarylist per project) instead of parsing obs/_service. The
upstream version must agree across the instance's repositories, else the
run fails before any trigger; packages without binaries are named in one
warning. PR lanes read packages absent from the PR project from the
fallback root; release mirrors use their staging source's structure and
read versions from the pre-release. qa show computes them only with
--expected-versions, so the CI matrix step stays off OBS. Mirror package
lanes are scoped by a package: key.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
A package present without binaries in a higher-priority project no longer
takes its version from a lower provider, and a project whose own packages
all lack binaries no longer follows its subproject paths.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
One binarylist request per OBS project replaces build results plus
per-package, per-repository binary listings. Rows keep printing a full
versrel, now from the first repository in sorted order, and warn when
repositories disagree on the upstream version. Image rows are unchanged.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Note why multibuild flavors are not looked up.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
…ing project under test

EXPECTED_VERSIONS is now applied after lane selection; a version conflict
aborts only when a selected lane would send the conflicting package, other
conflicts are warnings. A missing OBS project under test is an error.
Also: lazy image repo/arch lookup in project versions --online, test and
import cleanups, docs.

Signed-off-by: Ricardo Dias <ricardo.dias@percona.com>
@rjd15372
rjd15372 requested a review from mohitj1988 October 20, 2026 11:22
@mohitj1988
mohitj1988 merged commit 2fd9312 into main Oct 20, 2026
5 checks passed
@rjd15372
rjd15372 deleted the obs-built-versions branch October 20, 2026 15:07
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.

2 participants