Skip to content

gh-140279: Stale workflow needs 'actions: write' to update its own cache#148165

Merged
hugovk merged 1 commit intopython:mainfrom
hugovk:3.15-stale-permissions
Apr 6, 2026
Merged

gh-140279: Stale workflow needs 'actions: write' to update its own cache#148165
hugovk merged 1 commit intopython:mainfrom
hugovk:3.15-stale-permissions

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 6, 2026

Looking at the last three stale runs:

They all process the same batch:

Processing the batch of issues  #1  containing  100  issues...
::group::[#37883] Issue #37883
[#37883] Issue #37883
##[debug]state: mark 37883 as processed
...
::group::[#13536] Pull request #13536
[#13536] Pull request #13536
##[debug]state: mark 13536 as processed
Warning: No more operations left! Exiting...
Warning: If you think that not enough issues were processed you could try to increase the quantity related to the  operations-per-run (​[https://github.com/actions/stale#operations-per-run​)](https://github.com/actions/stale#operations-per-run%E2%80%8B))  option which is currently set to  120
Statistics:
Processed items: 2498
├── Processed issues: 2446
└── Processed PRs   : 52
Fetched items: 2600
Fetched items events: 47
Fetched items comments: 47
Operations performed: 120

This is because it fails to update its own cache:

state: persisting info about 2561 issue(s)
##[debug]remove cache "_state"
Warning: Error delete _state: [403] Resource not accessible by integration - https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key
##[debug]Cache service version: v2
##[debug]Checking zstd --quiet --version
##[debug]1.5.7
##[debug]zstd version: 1.5.7
##[debug]implicitDescendants 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'false'
##[debug]matchDirectories 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]excludeHiddenFiles 'false'
##[debug]Search path '/tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03'
##[debug]Matched: ../../../../../tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03
##[debug]Cache Paths:
##[debug]["../../../../../tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03"]
##[debug]Archive Path: /home/runner/work/_temp/182ce2b9-beec-48f1-8a39-01885e86ce30/cache.tzst
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/cpython/cpython --files-from manifest.txt --use-compress-program zstdmt
/usr/bin/tar -tf /home/runner/work/_temp/182ce2b9-beec-48f1-8a39-01885e86ce30/cache.tzst -P --use-compress-program unzstd
../../../../../tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03/
../../../../../tmp/56acbeaa-1fef-4c79-8f84-7565e560fb03/state.txt
##[debug]File Size: 5712
##[debug]Reserving Cache
##[debug][Request] CreateCacheEntry https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/CreateCacheEntry
##[debug][Response] - 409
##[debug]Headers: {
##[debug]  "content-length": "98",
##[debug]  "content-type": "application/json",
##[debug]  "date": "Mon, 06 Apr 2026 12:15:29 GMT",
##[debug]  "x-github-backend": "Kubernetes",
##[debug]  "x-github-request-id": "C440:1E9CFA:222389D:28AADDD:69D3A3E0"
##[debug]}
##[debug]Body: {
##[debug]  "code": "already_exists",
##[debug]  "msg": "cache entry with the same key, version, and scope already exists"
##[debug]}
##[debug]Failed to reserve cache: Error: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists
Failed to save: Unable to reserve cache with key _state, another job may be creating this cache.

According to actions/stale#1133 (comment) it needs actions: write to update the cache.

Then the next run should be able to process the next batch.

@hugovk hugovk added the infra CI, GitHub Actions, buildbots, Dependabot, etc. label Apr 6, 2026
@StanFromIreland
Copy link
Copy Markdown
Member

You can put this under #140279 (which seeks to improve its effectiveness).

@hugovk hugovk changed the title Stale workflow needs 'actions: write' to update its own cache gh-140279: Stale workflow needs 'actions: write' to update its own cache Apr 6, 2026
@hugovk hugovk removed the skip issue label Apr 6, 2026
@hugovk hugovk enabled auto-merge (squash) April 6, 2026 12:49
@hugovk hugovk merged commit 36f15ba into python:main Apr 6, 2026
62 checks passed
@hugovk hugovk deleted the 3.15-stale-permissions branch April 6, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra CI, GitHub Actions, buildbots, Dependabot, etc. skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants