Public: anyone can read this; the crew can change it.

Hetzner places: read stock from server_types and cities from locations, since /datacenters answers 410 #16509

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Hetzner can't be picked on New forge: production's Places catalog has 277 places and 0 Hetzner. No Hetzner read has ever been stored. Verified on production on 2026-11-26 with the forge's own token: GET /v1/datacenters answers 410 deprecatedapiendpoint, "API functionality was removed" (Hetzner changelog 2026-06-02).

Notes

shipped production is serving it deploy 85dd524

opened this

Hetzner can't be picked on New forge: production's Places catalog has 277 places and 0 Hetzner. No Hetzner read has ever been stored. Verified on production on 2026-11-26 with the forge's own token:

  • GET /v1/datacenters answers 410 deprecated_api_endpoint, "API functionality was removed" (Hetzner changelog 2026-06-02). readPlaces gives up on the first non-ok answer, so the whole read is dropped. The cloud audit shows /server_types then /datacenters, and never /pricing.
  • /server_types, /locations and /pricing answer 200. Each server type now carries locations[] with available and deprecation, and prices[] per location.

The change:

  • The read is /server_types + /locations + /pricing.
  • hetznerPlaces takes stock from server_types[].locations[].available, the price per location from server_types[].prices, and the city and country from /locations.
  • A size or location Hetzner is retiring is listed but can't be ordered, and says why.
  • ARM, missing-price and missing-rate places stay listed but can't be ordered, as before.
  • A stored body in the old shape yields no places and doesn't throw; the next refresh replaces it.
  • The driver already creates servers and volumes with location, so it is unchanged.

Stock today, from the live read: the cx line is sold out everywhere. cpx12/22 are in stock in fsn1/nbg1/hel1/sin, and cpx11/21 in ash/hil. With #16507's fallback, Hetzner's default becomes its cheapest orderable US place.

Tests (Bun 1.4.2): 435 pass, 0 fail, across places*, pinned*, new-forge*, order-cloud, one-door, page-budget, pages-budget, tui-places, warm, own-forge, design-lint and doorless. New tests cover the new shape (a sold-out cx23-like entry and a deprecated location), an old stored body, and a read that never calls /datacenters. No type errors in the touched files.

Review

  • Go: /api/v1/places as an admin, after the next refresh (at most 6 hours, or sooner after a failed try).
  • Look: Hetzner places listed with cities. cpx sizes orderable where Hetzner has stock; cx says "sold out at this location right now".
  • Expect: /forges/new shows Hetzner Cloud as selectable, with a place and a price.

🤖 Generated with Claude Code

Approved

Reads stock and price from /server_types and city/country from /locations, never calls /datacenters, and the driver already sends location. Tests cover the 410 case, a stock deprecation, and an old kept body with no locations. The docs are updated in docs/features, not README. Two things I would do next: (1) add a test for a type-level deprecation (only the per-location one is covered), and for a size with no locations entry for a priced location, which now reads as sold out; (2) until the first refresh after deploy, a kept body that still has datacenters lists nothing, so say in the pull or the doc that an admin read with a write-scoped token should refresh once, or have the read treat a kept body without locations as stale.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs