Resolve alias target for releases on older distros#33
Merged
Conversation
There was a problem hiding this comment.
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_rustwhen no pins match the currentdefault_distrosuffix. - 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.
leighmcculloch
approved these changes
Jul 24, 2026
fnando
enabled auto-merge (squash)
July 24, 2026 22:41
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.
What
derive_default_rustnow falls back to a release's own highest-version rust pin when none of its pins match the currentdefault_distrosuffix. It also raises a clear error when a release declares no pins at all.Why
The
publish moving aliasesjob failed for the25.1.0release (run) withno rust_versions[] pin matches default_distro 'trixie'.25.1.0is a bookworm-only back-port, but the repo'sdefault_distrohas since moved totrixie, 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.