Skip to content

Fix workflow cron API compatibility for CLI 0.7.3 - #87

Merged
rmorehig merged 2 commits into
mainfrom
rafa/workflow-api-0.7.3
Oct 19, 2026
Merged

rmorehig merged 2 commits into
mainfrom
rafa/workflow-api-0.7.3

Conversation

@rmorehig

@rmorehig rmorehig commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Workflow creation and updates fail with HTTP 422 after Platform moved scheduling into schedule; human list/detail output also expects removed top-level fields. This updates the CLI to the current API and prepares patch release 0.7.3.

  • Replace --interval-seconds with --schedule-cron for five-field UTC expressions or six fields with seconds. Cron validation stays in the API.
  • Create manual workflows with schedule: null, preserving the CLI default. --schedule-cron null removes a schedule on update; omission preserves it.
  • Expose --schedule-enabled true|false and serialize it as schedule.enabled. Preserve existing cron/pause state when only the other field changes, and reject contradictory manual/pause flags before HTTP.
  • Read nested schedule metadata in human output; preserve raw API responses in JSON output.

Examples

rtree workflow create --name alerts --database analytics \
  --sql 'SELECT 1' --schedule-cron '*/5 * * * *' --schedule-enabled false
rtree workflow update <id> --schedule-enabled true
rtree workflow update <id> --schedule-cron null

Creation sends:

{
  "name": "alerts",
  "query": {"database": "analytics", "sql": "SELECT 1"},
  "schedule": {"cron": "*/5 * * * *", "enabled": false},
  "sinks": []
}

Resume sends {"schedule":{"enabled":true}}; removing the schedule sends {"schedule":null}. No top-level enabled or interval_seconds is sent. The old interval flag is rejected rather than approximated as a cron schedule.

Validation

  • All 233 standard CLI tests pass, including request serialization, partial updates, human output, API validation errors, invalid flag combinations, explicit boolean parsing, and obsolete flag rejection.
  • All 7 live Platform integration tests pass against the local stack: workflow manual runs and sink delivery, logs/metrics, scheduling and pause/resume, cancellation, query updates, plus storage identity and existing auth/data flows. The four previously failing workflow tests now pass.
  • P3 autoreview with thermo-nuclear criteria is clean; no actionable findings. Devin reviewed commit 1ea477a with zero findings, including code quality.
  • GitHub CI passes on 1ea477a: CLI tests and CLI against Platform Docker Compose.
  • Formatting, diff checks and dist plan --tag v0.7.3 pass.
  • An existing unused Duration import warning in src/commands/insert.rs is unchanged.

v0.7.2 was tagged separately from merged main. This PR does not publish v0.7.3.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@rmorehig
rmorehig merged commit b21b558 into main Oct 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant