Skip to content

ci: pin sbpf and Solana versions in ASM workflow#625

Open
MarkFeder wants to merge 1 commit into
solana-foundation:mainfrom
MarkFeder:ci-pin-asm-sbpf-solana
Open

ci: pin sbpf and Solana versions in ASM workflow#625
MarkFeder wants to merge 1 commit into
solana-foundation:mainfrom
MarkFeder:ci-pin-asm-sbpf-solana

Conversation

@MarkFeder

Copy link
Copy Markdown
Contributor

Problem

The ASM build-and-test job has been red on main since 2026-06-29, failing every ASM example with:

Program is not deployed
Program ... failed: invalid account data for instruction

Tests that expect custom program error: 0x1..0x6 instead get invalid account data for instruction, so checking-accounts, create-account, hello-solana, transfer-sol (and the rest of the ASM group) all fail.

Root cause

solana-asm.yml installs both tools unpinned, so they drift with upstream:

Tool Last green (06-29 00:44 UTC) Current
sbpf v0.1.9 (0223df0e) v0.2.2 (54a3a273)
solana-cli (stable) 4.0.3 4.1.1

sbpf bumped 0.1.9 → 0.2.2 and now emits an sBPF binary the runtime loader rejects at execution ("Program is not deployed"). The build still succeeds; the failure is at load/execute time. No repo commit touched the ASM examples in the break window — it is pure toolchain drift.

Fix

Pin to the exact last-green combination:

  • sbpf--rev 0223df0e (v0.1.9)
  • Solana stable leg → 4.0.3

The beta leg is intentionally left unpinned — it is already continue-on-error and is meant to track the moving channel, so it cannot fail the job.

Note / follow-up

This restores CI by freezing the ASM toolchain to the last-known-good pair. A forward-fix (making the ASM examples compatible with sbpf 0.2.x / Solana 4.1.x) is the longer-term path and can be done separately; this unblocks the currently-red ASM check in the meantime.

The ASM build-and-test job installs sbpf from the git tip and Solana from
the floating "stable" channel, both unpinned. Around 2026-06-29 sbpf moved
0.1.9 -> 0.2.2 and Solana stable moved 4.0.3 -> 4.1.1; the new sbpf emits an
sBPF binary the runtime loader rejects at execution ("Program is not
deployed"), failing every ASM example (checking-accounts, create-account,
hello-solana, transfer-sol, ...).

Pin sbpf to 0223df0e (v0.1.9) and Solana stable to 4.0.3 -- the exact
last-green combination -- to restore the ASM workflow. The beta leg is left
unpinned since it is continue-on-error and intentionally tracks the moving
channel.
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR restores the broken ASM CI workflow by pinning sbpf to git revision 0223df0e (v0.1.9) and Solana CLI to 4.0.3 — the last-known-good combination before the toolchain drift that broke every ASM example starting 2026-06-29. The beta leg is correctly left unpinned with continue-on-error, as it is meant to track the moving channel.

  • sbpf pin: cargo install --git now uses --rev 0223df0e instead of floating HEAD, preventing the v0.2.x binary incompatibility with the runtime loader.
  • Solana stable pin: solana-cli-version moved from the floating stable alias to the explicit 4.0.3, preventing silent upgrades from re-introducing the breakage.
  • Beta leg unchanged: Continues to use solana-cli-version: beta with continue-on-error: true, intentionally tracking the moving channel.

Confidence Score: 4/5

Safe to merge — this is a targeted hotfix that freezes two toolchain versions to unblock a broken CI job, with no impact on source code or tests themselves.

The change is minimal and well-documented: two version strings updated with clear inline comments explaining the rationale and the inter-dependency. The only open concern is that the sbpf revision is specified as an 8-character short SHA rather than the full 40-character SHA, which is slightly less robust for long-term reproducibility. No logic is changed; worst case is CI breaks again if the pinned versions become incompatible with an OS/toolchain update, which is easy to diagnose.

.github/workflows/solana-asm.yml — the only changed file. The short-SHA --rev and the manual keep-in-sync note between the two version pins are worth a second look before merging.

Important Files Changed

Filename Overview
.github/workflows/solana-asm.yml Pins sbpf to git rev 0223df0e (v0.1.9) and Solana CLI to 4.0.3; beta leg intentionally left unpinned with continue-on-error.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant GH as GitHub Actions
    participant Cargo as cargo install (git)
    participant SolanaS as setup-solana (stable 4.0.3)
    participant SolanaB as setup-solana (beta, unpinned)
    participant Runner as build_and_test.sh

    GH->>Cargo: cargo install --git sbpf --rev 0223df0e
    Note over Cargo: Pinned to v0.1.9
    Cargo-->>GH: sbpf binary installed

    GH->>SolanaS: solana-cli-version: 4.0.3
    Note over SolanaS: Pinned stable leg
    SolanaS-->>GH: solana 4.0.3 installed

    GH->>Runner: process_projects("stable")
    Runner-->>GH: results (blocking)

    GH->>SolanaB: solana-cli-version: beta (continue-on-error)
    Note over SolanaB: Unpinned, tracks moving channel
    SolanaB-->>GH: beta solana installed (or fail silently)

    GH->>Runner: process_projects("beta")
    Note over Runner: continue-on-error — won't fail the job
    Runner-->>GH: results (non-blocking)
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant GH as GitHub Actions
    participant Cargo as cargo install (git)
    participant SolanaS as setup-solana (stable 4.0.3)
    participant SolanaB as setup-solana (beta, unpinned)
    participant Runner as build_and_test.sh

    GH->>Cargo: cargo install --git sbpf --rev 0223df0e
    Note over Cargo: Pinned to v0.1.9
    Cargo-->>GH: sbpf binary installed

    GH->>SolanaS: solana-cli-version: 4.0.3
    Note over SolanaS: Pinned stable leg
    SolanaS-->>GH: solana 4.0.3 installed

    GH->>Runner: process_projects("stable")
    Runner-->>GH: results (blocking)

    GH->>SolanaB: solana-cli-version: beta (continue-on-error)
    Note over SolanaB: Unpinned, tracks moving channel
    SolanaB-->>GH: beta solana installed (or fail silently)

    GH->>Runner: process_projects("beta")
    Note over Runner: continue-on-error — won't fail the job
    Runner-->>GH: results (non-blocking)
Loading

Reviews (1): Last reviewed commit: "ci: pin sbpf and Solana versions in ASM ..." | Re-trigger Greptile

# tip moved to v0.2.2, which emits an sBPF binary the runtime loader
# rejects at execution ("Program is not deployed"), breaking every ASM
# example. Keep in sync with the pinned Solana version below.
cargo install --git https://github.com/blueshift-gg/sbpf.git --rev 0223df0e

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 The --rev value is an 8-character short SHA. While Git expands short SHAs unambiguously most of the time, using the full 40-character SHA is more portable and explicit — it also makes it clear this is a stable, immutable reference and prevents any future ambiguity if the repo accumulates more commits. The full SHA for 0223df0e can be obtained with git -C <clone> rev-parse 0223df0e.

Suggested change
cargo install --git https://github.com/blueshift-gg/sbpf.git --rev 0223df0e
cargo install --git https://github.com/blueshift-gg/sbpf.git --rev <full-40-char-sha>

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

1 participant