Skip to content

fix: upgrade Go snap to 1.26 in snapcraft.yaml#2011

Merged
TerryHowe merged 1 commit intooras-project:release-1.3from
TerryHowe:fix/snap-go-1.26-release-1.3
Mar 20, 2026
Merged

fix: upgrade Go snap to 1.26 in snapcraft.yaml#2011
TerryHowe merged 1 commit intooras-project:release-1.3from
TerryHowe:fix/snap-go-1.26-release-1.3

Conversation

@TerryHowe
Copy link
Copy Markdown
Member

Problem

The snap release CI job for release-1.3 is failing with:

Environment validation failed for part 'oras': invalid go compiler version 'go: downloading go1.26.1 (linux/amd64)'.
Failed to execute pack in instance.

Root Cause

snapcraft.yaml pins the build snap to go/1.25/stable, but go.mod requires go 1.26.1. Go 1.21+ defaults to GOTOOLCHAIN=auto, which causes the Go 1.25 binary to attempt downloading Go 1.26.1 at build time. Snapcraft's environment validator then receives the download progress message (go: downloading go1.26.1 (linux/amd64)) as the Go compiler version string — which is invalid — causing the build to fail.

Fix

Upgrade the build snap channel from go/1.25/stable to go/1.26/stable to match the Go version required by go.mod.

References

The go.mod requires Go 1.26.1, but the build snap was pinned to
go/1.25/stable. When Go 1.25 encounters a go.mod with a higher
version requirement, it attempts to auto-download that version via
GOTOOLCHAIN. Snapcraft's environment validator then receives the
download progress string ('go: downloading go1.26.1 (linux/amd64)')
as the Go compiler version, which is invalid, causing the snap build
to fail.

Upgrade the build snap channel from go/1.25/stable to go/1.26/stable
to match the Go version required by go.mod.

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.28%. Comparing base (e3f584f) to head (959f2e6).
⚠️ Report is 1 commits behind head on release-1.3.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.3    #2011      +/-   ##
===============================================
+ Coverage        87.25%   87.28%   +0.03%     
===============================================
  Files              143      143              
  Lines             5538     5538              
===============================================
+ Hits              4832     4834       +2     
+ Misses             419      417       -2     
  Partials           287      287              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe TerryHowe merged commit a263eb3 into oras-project:release-1.3 Mar 20, 2026
8 checks passed
@TerryHowe TerryHowe deleted the fix/snap-go-1.26-release-1.3 branch March 20, 2026 22:57
FeynmanZhou pushed a commit to oras-project/oras-www that referenced this pull request Apr 15, 2026
## Summary

The snap installation section was removed from the v1.3 docs, which
prompted issue oras-project/oras#1965. Now that the snap release
workflow is active and publishing to the Snap Store (as of
oras-project/oras#2011), restore the installation instructions.

## Changes

- Adds a **Snap** section to
`versioned_docs/version-1.3/installation.mdx` with `snap install oras
--classic`
- Includes a note explaining that `--classic` is required because ORAS
uses classic confinement to access files outside the snap sandbox
- Adds Snap to the list of package managers mentioned in the
verification note

## Why `--classic` is required

ORAS is a CLI tool that reads and writes files at arbitrary paths
provided by the user. Strict snap confinement would prevent this, so
classic confinement is intentional and the `--classic` flag is
unavoidable.

Fixes oras-project/oras#1965

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
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.

2 participants