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

Feature request: option to limit mutations per run #495

Closed
dfawley opened this issue Jun 7, 2021 · 14 comments
Closed

Feature request: option to limit mutations per run #495

dfawley opened this issue Jun 7, 2021 · 14 comments
Labels
enhancement New feature or request Stale

Comments

@dfawley
Copy link

dfawley commented Jun 7, 2021

Forked from #466.

There is an option today that limits the number of operations per run, which limits all github API operations, including reads. However, I would like an option to limit the number of mutations.

Justification:

  1. setting the current option to anything other than "unlimited" (or 9999999) means potentially never making it through checking all the issues/PRs, even if no mutations have been performed. This means if an issue appears late in the list that does require an action, it may never be updated.

  2. allowing the tool to make unlimited changes is problematic in the event of a bug or misconfiguration. For http://github.com/grpc/grpc-go, we very much would like to limit it to something like one operation mutation per hour or so.

cc @C0ZEN

@dfawley dfawley added the enhancement New feature or request label Jun 7, 2021
@C0ZEN
Copy link
Contributor

C0ZEN commented Jun 7, 2021

I agree with the first statement however I don't see the usefulness of this option (I know it's weird because we already talked about it but rethinking this again makes me wonder).

Let's say that you have one option to define the queries and one that define the mutations.
Even if the action can query every issue, to be properly processed it will require mutating by calling the API.
Both operations come from the same limit set by the GitHub API.
I do not see any solution to address this.

Also, I don't get the second point because one operation per run would make the action completely useless.
Waiting your feedbacks 🙏🏻

@dfawley
Copy link
Author

dfawley commented Jun 7, 2021

Also, I don't get the second point because one operation per run would make the action completely useless

Sorry: "1 mutation per run (hourly)" is what I intended, not "operation". This would allow all issues & PRs to be inspected, but only one of them to be updated. This would prevent a bad configuration or a bug in the stale bot from potentially impacting every issue/PR in our repo.

Let's say that you have one option to define the queries and one that define the mutations.
Even if the action can query every issue, to be properly processed it will require mutating by calling the API.
Both operations come from the same limit set by the GitHub API.

The idea would be to set "operations" very high but "mutations" to something very low to provide a safety net for the issues & PRs in the repo. On average, in steady-state, if done hourly, most runs should need to update zero or one issue.

@C0ZEN
Copy link
Contributor

C0ZEN commented Jun 8, 2021

@dfawley oh yeah it totally makes sense to me now, thanks!
It's a good thing as well for those who prefer frequent process instead of the recommended one which is once per day.

@dfawley
Copy link
Author

dfawley commented Jun 8, 2021

Even with a daily run, it's almost always the case that there are many more issues that need to be inspected than need actions. If we had to run only once per day, I'd set operations to a very high value but limit mutations to 5 or so. 2-3 issues touched per day is the max I'd actually expect to happen, so this would allow for that while also limiting on the damage the action could cause based on a typo in my config, etc.

@C0ZEN
Copy link
Contributor

C0ZEN commented Jun 8, 2021

I started to work on a PR and I will finish the work this week.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2021

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

@github-actions github-actions bot added the Stale label Jul 9, 2021
@C0ZEN
Copy link
Contributor

C0ZEN commented Jul 9, 2021

up

@github-actions github-actions bot removed the Stale label Jul 10, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2021

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

@github-actions github-actions bot added the Stale label Aug 9, 2021
@C0ZEN
Copy link
Contributor

C0ZEN commented Aug 9, 2021

up

@github-actions github-actions bot removed the Stale label Aug 10, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

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

@github-actions github-actions bot added the Stale label Sep 9, 2021
@C0ZEN
Copy link
Contributor

C0ZEN commented Sep 9, 2021

up

@github-actions github-actions bot removed the Stale label Sep 10, 2021
@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

@github-actions github-actions bot added the Stale label Oct 10, 2021
@C0ZEN
Copy link
Contributor

C0ZEN commented Oct 10, 2021

up

@github-actions github-actions bot removed the Stale label Oct 11, 2021
@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

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

Successfully merging a pull request may close this issue.

2 participants