From 016068b966a5e45a24c18abafd7aa748775aab1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Tue, 1 Apr 2025 14:39:10 +0200 Subject: [PATCH] API spec: add safekeepers field returned by storcon (#11385) Add an optional `safekeepers` field to `TimelineInfo` which is returned by the storcon upon timeline creation if the `--timelines-onto-safekeepers` flag is enabled. It contains the list of safekeepers chosen. Other contexts where we return `TimelineInfo` do not contain the `safekeepers` field, sadly I couldn't make this more type safe like done in Rust via `TimelineCreateResponseStorcon`, as there is no way of flattening or inheritance (and I don't that duplicating the entire type for some minor type safety improvements is worth it). The storcon side has been done in #11058. Part of https://github.com/neondatabase/cloud/issues/16176 cc https://github.com/neondatabase/cloud/issues/16796 --- pageserver/src/http/openapi_spec.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pageserver/src/http/openapi_spec.yml b/pageserver/src/http/openapi_spec.yml index 8b839b454a..566086c527 100644 --- a/pageserver/src/http/openapi_spec.yml +++ b/pageserver/src/http/openapi_spec.yml @@ -1133,6 +1133,40 @@ components: applied_gc_cutoff_lsn: type: string format: hex + safekeepers: + $ref: "#/components/schemas/TimelineSafekeepersInfo" + + TimelineSafekeepersInfo: + type: object + required: + - tenant_id + - timeline_id + - generation + - safekeepers + properties: + tenant_id: + type: string + format: hex + timeline_id: + type: string + format: hex + generation: + type: integer + safekeepers: + type: array + items: + $ref: "#/components/schemas/TimelineSafekeeperInfo" + + TimelineSafekeeperInfo: + type: object + required: + - id + - hostname + properties: + id: + type: integer + hostname: + type: string SyntheticSizeResponse: type: object