Skip to content

Report Postgres restart API failures instead of success - #60

Open
puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/check-postgres-restart-response-20261029
Open

puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/check-postgres-restart-response-20261029

Conversation

@puncsky

@puncsky puncsky commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Read the typed RestartPostgres response before applying the shared API error helper. An API refusal now propagates through the repository and the restart command.

Motivation

The raw response did not expose the generated JSON error fields expected by ErrorFromResponse, so a refused Postgres restart could print success. Successful 200/202 responses and transport failures retain their behavior.

How to verify

go test ./cmd/... ./pkg/... ./internal/...
  • All 57 development packages pass on the candidate.
  • Repository tests cover 400/404/409/429/500/503, transport failures and 200/202; command tests cover refusal in JSON/YAML/text and the service-restart control. Reverting the response-method change fails the API-error regression.
  • New-code lint is clean against c31e586e; full lint on unmodified main reports 92 pre-existing findings with the pinned golangci-lint v2.14.0.

Release notes

Postgres restart reports API failures instead of claiming the resource restarted successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant