SEP-1787: Validate the PostgreSQL Backups incremental cycle at the form boundary - #1380
Open
olucasandrade wants to merge 3 commits into
Open
SEP-1787: Validate the PostgreSQL Backups incremental cycle at the form boundary#1380olucasandrade wants to merge 3 commits into
olucasandrade wants to merge 3 commits into
Conversation
…rm boundary Reject out-of-vocabulary pgBackRest cycle values when a task is saved, and offer daily, weekly, and ISO weekdays as a dropdown so invalid values never reach the database host.
olucasandrade
marked this pull request as ready for review
August 20, 2026 15:57
olucasandrade
requested review from
a team,
marcuscruz-percona,
maxbube,
nachodd,
peter-o-addo and
yyyyyyyan
as code owners
August 20, 2026 15:57
Contributor
There was a problem hiding this comment.
Pull request overview
Adds strict incremental-cycle validation and dropdown choices for PostgreSQL Backups, with comprehensive contract and backfill coverage.
Changes:
- Restricts cycles to daily, weekly, or ISO weekdays.
- Exposes labelled dropdown choices and regenerates API artifacts.
- Tests create/update rejection and legacy backfill behavior.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
app/sep/apps/backup_pg/models.py |
Adds cycle validation and choices. |
changelog.d/SEP-1787.changed.md |
Documents user-visible behavior. |
frontend/packages/api/specs/sep.json |
Updates the generated OpenAPI specification. |
frontend/packages/api/src/generated/sep.ts |
Narrows the generated TypeScript type. |
tests/app/sep/apps/backup_pg/conftest.py |
Adds shared cycle test data. |
tests/app/sep/apps/backup_pg/test_contract.py |
Tests create/update rejection. |
tests/app/sep/apps/backup_pg/test_form_backfill.py |
Tests invalid legacy-cycle handling. |
tests/app/sep/apps/backup_pg/test_models.py |
Tests validation and dropdown vocabulary. |
tests/app/sep/snapshots/openapi/backup_pg.json |
Updates the app OpenAPI snapshot. |
tests/app/sep/snapshots/schema/backup_pg.json |
Updates the form-schema snapshot. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||
Share literal_members across plugin tests, reuse the backfill context helper, and distinguish skipped-invalid legacy tasks from stamped forms that can pick a valid cycle.
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.
Summary
daily,weekly, and ISO weekdays1–7at create and update (422), instead of accepting free text and failing later on the database host.skipped_invalidby form backfill rather than raising. See SEP-1787.Tested
SEP-1787worktree (/Users/lucas.andrade/SEP/.worktrees/SEP-1787), startmake dev-backendandmake dev-frontend(stop any other process on:8000/:5174first — those ports currently belong to other checkouts).http://localhost:5174, open PostgreSQL Backups (/backups/postgresql), click Create.mondayis not an option.3.PGBACKREST_INCREMENTAL_CYCLE=bogus(covered byTestIncrementalCycleValidation; no need to wait for a scheduled backup).Checklist
make test)make run-pre-commit)Database migrations generated if models changed ((N/A — no persisted SQLModel change)make makemigrations)Configuration changes documented with examples(N/A)changelog.d/if the change is user-facing (make changelog-add), or confirmed N/A (internal-only change, or a same-release-cycle fix for an unreleased sibling ticket)make regen-specsupdatedtests/app/sep/snapshots/schema/backup_pg.json, the OpenAPI snapshot, and the generated TS client. Covering suite: 144 passed, 13 skipped. Lint clean. Payload runtime logic was not changed.