Skip to content

Conversation

@hcloud-bot
Copy link
Collaborator

@hcloud-bot hcloud-bot commented Sep 25, 2025

Server Types now depend on Locations.

  • We added a new locations property 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 deprecation property 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

# Before
def validate_server_type(server_type: ServerType):
    if server_type.deprecation is not None:
        raise ValueError(f"server type {server_type.name} is deprecated")
# After
def validate_server_type(server_type: ServerType, location: Location):
    found = [o for o in server_type.locations if location.name == o.location.name]
    if not found:
        raise ValueError(
            f"server type {server_type.name} is not supported in location {location.name}"
        )

    server_type_location = found[0]

    if server_type_location.deprecation is not None:
        raise ValueError(
            f"server type {server_type.name} is deprecated in location {location.name}"
        )

Features


PR by releaser-pleaser 🤖

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.

[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**

```py
# Before
def validate_server_type(server_type: ServerType):
    if server_type.deprecation is not None:
        raise ValueError(f"server type {server_type.name} is deprecated")
```

```py
# After
def validate_server_type(server_type: ServerType, location: Location):
    found = [o for o in server_type.locations if location.name == o.location.name]
    if not found:
        raise ValueError(
            f"server type {server_type.name} is not supported in location {location.name}"
        )

    server_type_location = found[0]

    if server_type_location.deprecation is not None:
        raise ValueError(
            f"server type {server_type.name} is deprecated in location {location.name}"
        )
```

Suffix / End

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

@hcloud-bot hcloud-bot added the rp-release::pending Release for this PR is pending label Sep 25, 2025
@hcloud-bot hcloud-bot force-pushed the releaser-pleaser--branches--main branch 4 times, most recently from dfe2916 to c67b664 Compare September 25, 2025 08:18
@jooola
Copy link
Member

jooola commented Sep 25, 2025

Waiting for releaser-pleaser to cut a new release to fix the html escaped changelog content.

@hcloud-bot hcloud-bot force-pushed the releaser-pleaser--branches--main branch 2 times, most recently from db71f31 to f0afd83 Compare September 26, 2025 07:56
@hcloud-bot hcloud-bot force-pushed the releaser-pleaser--branches--main branch from f0afd83 to 81ca1eb Compare September 26, 2025 07:59
@jooola jooola merged commit bbee5a7 into main Sep 26, 2025
11 checks passed
@jooola jooola deleted the releaser-pleaser--branches--main branch September 26, 2025 08:02
@hcloud-bot hcloud-bot added rp-release::tagged Release for this PR is created and removed rp-release::pending Release for this PR is pending labels Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rp-release::tagged Release for this PR is created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants