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

randomize ordering when operations-per-run is in effect #692

Closed
bgehman opened this issue Mar 14, 2022 · 3 comments
Closed

randomize ordering when operations-per-run is in effect #692

bgehman opened this issue Mar 14, 2022 · 3 comments
Labels
enhancement New feature or request Stale

Comments

@bgehman
Copy link

bgehman commented Mar 14, 2022

The problem

operations-per-run is handy to not run up against the github api rate-limiter, however, every time the action runs: it tries to process the same (default 30) issues that it did on the prior runs. This has the affect that the stale-bot is not making progress on large backlogs over time.

The solution

Prefer to randomize the ordering, so that operations-per-run randomly picks which issues to process. This will have the effect of eventually (randomly) seeing every issue, instead of always only looking at the first (or last) 30 issues by default provided by the operations-per-run and ascending config settings. Thanks.

@bgehman bgehman added the enhancement New feature or request label Mar 14, 2022
@leonardehrenfried
Copy link

I'm facing the same issue. I'm wondering if a PR would be accepted. A quick look at the code suggests that this could be the place to change it: https://github.com/actions/stale/blob/main/src/classes/issues-processor.ts#L534-L559

amcaplan added a commit to Shopify/shopify-cli that referenced this issue Mar 22, 2022
It seems that 90 operations gives 23 issues, but then we'll end up repeatedly checking those same issues per actions/stale#692

So this ups the number to 200 which might be fast enough to at least tread water on our backlog.

Hopefully if we can eventually get a randomized order, we can stale more quickly with fewer operations.
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@sakiskaliak
Copy link

I am wondering if actually starting with the oldest PRs would fix this, without a need to randomize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

3 participants