-
Notifications
You must be signed in to change notification settings - Fork 0
fix: stabilize endpoint parameters and scheduler workflows #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0632482
feat(schedules): add guided cron builder
badry-dev 053c685
fix(schedules): preserve job history on deletion
badry-dev 9e5bc80
fix(endpoints): preserve job history on deletion
badry-dev 6ba4a0e
test: harden destructive database guard
badry-dev 407a923
fix(scheduler): restore active jobs on startup
badry-dev 7b4eaf0
feat(snapshots): add validated parameter defaults
badry-dev d342b9f
feat(parameters): support explicit null defaults
badry-dev f4343bd
fix(data): enforce required live parameters
badry-dev ff6ab59
fix(parameters): accept day-first dates
badry-dev 2eb8ffb
docs: document scheduler and parameter fixes
badry-dev ec18fe2
style(backend): format touched code
badry-dev 27aab9a
fix(deps): update vulnerable frontend packages
badry-dev b3ce137
style(frontend): format endpoint wizard changes
badry-dev 396ba74
fix(scheduler): fail startup when job restoration fails
badry-dev c50a56c
test: validate destructive database target name
badry-dev 479a124
fix(parameters): validate configured defaults
badry-dev 38b87f4
test: clarify non-sensitive schedule credential
badry-dev 231a6fb
docs: fix architecture heading spacing
badry-dev 5bdd430
docs(deployment): prevent overlapping schedulers
badry-dev 352b7db
fix(parameters): clear boolean defaults in wizard
badry-dev 19e2034
fix(endpoints): resolve defaults in SQL preview
badry-dev 0d1edd1
fix(schedules): validate cron syntax and ranges
badry-dev c4caafb
fix(auth): require authentication for all data endpoints
badry-dev 11c362a
fix(auth): deny orphaned endpoint configurations
badry-dev fbfa796
fix(types): accept covariant parameter schemas
badry-dev e0a896a
fix(logging): normalize scheduler context fields
badry-dev 3813514
docs(architecture): clarify scheduler persistence
badry-dev c7234b1
docs(deployment): nest Kubernetes health probes
badry-dev 6f8da4d
fix(api): normalize auth and validation errors
badry-dev 1d94e75
test: keep schema corruption transactional
badry-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
60 changes: 60 additions & 0 deletions
60
backend/alembic/versions/b2d18f4a6c73_preserve_job_runs_when_deleting_schedules.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| """Preserve job runs when deleting schedules. | ||
|
|
||
| Revision ID: b2d18f4a6c73 | ||
| Revises: a8307fb20816 | ||
| Create Date: 2026-08-30 | ||
| """ | ||
|
|
||
| from collections.abc import Sequence | ||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
| revision: str = "b2d18f4a6c73" | ||
| down_revision: str | None = "a8307fb20816" | ||
| branch_labels: str | Sequence[str] | None = None | ||
| depends_on: str | Sequence[str] | None = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.drop_constraint( | ||
| "job_runs_schedule_id_fkey", "job_runs", type_="foreignkey" | ||
| ) | ||
| op.alter_column( | ||
| "job_runs", | ||
| "schedule_id", | ||
| existing_type=sa.UUID(), | ||
| nullable=True, | ||
| ) | ||
| op.create_foreign_key( | ||
| "job_runs_schedule_id_fkey", | ||
| "job_runs", | ||
| "schedules", | ||
| ["schedule_id"], | ||
| ["id"], | ||
| ondelete="SET NULL", | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| op.drop_constraint( | ||
| "job_runs_schedule_id_fkey", "job_runs", type_="foreignkey" | ||
| ) | ||
| # Schedules deleted after this migration cannot be reconstructed. Remove | ||
| # only their orphaned audit rows so the original NOT NULL contract can be | ||
| # restored; snapshots remain and their job_run_id becomes NULL. | ||
| op.execute("DELETE FROM job_runs WHERE schedule_id IS NULL") | ||
| op.alter_column( | ||
| "job_runs", | ||
| "schedule_id", | ||
| existing_type=sa.UUID(), | ||
| nullable=False, | ||
| ) | ||
| op.create_foreign_key( | ||
| "job_runs_schedule_id_fkey", | ||
| "job_runs", | ||
| "schedules", | ||
| ["schedule_id"], | ||
| ["id"], | ||
| ondelete="RESTRICT", | ||
| ) |
56 changes: 56 additions & 0 deletions
56
backend/alembic/versions/c7e91a4f2d60_preserve_job_runs_when_deleting_endpoints.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| """Preserve job runs when deleting endpoints. | ||
|
|
||
| Revision ID: c7e91a4f2d60 | ||
| Revises: b2d18f4a6c73 | ||
| Create Date: 2026-08-30 | ||
| """ | ||
|
|
||
| from collections.abc import Sequence | ||
|
|
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
|
|
||
| revision: str = "c7e91a4f2d60" | ||
| down_revision: str | None = "b2d18f4a6c73" | ||
| branch_labels: str | Sequence[str] | None = None | ||
| depends_on: str | Sequence[str] | None = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| op.drop_constraint("job_runs_endpoint_id_fkey", "job_runs", type_="foreignkey") | ||
| op.alter_column( | ||
| "job_runs", | ||
| "endpoint_id", | ||
| existing_type=sa.UUID(), | ||
| nullable=True, | ||
| ) | ||
| op.create_foreign_key( | ||
| "job_runs_endpoint_id_fkey", | ||
| "job_runs", | ||
| "endpoints", | ||
| ["endpoint_id"], | ||
| ["id"], | ||
| ondelete="SET NULL", | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| op.drop_constraint("job_runs_endpoint_id_fkey", "job_runs", type_="foreignkey") | ||
| # Endpoints deleted after this migration cannot be reconstructed. Remove | ||
| # only their orphaned audit rows so the original NOT NULL contract can be | ||
| # restored; any surviving snapshots already reference other job runs. | ||
| op.execute("DELETE FROM job_runs WHERE endpoint_id IS NULL") | ||
| op.alter_column( | ||
| "job_runs", | ||
| "endpoint_id", | ||
| existing_type=sa.UUID(), | ||
| nullable=False, | ||
| ) | ||
| op.create_foreign_key( | ||
| "job_runs_endpoint_id_fkey", | ||
| "job_runs", | ||
| "endpoints", | ||
| ["endpoint_id"], | ||
| ["id"], | ||
| ondelete="RESTRICT", | ||
| ) |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.