Skip to content

Comments

feat: default to max per page value in AllWithOpts#794

Merged
jooola merged 1 commit intomainfrom
max-per-page
Dec 19, 2025
Merged

feat: default to max per page value in AllWithOpts#794
jooola merged 1 commit intomainfrom
max-per-page

Conversation

@jooola
Copy link
Member

@jooola jooola commented Dec 18, 2025

Fixes #792

@jooola jooola requested a review from a team as a code owner December 18, 2025 13:09
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 64.61538% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.00%. Comparing base (6afa559) to head (2f15ac5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
hcloud/certificate.go 0.00% 3 Missing ⚠️
hcloud/firewall.go 0.00% 3 Missing ⚠️
hcloud/load_balancer.go 0.00% 3 Missing ⚠️
hcloud/network.go 0.00% 3 Missing ⚠️
hcloud/placement_group.go 0.00% 3 Missing ⚠️
hcloud/storage_box.go 0.00% 2 Missing and 1 partial ⚠️
hcloud/volume.go 0.00% 3 Missing ⚠️
hcloud/floating_ip.go 66.66% 1 Missing ⚠️
hcloud/zone.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   80.05%   80.00%   -0.05%     
==========================================
  Files          60       60              
  Lines        4452     4492      +40     
==========================================
+ Hits         3564     3594      +30     
- Misses        587      596       +9     
- Partials      301      302       +1     

☔ 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.

Copy link
Contributor

@phm07 phm07 left a comment

Choose a reason for hiding this comment

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

Maybe something like const MaxItemsPerPage = 50 and then using that constant instead would be nice to eliminate the magic number. But works without that as well

@jooola
Copy link
Member Author

jooola commented Dec 18, 2025

Maybe something like const MaxItemsPerPage = 50 and then using that constant instead would be nice to eliminate the magic number. But works without that as well

While we use 50 almost everywhere, it is not the true max for all list endpoints, e.g. zone rrsets allow per_page=100.

So we could use one, but it must be private.

@jooola jooola merged commit f4ecfa7 into main Dec 19, 2025
4 checks passed
@jooola jooola deleted the max-per-page branch December 19, 2025 13:51
jooola pushed a commit that referenced this pull request Dec 19, 2025
<!-- section-start changelog -->
### Features

- add update rrset records action to zone client (#773)
- deprecate datacenter in `primary ips` and `servers` (#793)
- default to max per page value in `AllWithOpts` (#794)

<!-- 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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Dec 19, 2025
…3.0 (hetznercloud/fleeting-plugin-hetzner!322)

This MR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | `v2.32.0` → `v2.33.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.33.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.32.0/v2.33.0?slim=true) |

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary>

### [`v2.33.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2330)

[Compare Source](hetznercloud/hcloud-go@v2.32.0...v2.33.0)

##### Features

- add update rrset records action to zone client ([#&#8203;773](hetznercloud/hcloud-go#773))
- deprecate datacenter in `primary ips` and `servers` ([#&#8203;793](hetznercloud/hcloud-go#793))
- default to max per page value in `AllWithOpts` ([#&#8203;794](hetznercloud/hcloud-go#794))

</details>

---

### Configuration

📅 **Schedule**: 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 is behind base branch, 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42NC4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
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.

Set maxium per page in AllWithOpts(...) instead of All(...)

3 participants