Skip to content

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

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

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

Conversation

@jooola
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Comment thread internal/state/state.go
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
phm07 pushed a commit that referenced this pull request Mar 20, 2026
<!-- section-start changelog -->
### Features

- build .deb and .rpm release files (#1311)
- **primary-ip**: new flag to specify assignee-type on primary-ip create
(#1348)
- increase default poll interval for long running actions (#1364)
- **server-type**: add `location` to list table default columns (#1340)
- **server-type**: remove `storage_type` from list table default columns
(#1340)
- allow listing contexts as json/yaml (#1352)
- add --long flag to version command (#1353)

### Bug Fixes

- suppress trailing spaces in tables (#1355)

<!-- section-end changelog -->

---

<details>
<summary><h4>PR by <a
href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a>
🤖</h4></summary>

If you want to modify the proposed release, add you overrides here. You
can learn more about the options in the docs.

## Release Notes

### Prefix / Start

This will be added to the start of the release notes.

~~~~rp-prefix
~~~~

### Suffix / End

This will be added to the end of the release notes.

~~~~rp-suffix
~~~~

</details>

Co-authored-by: Hetzner Cloud Bot <>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 8, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [hcloud](https://github.com/hetznercloud/cli) | minor | `1.61.0` → `1.64.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>hetznercloud/cli (hcloud)</summary>

### [`v1.64.1`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1641)

[Compare Source](hetznercloud/cli@v1.64.0...v1.64.1)

##### Bug Fixes

- apple's signing and notarizing release pipeline

### [`v1.64.0`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1640)

[Compare Source](hetznercloud/cli@v1.63.0...v1.64.0)

##### Primary IPs `assignee_type` behavior change

When creating a Primary IP with the `primary-ip` command, the `--assignee-type` flag will be required together with the `--assignee-id` flag. Using the default value (`server`) for the `--assignee-type` flag is deprecated. Consider explicitly setting the `--assignee-type` flag.

As of 1 August 2026, the behavior of the Primary IP `assignee_type` property will change, and will return `unassigned` when the Primary IP is not assigned (when `assignee_id` is `null`). The goal is to eventually assign Primary IPs to other resource types, not only to `server`.

See the [changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-will-return-unassigned) for more details.

In addition, the Primary IP request body `assignee_type` property of the operation [`POST /v1/primary_ips`](https://docs.hetzner.cloud/reference/cloud#tag/primary-ips/create_primary_ip) is now optional. Primary IPs created without `assignee_type` return `server` until 1 August 2026, after this date, its value will be `unassigned`.

See the [changelog](https://docs.hetzner.cloud/changelog#2026-04-27-primary-ips-make-assignee_type-optional) for more details.

##### Features

- **primary-ip**: `--assignee-type` is optional when creating a Primary IP ([#&#8203;1395](hetznercloud/cli#1395))

### [`v1.63.0`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1630)

[Compare Source](hetznercloud/cli@v1.62.2...v1.63.0)

##### Available and recommended Server Types have been moved

- The Server Types list in `hcloud datacenter describe` is deprecated and will not be displayed anymore after 2026-10-01. The two commands below should be used for this purpose instead.
- `hcloud server-type describe` now shows an `Available` and `Recommended` value for each location.
- `hcloud server-type list` now has additional columns `location_available` and  `location_recommended`.

See the [changelog](https://docs.hetzner.cloud/changelog#2026-04-01-datacenter-deprecations) for more details.

##### Features

- **datacenter, server-type**: move available and recommended to server\_type ([#&#8203;1384](hetznercloud/cli#1384))

### [`v1.62.2`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1622)

[Compare Source](hetznercloud/cli@v1.62.1...v1.62.2)

##### Bug Fixes

- invalid goreleaser artifacts name for signing step ([#&#8203;1380](hetznercloud/cli#1380))

### [`v1.62.1`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1621)

[Compare Source](hetznercloud/cli@v1.62.0...v1.62.1)

##### Bug Fixes

- **server-type**: do not print locations that are unavailable (after deprecation) ([#&#8203;1369](hetznercloud/cli#1369))
- long version info not displayed correctly in release builds ([#&#8203;1374](hetznercloud/cli#1374))
- only generate signature for `checksums.txt` release asset ([#&#8203;1366](hetznercloud/cli#1366))

### [`v1.62.0`](https://github.com/hetznercloud/cli/blob/HEAD/CHANGELOG.md#v1620)

[Compare Source](hetznercloud/cli@v1.61.0...v1.62.0)

##### Features

- build .deb and .rpm release files ([#&#8203;1311](hetznercloud/cli#1311))
- **primary-ip**: new flag to specify assignee-type on primary-ip create ([#&#8203;1348](hetznercloud/cli#1348))
- increase default poll interval for long running actions ([#&#8203;1364](hetznercloud/cli#1364))
- **server-type**: add `location` to list table default columns ([#&#8203;1340](hetznercloud/cli#1340))
- **server-type**: remove `storage_type` from list table default columns ([#&#8203;1340](hetznercloud/cli#1340))
- allow listing contexts as json/yaml ([#&#8203;1352](hetznercloud/cli#1352))
- add --long flag to version command ([#&#8203;1353](hetznercloud/cli#1353))

##### Bug Fixes

- suppress trailing spaces in tables ([#&#8203;1355](hetznercloud/cli#1355))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjguNSIsInVwZGF0ZWRJblZlciI6IjQzLjE2OC41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
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