-
Notifications
You must be signed in to change notification settings - Fork 51
feat: per locations server types #730
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## sliceutill #730 +/- ##
==============================================
+ Coverage 79.26% 79.61% +0.34%
==============================================
Files 51 52 +1
Lines 4428 4503 +75
==============================================
+ Hits 3510 3585 +75
Misses 703 703
Partials 215 215 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9ad54a7 to
6cb0144
Compare
lukasmetzner
approved these changes
Sep 25, 2025
[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. **Upgrading** ```go // Before func ValidateServerType(serverType *hcloud.ServerType) error { if serverType.IsDeprecated() { return fmt.Errorf("server type %s is deprecated", serverType.Name) } return nil } ``` ```go // After func ValidateServerType(serverType *hcloud.ServerType, location *hcloud.Location) error { serverTypeLocationIndex := slices.IndexFunc(serverType.Locations, func(e hcloud.ServerTypeLocation) bool { return e.Location.Name == location.Name }) if serverTypeLocationIndex < 0 { return fmt.Errorf("server type %s is not supported in location %q", serverType.Name, location.Name) } if serverType.Locations[serverTypeLocationIndex].IsDeprecated() { return fmt.Errorf("server type %q is deprecated in location %q", serverType.Name, location.Name) } return nil } ``` Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
6cb0144 to
156be43
Compare
jooola
pushed a commit
that referenced
this pull request
Sep 25, 2025
<!-- section-start changelog --> [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. #### Upgrading ```go // Before func ValidateServerType(serverType *hcloud.ServerType) error { if serverType.IsDeprecated() { return fmt.Errorf("server type %s is deprecated", serverType.Name) } return nil } ``` ```go // After func ValidateServerType(serverType *hcloud.ServerType, location *hcloud.Location) error { serverTypeLocationIndex := slices.IndexFunc(serverType.Locations, func(e hcloud.ServerTypeLocation) bool { return e.Location.Name == location.Name }) if serverTypeLocationIndex < 0 { return fmt.Errorf("server type %s is not supported in location %q", serverType.Name, location.Name) } if serverType.Locations[serverTypeLocationIndex].IsDeprecated() { return fmt.Errorf("server type %q is deprecated in location %q", serverType.Name, location.Name) } return nil } ``` ### Features - **exp**: add `sliceutil.Transform` function (#731) - per locations server types (#730) <!-- 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 [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. #### Upgrading ```go // Before func ValidateServerType(serverType *hcloud.ServerType) error { if serverType.IsDeprecated() { return fmt.Errorf("server type %s is deprecated", serverType.Name) } return nil } ``` ```go // After func ValidateServerType(serverType *hcloud.ServerType, location *hcloud.Location) error { serverTypeLocationIndex := slices.IndexFunc(serverType.Locations, func(e hcloud.ServerTypeLocation) bool { return e.Location.Name == location.Name }) if serverTypeLocationIndex < 0 { return fmt.Errorf("server type %s is not supported in location %q", serverType.Name, location.Name) } if serverType.Locations[serverTypeLocationIndex].IsDeprecated() { return fmt.Errorf("server type %q is deprecated in location %q", serverType.Name, location.Name) } return nil } ``` ``` ### 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
Sep 25, 2025
…5.0 (hetznercloud/fleeting-plugin-hetzner!281) This MR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | `v2.24.0` -> `v2.25.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary> ### [`v2.25.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2250) [Compare Source](hetznercloud/hcloud-go@v2.24.0...v2.25.0) [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. ##### Upgrading ```go // Before func ValidateServerType(serverType *hcloud.ServerType) error { if serverType.IsDeprecated() { return fmt.Errorf("server type %s is deprecated", serverType.Name) } return nil } ``` ```go // After func ValidateServerType(serverType *hcloud.ServerType, location *hcloud.Location) error { serverTypeLocationIndex := slices.IndexFunc(serverType.Locations, func(e hcloud.ServerTypeLocation) bool { return e.Location.Name == location.Name }) if serverTypeLocationIndex < 0 { return fmt.Errorf("server type %s is not supported in location %q", serverType.Name, location.Name) } if serverType.Locations[serverTypeLocationIndex].IsDeprecated() { return fmt.Errorf("server type %q is deprecated in location %q", serverType.Name, location.Name) } return nil } ``` ##### Features - **exp**: add `sliceutil.Transform` function ([#​731](hetznercloud/hcloud-go#731)) - per locations server types ([#​730](hetznercloud/hcloud-go#730)) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzAuMSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Server Types now depend on Locations.
We added a new
locationsproperty to the Server Types resource. The new property defines a list of supported Locations and additional per Locations details such as deprecations information.We deprecated the
deprecationproperty from the Server Types resource. The property will gradually be phased out as per Locations deprecations are being announced. Please use the new per Locations deprecation information instead.See our changelog for more details.
Upgrading