Skip to content

Conversation

@olblak
Copy link
Member

@olblak olblak commented Oct 1, 2025

fix: #5323

When the GitHub token used by Updatecli is running out of API request, then Updatecli sleep until the reset time.
This is especially useful in the context of udash where we execute a significant amount of Updatecli pipelines to monitor the various git repositories.

Test

This pull request was tested manually

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Using a sleep could mean wasting compute resources, such as the machine running Updatecli while the process is sleeping.
We could introduce an environment variable to disable this behavior

Potential improvement

@olblak olblak added scm-github SCM of type GiHhub enhancement New feature or request ux labels Oct 1, 2025
@olblak olblak requested a review from Copilot October 2, 2025 04:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Implements automatic rate limit handling for GitHub API exhaustion by adding sleep functionality when API requests are depleted. The change prevents immediate failures when hitting GitHub's rate limits and automatically resumes processing after the reset time.

  • Adds sleep functionality when GitHub API rate limit is reached (remaining = 0)
  • Replaces the previous warning-only approach with automatic waiting until reset time
  • Simplifies the rate limit display logic by removing the conditional warning for low credits

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@olblak olblak changed the title fix: sleep on when GitHub api is exhausted fix: pause Updatecli when running out of GitHub API limit Oct 3, 2025
olblak added 6 commits October 3, 2025 14:45
* make a http request to only retrieve the rate limit if the previous
request failed due to api limit exceeded
* fix the monitor error mesage

Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
Fix updatecli#5323
Sometimes a git pull doesn't detect immediately git commit created via the GitHub api
So we try to pull multiple times

This commit also fixes the rate limit mutation within the create commit api call
by removing wront graphql variable

Signed-off-by: Olblak <[email protected]>
@olblak olblak requested a review from Copilot October 7, 2025 07:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@olblak olblak requested a review from Copilot October 7, 2025 07:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@olblak olblak requested a review from Copilot October 7, 2025 07:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@olblak olblak requested a review from Copilot October 8, 2025 18:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@olblak olblak enabled auto-merge (squash) October 8, 2025 18:07
@olblak olblak merged commit 4eba48a into updatecli:main Oct 8, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scm-github SCM of type GiHhub ux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

updatecli fails to commit with commitusingapi due to a stale HEAD reference

1 participant