Skip to content

feat: shared container-exec primitive + Patroni probe controller - #1048

Merged
paulocsanz merged 2 commits into
masterfrom
pcs/pg-mgmt-02-exec-patroni
Aug 7, 2026
Merged

feat: shared container-exec primitive + Patroni probe controller#1048
paulocsanz merged 2 commits into
masterfrom
pcs/pg-mgmt-02-exec-patroni

Conversation

@paulocsanz

Copy link
Copy Markdown
Collaborator

Part 2/8 of the railway postgres pitr/ha/pgbouncer stack (split out of #1032 for reviewability — see that PR for the full context, live-prod e2e evidence, and the test-postgres-cli harness). Each PR is based on the previous one and is independently green (cargo test/clippy/fmt).

Promotes db_stats' private SSH exec-in-container helper to
controllers::exec so other live probes can reuse it, and adds
controllers::patroni: GET /cluster probes (per-member, joined by Patroni
member name), scripted switchover via Patroni's REST API, and service ->
live-instance resolution. All probes are best-effort with ~5s timeouts;
callers degrade to "unknown" instead of failing their command.

Part 2/8 of the railway postgres pitr/ha/pgbouncer stack.

The previous snapshot was hand-grafted per command since 2024 and had
drifted badly; worse, offline regeneration from mono's full SDL would
accept Internal-subgraph operations that /graphql/v2 (the only endpoint the
CLI ever talks to -- the dashboard uses /graphql/internal) rejects at
runtime. This snapshot is the Public subgraph's own introspection, so an
internal-graph dependency now fails at compile time, and it's serialized
with sorted keys so future regenerations diff cleanly.

Codegen fallout: SandboxCreateInput gained `region` server-side since the
old snapshot; the two construction sites initialize it to None
(skip_serializing_none omits it on the wire -- byte-identical requests).

Part 1/8 of the railway postgres pitr/ha/pgbouncer stack.
Promotes db_stats' private SSH exec-in-container helper to
controllers::exec so other live probes can reuse it, and adds
controllers::patroni: GET /cluster probes (per-member, joined by Patroni
member name), scripted switchover via Patroni's REST API, and service ->
live-instance resolution. All probes are best-effort with ~5s timeouts;
callers degrade to "unknown" instead of failing their command.

Part 2/8 of the railway postgres pitr/ha/pgbouncer stack.
@paulocsanz paulocsanz added the release/skip Author no release label Aug 7, 2026
Base automatically changed from pcs/pg-mgmt-01-public-schema to master August 7, 2026 20:52
@paulocsanz
paulocsanz merged commit 54b0ce5 into master Aug 7, 2026
2 checks passed
@paulocsanz
paulocsanz deleted the pcs/pg-mgmt-02-exec-patroni branch August 7, 2026 20:54
codyde added a commit that referenced this pull request Aug 7, 2026
* origin/master:
  feat: shared container-exec primitive + Patroni probe controller (#1048)
  chore: regenerate schema.json from the Public subgraph introspection (#1047)
  chore: Release railwayapp version 5.31.1
  test: scripted-backboard testkit + first GraphQL-layer tests (#1046)

# Conflicts:
#	src/commands/sandbox.rs
#	src/gql/schema.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/skip Author no release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant