ci: pin solana-cli-version to 3.1.10 (fix flaky CI from upstream 'stable' resolver)#13
Closed
mikemaccana wants to merge 1 commit into
Closed
ci: pin solana-cli-version to 3.1.10 (fix flaky CI from upstream 'stable' resolver)#13mikemaccana wants to merge 1 commit into
mikemaccana wants to merge 1 commit into
Conversation
heyAyushh/setup-solana@v5.9 (used directly in native/pinocchio/quasar and transitively via heyAyushh/setup-anchor@v4.999 in anchor.yml) has an intermittently broken 'stable' resolver. When the upstream STABLE_CHANNEL_LATEST_TAG env var is unset/empty in a given run, the action logs 'Using Solana CLI version ' (no version) and then curls https://release.anza.xyz/v/install, which returns HTTP 404 and fails the job. Recent main-branch CI run 25696483414 (Anchor) is a concrete example. The action is already at its latest tag (v4.999 / v5.9 follow a non-standard '4.99X / 5.X' floating-tag scheme where higher = newer) and the maintainer's most recent commit message is literally 'bumped action because of solana stable' — i.e. upstream is aware of the brittleness but consumers still get 'stable' as the de facto default. Pinning a concrete version is the only defensive answer available to us. 3.1.10 is the Solana CLI version recommended by Anchor 1.0.0's release notes and pinned by Anchor's own CI from 1.0.0-rc.5 onward (see the Anchor CHANGELOG). It is also compatible with our anchor-version: 1.0.0 pin. The non-anchor frameworks are pinned to the same value to keep the CI matrix consistent. The 'beta' steps in native.yml and pinocchio.yml are intentionally left floating: they are the channel-tracking jobs and are already marked continue-on-error with a comment explaining the upstream beta 404 behaviour. A separate issue will be filed upstream at heyAyushh/setup-solana documenting the empty-version resolver bug. Bump in lockstep with anchor-version when upgrading Anchor.
Collaborator
Author
|
Closing - taking a different approach (just adding a comment marker, not pinning the version). See follow-up commit on main. |
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.
Problem
CI on
mainis flaky and failing semi-randomly across all four framework workflows (anchor, native, pinocchio, quasar). Concrete example: run 25696483414 (Anchor, on the merge commit for #12).The failing step is
Setup Solana StableinsideheyAyushh/setup-solana@v5.9(used directly in native/pinocchio/quasar, and transitively viaheyAyushh/setup-anchor@v4.999in anchor.yml). Withsolana-cli-version: stablethe action's resolver reads an upstreamSTABLE_CHANNEL_LATEST_TAGenv var and strips the leadingv— but when that var is unset/empty for a given run, the action logs:…and then curls
https://release.anza.xyz/v/install(no version) which returns:This is non-deterministic — same commit, same workflow, sometimes passes, sometimes 404s. It's currently breaking PR-merge CI and the scheduled nightly runs.
Why the action is the problem (and why we can't just upgrade it)
v4.999/v5.9ARE the latest tags. The maintainer uses a non-standardv4.99X/v5.Xfloating-tag scheme where higher = newer (formalv4.0was July 2024;v4.99Xtags have been the de facto latest since).setup-anchor(2025-06-10) is literally "bumped action because of solana stable" — i.e. upstream is openly chasing solana-stable brittleness but consumers still getstableas the de facto default.continue-on-error: true+ an explanatory comment on the matchingbetasteps in native.yml/pinocchio.yml for an analogous upstream beta-404 issue.Given the action is already at its latest tag and the maintainer has acknowledged the issue without fixing the consumer-facing default, the only defensive option available to us is to stop using
stableand pin a concrete version.Fix
Replace
solana-cli-version: stablewithsolana-cli-version: 3.1.10in:.github/workflows/anchor.yml.github/workflows/native.yml(stable step only).github/workflows/pinocchio.yml(stable step only).github/workflows/quasar.ymlWhy 3.1.10?
anchor-version: 1.0.0pin.https://release.anza.xyz/v3.1.10/install(verified: HTTP 200).The non-anchor frameworks (native, pinocchio, quasar) are pinned to the same value to keep the CI matrix consistent across frameworks; nothing in those workflows requires a different CLI.
What's intentionally left floating
The
betasteps in native.yml and pinocchio.yml. Those are channel-tracking jobs by design and are alreadycontinue-on-error: truewith a comment explaining the upstream beta-404 behaviour. Pinning them would defeat the point.Maintenance note
Each pin has an inline comment explaining why
stablewas rejected and that the version should be bumped in lockstep withanchor-versionwhen Anchor is upgraded. A separate issue will be filed upstream atheyAyushh/setup-solanadocumenting the empty-version resolver bug; if upstream ever fixes it cleanly we can revisit reverting tostable, but the inline comments will survive that decision.Verification
python3 -c "import yaml; yaml.safe_load(...)"clean on all four workflows.Note
Low Risk
Low risk: CI-only changes that pin the Solana CLI version to avoid flaky installs; no production code or runtime behavior is modified.
Overview
Pins the GitHub Actions Solana toolchain from
stableto3.1.10in the Anchor, Native, Pinocchio, and Quasar workflows to prevent intermittentsetup-solana/setup-anchorfailures.Adds inline comments documenting the upstream
stableresolver flakiness and noting that the pin should be bumped in lockstep with the Anchor version (while leaving existing beta channel tracking behavior unchanged).Reviewed by Cursor Bugbot for commit e90f11f. Bugbot is set up for automated code reviews on this repo. Configure here.