-
Notifications
You must be signed in to change notification settings - Fork 370
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
The action gets stuck checking existing stale PRs without getting to new ones #792
Comments
Oh no. And that's with only ~200 issues and ~20 pull requests? I'm definitely going to run into this problem then, having ~1000 issues and ~300 pull requests. |
Hello @mezz , i thought about different strategies and none of them seems perfect to me. But what do you think about just descending sorting the issues by |
Hello @dsame , Are you able to store any state between runs, so that it can "resume" when it runs out of actions? |
We are discussing trying this in Matplotlib (>1600 open issues and > 300 open PRs). It's a little unclear what "operations-per-run" refers to - will we be making >1900 operations just to get the state of each Issue/PR? Or is it 20 operations in batches of 100? After that, is each label/close an operation? Sorry if this should be clear - not super experienced with what GH Actions consider a call or not.... Note that https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions claims Actions get 1000/h, so maybe we don't need to limit to anything as low as 30... Thanks for any help; hopefully these clarifications are not hijacking this issue. |
@mezz in theory it is possible to use the same storage that is used for caches to store the state but it will require extra API calls just to "get into the previous state" - that i want to avoid. |
I believe the first priority for the system design should be correctness, and from there we can optimize if we can. |
Chiming in with the repo where I mainly work in for my company is again running into this issue. This problem arises when folks use this to mark issues as stale, but not necessarily let the action close it. I asked a similar question back in early 2021 here: #329. Numbers: In each day's action run, it starts with the oldest issue (which has been marked stale for 1+ year now), gradually consuming API calls checking the same issues each time, then halts at around issue 32000. The newest issue is now at ~77xxx, so at the pace we're closing issues (which is manually, not using the action's auto-close feature) the bot will never catch up with the issues being filed. I'm beginning to close stale issues as it's marked by this action (after a manual review) so it would be interesting to see if that would help the action go further. |
Hello @mezz , can you please try to run the action on the main branch to make sure it solves the problem?
|
Hi @dsame, here are the results of my run with What has changed in the newer version? |
I see a strange error actually, I think things may not be quite right:
|
Hello @mezz , has the problem happened again? The error message says about the server-side problem, usually with the permissions, but it does not seem to be a case. Was not it sporadic server issue? |
I have this set up to run every hour automatically. You can see the most recent run here:
|
@mezz thank you for the quick response. Now i see the workflow lacks
Did it help? |
Hello @mezz, i am closing the issue due to inactivity, but feel free to reopen it or create the new one in case if the problem still exists. |
@dsame, this is awesome, thank you for implementing! I would love to start leveraging statefulness. When do you expect the next release to be cut? |
That would indeed be great to get a new release 🙏 |
Adding my support to the requests for a fresh release. The top-level README advertises this feature but it is not present in the latest release, which caused issues when I tried to use it. |
Describe your issue
I have a long "stale" time of 90 days, and then 30 days to close.
The stale bot uses up all my API actions on iterating over existing stale commits and checking them for comments, and it never gets to apply the stale label to everything that needs it.
I am left with a handful of issues marked stale, but many more need the label.
Your stale action configuration
https://github.com/mezz/JustEnoughItems/blob/def1bfdcba3af124de6fe78fd23ed39c7f1d41a6/.github/workflows/stale.yml#L14-L28
Further context
I think the bot needs a strategy that lets it apply stale labels first, and then check random stale commits for their comments. If the action can persist some data between runs, it would be nice for it to track which issue it left off on so that it can start from there on the next run.
The text was updated successfully, but these errors were encountered: