Repository navigation
fix: respect ephemeral service persistence in doctor - #217
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation matches the issue requirements and includes focused regression and command-output coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Updates ob doctor to treat explicitly ephemeral services as healthy without implying backup availability.
Changes:
- Reports ephemeral services as passing with
available: false. - Preserves warnings for durable/default services and mixed projects.
- Adds regression tests and documents the behavior.
| File | Description |
|---|---|
cmd/ob/doctor.go |
Handles ephemeral service persistence correctly. |
cmd/ob/doctor_persistence_test.go |
Tests persistence modes and output formats. |
site/src/content/docs/guides/back-up-a-database.mdx |
Documents doctor’s persistence behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Report an explicitly ephemeral managed service as a pass in
ob doctorinstead of warning about unprotected durable data and advising the operator to declare a backup. Keep the service in the inventory and keepavailable: false: a pass does not mean a backup exists. The passing summary describes the checks without claiming backup mechanisms are available.Durable/default services retain their warning, declared backup policies retain their pass and repository-status guidance, and mixed projects still warn about actual durability gaps. The website backup guide documents the distinction.
Closes #151.
Why this is correct
Regression tests load real v1alpha2 manifests using authored
EphemeralandDurableenums. They failed before the fix and now exercise ephemeral, durable, default, mixed, and declared-backup cases. Full human and JSON command tests confirm an ephemeral-only project no longer raises the overall warning. Independent local agent review and Copilot review found no issues.Validation: targeted regressions and
just cipass locally, including all Go tests, vet, lint, vulnerability/workflow checks, generated references, and website build. All five GitHub CI checks pass on the current commit, including Docker E2E and native Linux/macOS/Windows smoke tests. Docker/remote-host E2E was not run locally; doctor evaluates the local declaration without contacting a host.Effect on the safety envelope
None. This corrects a local diagnostic; it changes no persistence, backup, or host operation.
Checklist
just checkpasses locally (included injust ci).just checkverifies this).