Skip to content

feat: increase default poll interval for long running actions#1364

Merged
jooola merged 2 commits intomainfrom
increase-poll-interval-on-long-actions
Mar 18, 2026
Merged

feat: increase default poll interval for long running actions#1364
jooola merged 2 commits intomainfrom
increase-poll-interval-on-long-actions

Conversation

@jooola
Copy link
Member

@jooola jooola commented Mar 17, 2026

By default, if an actions takes more than 5 seconds, gradually increase the poll interval from 500ms to a maximum of 2.5s.

This will reduce the amount of API request made for long running actions, also reducing the chances to run into the API requests rate limit.

If you need a constant poll interval, consider setting the --poll-interval flag to the desired value.

If an actions takes more than 5 seconds, gradually increase the poll interval from 500ms to a maximum of 2.5s.
@jooola jooola requested a review from a team as a code owner March 17, 2026 17:45
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.56%. Comparing base (8e903bb) to head (f758f38).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/state/state.go 87.50% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1364      +/-   ##
==========================================
- Coverage   72.57%   72.56%   -0.01%     
==========================================
  Files         300      300              
  Lines       10989    11004      +15     
==========================================
+ Hits         7975     7985      +10     
- Misses       2125     2128       +3     
- Partials      889      891       +2     
Flag Coverage Δ
e2e 51.54% <87.50%> (+0.05%) ⬆️
unit 67.48% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jooola
Copy link
Member Author

jooola commented Mar 17, 2026

Too many tickets about API rate limit increase show a huge amount of request coming from the CLI polling for running actions. This changes the default with the hope to keep the CLI snappy for fast running actions, but without exhausting all the API requests for long running actions.

The exponential backoff function being capped to max 2.5s, it should still feel "snappy" even for long running actions, while cutting the amount of API request by ~x5.

@jooola jooola requested review from apricote and phm07 March 17, 2026 17:48
Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
@jooola jooola changed the title feat: increase poll interval for long running actions feat: increase default poll interval for long running actions Mar 18, 2026
@jooola jooola merged commit 52834ed into main Mar 18, 2026
7 checks passed
@jooola jooola deleted the increase-poll-interval-on-long-actions branch March 18, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants