Skip to content

Resolve alias target for releases on older distros#33

Merged
fnando merged 2 commits into
mainfrom
handle-non-default-distros
Jul 24, 2026
Merged

Resolve alias target for releases on older distros#33
fnando merged 2 commits into
mainfrom
handle-non-default-distros

Conversation

@fnando

@fnando fnando commented Jun 18, 2026

Copy link
Copy Markdown
Member

What

derive_default_rust now falls back to a release's own highest-version rust pin when none of its pins match the current default_distro suffix. It also raises a clear error when a release declares no pins at all.

Why

The publish moving aliases job failed for the 25.1.0 release (run) with no rust_versions[] pin matches default_distro 'trixie'. 25.1.0 is a bookworm-only back-port, but the repo's default_distro has since moved to trixie, so the alias picker found no matching pin and aborted the publish. Older release lines should still get their :<cli> alias pointed at their own newest base rather than failing.

Details

The fallback preserves the existing highest-version-wins / freshest-digest tiebreak. Releases that do have a matching-suffix pin (26.x, 27.0.0) are unaffected. Tests cover the fallback, the version tiebreak within the fallback, and the empty-pins error.

Copilot AI review requested due to automatic review settings June 18, 2026 18:09
@fnando
fnando requested a review from mootz12 June 18, 2026 18:11
@fnando fnando self-assigned this Jun 18, 2026
@fnando fnando added this to DevX Jun 18, 2026
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jun 18, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Jun 18, 2026

Copilot AI 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.

Pull request overview

This PR updates the Rust-base “default pin” selection logic so publishing aliases doesn’t fail for older Stellar CLI releases whose rust_versions[] only target an older distro than the repo’s current default_distro. Instead of erroring when no pin matches the current slim-<default_distro> suffix, it falls back to the release’s own highest Rust pin, and it now errors clearly when a release declares no pins at all.

Changes:

  • Add fallback behavior in derive_default_rust when no pins match the current default_distro suffix.
  • Add an explicit error when a release has an empty/missing rust_versions[].
  • Update unit tests to cover fallback behavior, fallback version ordering, and the empty-pins error.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
scripts/lib/builds.py Implements fallback-to-release-pins behavior and adds a clearer empty-pins error in derive_default_rust.
scripts/publish_aliases.py Updates module docstring to document the new fallback behavior for older releases.
tests/unit/test_builds.py Reworks/extends tests to validate fallback behavior, version tiebreak within fallback, and the empty-pins error case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fnando
fnando requested a review from leighmcculloch July 24, 2026 19:30
@fnando
fnando enabled auto-merge (squash) July 24, 2026 22:41
@fnando
fnando merged commit bd7593b into main Jul 24, 2026
12 checks passed
@fnando
fnando deleted the handle-non-default-distros branch July 24, 2026 22:55
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Jul 24, 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.

3 participants