Share Linux build deps via artifact, not cache#310
Merged
Conversation
The Auto-Release workflow fires on pull_request: closed and its head
ref is the (now-deleted) PR source branch — auto-merge.yml uses
`gh pr merge --delete-branch`. GitHub Actions scopes cache writes to
the workflow's head ref; with the ref already deleted by the time
Auto-Release starts, the runtime token has no writable scopes and the
save fails with:
Cache reservation failed: cache write denied: token has no writable scopes
Failed to save: Unable to reserve cache with key <run_id>-dependencies
The downstream build_linux jobs then hit "Cache not found" during
restore, tree $RELENV_DATA/download errors out, and every Linux entry
fails. That's what killed the 0.22.17 release run (28422611083). The
same run on pr.yml's push-to-main path (28422611021) worked because
main is a real ref with a valid cache scope.
Artifacts are scoped to the run_id, not a branch ref, so branch
deletion doesn't affect them. Swap the actions/cache pair for
actions/upload-artifact + actions/download-artifact:
- retention-days: 1 keeps the artifact tiny in storage
- if-no-files-found: error catches the case where --download-only
silently produced nothing
Behaviour is identical for the pr.yml path (both cache and artifact
work there); the Auto-Release path stops failing.
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.
The Auto-Release workflow fires on pull_request: closed and its head ref is the (now-deleted) PR source branch — auto-merge.yml uses
gh pr merge --delete-branch. GitHub Actions scopes cache writes to the workflow's head ref; with the ref already deleted by the time Auto-Release starts, the runtime token has no writable scopes and the save fails with:The downstream build_linux jobs then hit "Cache not found" during restore, tree $RELENV_DATA/download errors out, and every Linux entry fails. That's what killed the 0.22.17 release run (28422611083). The same run on pr.yml's push-to-main path (28422611021) worked because main is a real ref with a valid cache scope.
Artifacts are scoped to the run_id, not a branch ref, so branch deletion doesn't affect them. Swap the actions/cache pair for actions/upload-artifact + actions/download-artifact:
Behaviour is identical for the pr.yml path (both cache and artifact work there); the Auto-Release path stops failing.