Skip to content

Replace deprecated oraculum with fedora-distro-aliases#28

Merged
bajertom merged 3 commits into
mainfrom
replace-oraculum-with-fedora-distro-aliases
Jun 29, 2026
Merged

Replace deprecated oraculum with fedora-distro-aliases#28
bajertom merged 3 commits into
mainfrom
replace-oraculum-with-fedora-distro-aliases

Conversation

@thrix

@thrix thrix commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The Fedora image URL resolver in testcloud/distro_utils/fedora.py mapped the latest/rawhide/branched aliases to concrete release numbers by querying oraculum (the Packager Dashboard) at https://packager-dashboard.fedoraproject.org/api/v1/releases. Oraculum is being deprecated, so this moves the lookup to the fedora-distro-aliases library, which sources the same data from Bodhi
(https://bodhi.fedoraproject.org/releases/).

A new get_fedora_releases() helper returns a dict shaped like the old oraculum releases["fedora"] payload
({"rawhide", "branched", "stable"}), so the alias-normalization logic is unchanged. Release lookups are cached via the library's Cache (gated on CACHE_IMAGES, TTL TRUST_DEADLINE), and failures map to TestcloudImageError as before.

fedora-distro-aliases>=1.5 is pinned because the caching API (Cache, BadCache, the cache= argument) was introduced in 1.5.

Assisted-by: Claude Code

The Fedora image URL resolver in `testcloud/distro_utils/fedora.py`
mapped the `latest`/`rawhide`/`branched` aliases to concrete release
numbers by querying oraculum (the Packager Dashboard) at
`https://packager-dashboard.fedoraproject.org/api/v1/releases`. Oraculum
is being deprecated, so this moves the lookup to the
[`fedora-distro-aliases`](https://github.com/rpm-software-management/fedora-distro-aliases)
library, which sources the same data from Bodhi
(`https://bodhi.fedoraproject.org/releases/`).

A new `get_fedora_releases()` helper returns a dict shaped like the old
oraculum `releases["fedora"]` payload
(`{"rawhide", "branched", "stable"}`), so the alias-normalization logic
is unchanged. Release lookups are cached via the library's `Cache`
(gated on `CACHE_IMAGES`, TTL `TRUST_DEADLINE`), and failures map to
`TestcloudImageError` as before.

`fedora-distro-aliases>=1.5` is pinned because the caching API
(`Cache`, `BadCache`, the `cache=` argument) was introduced in 1.5.

Assisted-by: Claude Code
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
@github-project-automation github-project-automation Bot moved this to backlog in planning Jun 10, 2026
@therazix therazix linked an issue Jun 10, 2026 that may be closed by this pull request
@therazix therazix moved this from backlog to review in planning Jun 10, 2026
Comment thread testcloud/distro_utils/fedora.py Outdated
Comment thread testcloud/distro_utils/fedora.py Outdated

@tcornell-bus tcornell-bus left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, test coverage seems good and they pass.

Use a catch-all `except Exception` around `get_fedora_releases()` since
every failure maps to the same `TestcloudImageError` with a generic log
message, so the specific error source is not preserved anyway (and the
enumerated list missed cases such as `ValueError` from `int(...)`).

Resolve rawhide/branched from the library's `fedora-development` alias by
position instead of matching the magic `"rawhide"` string, relying on the
documented sort order (highest is Rawhide, the one below is branched).

Assisted-by: Claude Code
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
@thrix thrix force-pushed the replace-oraculum-with-fedora-distro-aliases branch from 01b4042 to c613732 Compare June 26, 2026 18:12
Move the `_resolve_fedora_version()` call inside the `try` block so that
any failure while parsing the alias data (not just fetching it) is mapped
to `TestcloudImageError`, consistent with the catch-all error handling.

Assisted-by: Claude Code
Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
@thrix thrix requested a review from LecrisUT June 26, 2026 21:26
@bajertom bajertom moved this from review to merge in planning Jun 29, 2026
@bajertom bajertom merged commit 49759a5 into main Jun 29, 2026
@github-project-automation github-project-automation Bot moved this from merge to done in planning Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

Get Fedora versions from bodhi instead of packagerdashboard

5 participants