Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stale: enable cache #22701

Closed
wants to merge 1 commit into from
Closed

Conversation

ericLemanissier
Copy link
Contributor

only 30 PRs are processed per day, so cache is needed to keep state and continue from the last PRs of the last days.

fixes error https://github.com/conan-io/conan-center-index/actions/runs/7810903828/job/21305055330#step:2:1032

state: persisting info about 250 issue(s)
Warning: Error delete _state: [403] Resource not accessible by integration
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/conan-center-index/conan-center-index --files-from manifest.txt --use-compress-program zstdmt
Failed to save: Unable to reserve cache with key _state, another job may be creating this cache. More details: Cache already exists. Scope: refs/heads/master, Key: _state, Version: fa41d75081481069cfb6b92a5f83a94c6e06ef3ab2e6b762649ac5f86f46153f

cf actions/stale#1090 (comment)


only 30 PRs are processed per day, so cache is needed to keep state and continue from the last PRs of the last days.
Copy link
Contributor

github-actions bot commented Feb 7, 2024

🤖 Beep Boop! This pull request is making changes to '.github//'.

👋 @ericLemanissier @Croydon you might be interested. 😉

@ericLemanissier
Copy link
Contributor Author

AFAIU, the error happens on this line because the DELETE verb on an action cache needs actions:write to use this endpoint : https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

I'm not happy with this change, because it will give a whole write access. A second option would be running all PRs, but we have +600 now and it would reach out Github API rate limit.

On the other hand, this is an official Action maintained by Github, so I only fell safe because of this.

Still, I prefer waiting for actions/stale#1133, because more projects are affected because of this problem.

@uilianries uilianries added the help wanted Need some help to be finish label Feb 7, 2024
@ericLemanissier
Copy link
Contributor Author

To be clear, it gives write access only to the endpoints listed in this "Actions" section: https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens?apiVersion=2022-11-28#repository-permissions-for-actions, not full write access to everything in the repo.

I think we could process more PRs per run. AFAIU, operations are consumed only when pull requests are marked stale or closed. according to https://github.com/conan-io/conan-center-index/actions/runs/7810903828/job/21305055330#step:2:480, marking a PR stales costs 4 operations, and each batch of 100 PRs/issues inspected costs one operation. This means that we will in term still process all PRs even without cache.
According to this log, we have 15000 operations granted by github

@uilianries
Copy link
Member

@ericLemanissier Yes, I read the documentation. Still, the author is aware about and more repositories are being affected. I would prefer waiting for a real fix than trying a workaround which would give more permissions now. Thank you for giving more context about the situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub config help wanted Need some help to be finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants