Skip to content

Snap release fails: store token cannot release to candidate channel #2294

Description

@TerryHowe

Problem

The v1.3.6 snap release failed on all architectures (amd64, arm64, s390x) at the publish step: https://github.com/oras-project/oras/actions/runs/40123903603

Store operation failed:
- invalid-channel-permission: Macaroon channel restrictions (stable) do not allow release to candidate.

The Snap Store still serves v1.3.5 on stable.

Cause

#2274 changed .github/workflows/release-snap.yml so that stable releases go to stable,candidate instead of stable. The SNAPCRAFT_STORE_CREDENTIALS token can only release to stable, so the store rejects the upload. v1.3.5 used SNAP_RELEASE: stable and succeeded.

Fix

Revert the one-line change in release-snap.yml:

-            echo "release=stable,candidate" >> $GITHUB_OUTPUT
+            echo "release=stable" >> $GITHUB_OUTPUT

Releasing to candidate isn't needed. The candidate, beta and edge channels have been closed, so they follow stable and stay current automatically (see #2272).

After it merges, rerun the release-snap workflow for v1.3.6 with isStable: true.

Evaluation

Feasibility

  • Only .github/workflows/release-snap.yml needs to change. No Go code or snapcraft.yaml changes.
  • The SNAPCRAFT_STORE_CREDENTIALS token can only release to stable, and only a snap store collaborator can regenerate it.
  • Pre-releases are affected too. release-snap.yml#L47 sends pre-releases (isStable: false) to candidate, which this token can't release to either. The next RC snap will fail the same way. None of the recent snap runs was a pre-release, so this hasn't shown up yet. Reverting line 45 fixes stable releases; RCs are handled by no longer publishing them (step 2).

Effort

Small: a few lines in one file (revert line 45, skip publishing for pre-releases), then rerun the v1.3.6 release.

Risk

  • Behavior: this restores how v1.3.5 and earlier were released. candidate, beta and edge are closed and follow stable, so users on those channels still get v1.3.6.
  • Security: the token stays limited to stable, which matches Snap packaging and release follow-ups #2272.
  • Pre-releases: RCs will no longer be published to the snap store. They are still published on GitHub Releases.
  • Tests: there are no snap tests. The only real check is running the workflow.
  • Leftovers from the failed run: the store may have kept unreleased revisions, which do no harm. A rerun builds and uploads new ones.

Suggested approach

  1. Change release-snap.yml#L45 from release=stable,candidate to release=stable.
  2. Stop publishing to the snap store when isStable is false: skip the publish step for pre-releases (for example if: ${{ inputs.isStable }} on that step) and remove the release=candidate branch at line 47. The token stays limited to stable, and RC runs no longer fail at publish.
  3. Merge, then run gh workflow run release-snap.yml -R oras-project/oras -f version=v1.3.6 -f isStable=true.
  4. Check the store shows v1.3.6 on stable for amd64, arm64 and s390x.

Related code

Activity

  1. added
    help wanted
    good first issue
    on Oct 24, 2026
  2. TerryHowe commented on Oct 24, 2026

    @TerryHowe
    MemberAuthor

    With #2295 merged, I reran release-snap from main for v1.3.6 with isStable: true: https://github.com/oras-project/oras/actions/runs/40130072247

    It passed on amd64, arm64 and s390x, and v1.3.6 is now on the stable channel for all three: https://snapcraft.io/oras

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cigood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions