Repository navigation
Align workflow commands with nested queries and nullable intervals - #79
Merged
rmorehig merged 6 commits intoOct 8, 2026
Conversation
The platform API now nests database and sql in a query object (rawtreedb/rawtree-platform#1368), which broke workflow list, get, create and update. Also accept a null interval for manual-only workflows.
Sends a null interval so the workflow has no schedule and only runs via rtree workflow run.
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.
Fixes RAW-538.
The Platform API now groups workflow SQL and database under
query. This fixesrtree workflow list/getresponse parsing andcreate/updatepayloads, while preserving partial query updates.--interval-secondsexplicitly sendsinterval_seconds: null: manual-only execution, with no hidden default interval.--interval-seconds nullalso removes an existing schedule; omitting it on update preserves the schedule. There is no--manualflag.activefor enabled scheduled workflows,pausedfor disabled scheduled workflows, andmanualwhenever there is no schedule. Scheduled durations remain visible; manual intervals display—.Commands and output
Examples assume an organization and cluster are selected. IDs and timestamps below are illustrative; the output format was checked with the built CLI against local fixture responses.
Create a manual workflow (explicit
--interval-seconds nullhas the same effect):rtree workflow create --name alerts --database analytics --sql "SELECT 1"Inspect the workflow:
This prints the same details under
Workflow 'alerts':.Change scheduling:
Each update prints
Workflow 'alerts' updated:followed by the full details. The relevant fields after each command are:--interval-seconds 60on the newly created workflowactive1m--disablepaused1m--enableactive1m--interval-seconds nullmanual—Changing SQL or database preserves the other query field and the schedule:
rtree workflow update wf-1 --sql "SELECT 2" rtree workflow update wf-1 --database analytics_v2List workflows:
Selected columns from an illustrative list (the actual table also includes sinks, updated time, and ID):
Validation
a0c0eb9:cargo test --lockedpassed all 200 unit/contract tests, including status and interval assertions for list/get/create/update. Formatting and diff checks passed.autoreview --mode local --max-priority P3 --no-web-searchcompleted with no actionable findings.e08beaa8e: four workflow tests plus existing logout and data-flow tests. Workflow coverage includes query/schedule lifecycle, manual delivery and idempotency, logs and metrics, scheduled execution and pause/resume, and cancellation. Compose was not rerun after the final status-label/help-only change.Note
Medium Risk
Workflow create/update/list behavior and API payload shape changed; incorrect interval or query patching could affect production automation, though coverage is extensive.
Overview
Aligns
rtree workflowwith the Platform API’s nestedqueryobject and nullableinterval_seconds, fixing broken create/update payloads and list/get rendering after the API change.Scheduling:
--interval-secondsacceptsSECONDS(1–86400) ornull. Omitting it on create sendsinterval_seconds: null(manual-only, no server default). On update, omitting the flag leaves the schedule unchanged;nullclears it. Partial PATCH sends only thequeryfields you pass (--database/--sql).Output: Human tables and detail views show
active/paused/manual, nullable intervals, next run, and HTTP sink URLs (headers stay write-only).Docs, mock contract tests, and four ignored live Compose workflow E2E tests cover scheduling, partial updates, and lifecycle behavior. Version 0.6.14.
Reviewed by Cursor Bugbot for commit a0c0eb9. Bugbot is set up for automated code reviews on this repo. Configure here.