CROSSLINK-288 Add PUT endpoint#633
Open
JanisSaldabols wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds update/enable/disable capabilities for scheduler “batch actions” by moving batch-action ownership metadata onto scheduled_task (removing the separate batch_action table) and exposing a new PUT endpoint for updating an existing batch action.
Changes:
- Add
ownertoscheduled_task, migrate existingbatch_action.ownerdata, and drop thebatch_actiontable. - Update scheduler SQLC queries/repo methods to read/write/list scheduled tasks by owner for the batch-actions API.
- Extend the scheduler API/OpenAPI and tests with
PUT /batch_actions/{id}plus enable/disable endpoints.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| broker/sqlc/sched_schema.sql | Adds owner to scheduled_task and owner-related indexes in the SQLC schema. |
| broker/sqlc/sched_query.sql | Updates SQLC queries to persist/lookup/list/delete scheduled tasks with owner. |
| broker/scheduler/db/repo.go | Replaces batch_action repo methods with owner-scoped scheduled_task methods. |
| broker/scheduler/api/api_handler.go | Implements PUT + enable/disable and switches batch-actions API to scheduled_task storage. |
| broker/scheduler/api/api_handler_test.go | Updates/expands tests to cover the new behavior and endpoints. |
| broker/oapi/open-api.yaml | Adds PUT + enable/disable endpoints and extends BatchAction schema fields. |
| broker/migrations/044_add_owner_to_scheduled_task.up.sql | Migrates owner into scheduled_task and drops batch_action. |
| broker/migrations/044_add_owner_to_scheduled_task.down.sql | Recreates batch_action table and removes scheduled_task.owner. |
jakub-id
approved these changes
Jun 6, 2026
| ALTER TABLE scheduled_task | ||
| ADD COLUMN owner TEXT NOT NULL DEFAULT ''; | ||
|
|
||
| UPDATE scheduled_task st |
Contributor
There was a problem hiding this comment.
@JanisSaldabols could you rename payload column to action_data?
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.
No description provided.