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

Prolong PR check delay for inactive PRs #4425

Closed
premun opened this issue Feb 6, 2025 · 4 comments
Closed

Prolong PR check delay for inactive PRs #4425

premun opened this issue Feb 6, 2025 · 4 comments
Assignees

Comments

@premun
Copy link
Member

premun commented Feb 6, 2025

Context

We are getting rate-limited by GitHub and in order to lower the amount of requests, we can lower the amount of times we check open PRs. Specifically, it seems unnecessary to check all PRs every 5 minutes even when they had no action taken on them for a very long time (even months).
The GitHub API returns a field UpdatedAt or something like that which sounds suitable. We need to read the docs what all this entails.

Goal

Prolong the delay between PR checks for GitHub PRs that have been inactive for very long time.

Something like this:

  • Default is 5 minutes
  • > week - 15 minutes
  • > 2 weeks - 30 minutes
  • > 3 weeks - 1 hour
  • > month - 12 hours
@dkurepa
Copy link
Member

dkurepa commented Feb 10, 2025

Both GitHub and AzDo APIs have some sort of "last update at" property when fetching a Pull Request, altho they differ:

  • On GitHub the updated_at property changes every time there is a change in the PR, this can either a new commit, a comment, a new label, basically anything. This is a good indicator that the PR is being actively worked on.
  • On Azdo, there's lastMergeCommit, which isn't really equivalent to this, and tells us just when the last commit in the PR happened, but the times in the API response seem to differ from the times the UI is showing. Since we currently only have a problem with GitHub, we could just proceed as we're used to with AzDo checks

@dkurepa dkurepa self-assigned this Feb 11, 2025
dkurepa added a commit that referenced this issue Feb 11, 2025
#4440)

#4425

<!-- Link the GitHub or AzDO issue this pull request is associated with.
Please copy and paste the full URL rather than using the
dotnet/arcade-services# syntax -->
@premun
Copy link
Member Author

premun commented Feb 11, 2025

Seems like the Scenario Tests are failing since this was merged

@dkurepa
Copy link
Member

dkurepa commented Feb 11, 2025

yeah, something is up with AzDo

dkurepa added a commit that referenced this issue Feb 12, 2025
<!-- Link the GitHub or AzDO issue this pull request is associated with.
Please copy and paste the full URL rather than using the
dotnet/arcade-services# syntax -->
#4425
@dkurepa
Copy link
Member

dkurepa commented Feb 18, 2025

I fixed issues with AzDo Scenario Tests in the PR above

@dkurepa dkurepa closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants