Skip to content

feat: support Platform API 1.150 features (cron actions) - #688

Closed
cristianrcv wants to merge 3 commits into
feat/NOTASK-api-1.145-catch-upfrom
feat/NOTASK-api-1.150-catch-up
Closed

cristianrcv wants to merge 3 commits into
feat/NOTASK-api-1.145-catch-upfrom
feat/NOTASK-api-1.150-catch-up

Conversation

@cristianrcv

Copy link
Copy Markdown
Contributor

Summary

Exposes the scheduled (cron) action source introduced in Platform API 1.150.0.

This is one PR in a stack that catches tw up with Platform API 1.230.0, one PR per API version that introduced the features. Each PR adds the items whose API elements all exist in that version.

  • Stack: master → 1.101 → 1.113 → 1.145 → 1.150 → 1.167 → 1.190 → 1.200 → 1.230. This PR is based on the API 1.145 PR; the next one is the API 1.167 PR.
  • SDK: unchanged. tw stays on tower-java-sdk 1.200.0, which already contains every API element used here. The last PR in the stack bumps it to 1.230.0.

Changes

  • feat(actions): add and update cron (scheduled) actions (d556d81)
  • docs: document the cron action source added for API 1.150 (92d63cf)
  • build(native): register reflection metadata for the cron action command (983d8d7)

Verification

  • ./gradlew test: 869 tests, 0 failures. Every new command and option has MockServer tests that assert the request (method, path, query, body) and the output.
  • Each item was checked against the OpenAPI spec of this version and the previous one (tower-sdk-gencode history) to confirm where it first appears.
  • CI runs the full suite against the native binary on Linux, macOS and Windows.

🤖 Generated with Claude Code

cristianrcv and others added 3 commits October 2, 2026 19:01
Platform API 1.150 added the cron action source: an action that launches
its pipeline on a recurring schedule, set by a 5-field cron expression and
an IANA timezone (UTC when omitted). tw could only create GitHub, Seqera
Platform and bucket actions.

- 'actions add cron --cron-expression <expr> [--timezone <tz>]' sends
  CreateActionRequest.cron.
- 'actions update --cron-expression/--timezone' sends a partial
  UpdateActionRequest.cron; omitted fields keep their stored value. The
  API answers 400 for a cron block on another source, which tw would hide
  behind its generic update error, so tw refuses it up front.
- 'actions view' shows the expression, timezone and next execution.
- 'actions list' already accepts a null endpoint, which cron actions
  always have; its test now covers a cron row.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Extend the 'Other additions' bullet for new action sources with cron.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Entry for 'actions add cron', copied from the catch-up branch where a full
test run under the GraalVM tracing agent captured it. The cron model
classes were already registered.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@educalleja educalleja 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.

Usage of the new commands

This PR adds one new command, tw actions add cron, and two new options for tw actions update. Together they let you create and edit pipeline actions that run on a recurring schedule.

1. tw actions add cron (new)

Adds a pipeline action that runs on a recurring schedule.

Option Description
--cron-expression The schedule, as a standard 5-field cron expression, such as '0 2 * * *' (required)
--timezone IANA timezone the schedule runs in, such as Europe/London. Default: UTC

It also takes the options every tw actions add source shares:

Option Description
-n, --name Action name (required)
--pipeline Pipeline to launch (required)
-w, --workspace Workspace
--overwrite Overwrite the action if it already exists
Labels and launch options The same as for the other tw actions add sources

Example:

tw actions add cron -n nightly --pipeline https://github.com/nextflow-io/hello \
  --cron-expression '0 2 * * *' --timezone Europe/London

2. tw actions update: new cron options

Option Description
--cron-expression New schedule for a cron action, as a standard 5-field cron expression
--timezone New IANA timezone for a cron action's schedule
  • These options only work on cron actions. Using them on another kind of action fails with: "Options --cron-expression and --timezone apply only to cron actions, but action '<name>' is a <source> action".

Changes to existing output

  • tw actions view shows Cron expression, Timezone and Next execution for cron actions.
  • tw actions list handles cron actions, which have no endpoint.

USAGE.md

The PR changes the bullet tw actions add bucket to tw actions add cron|bucket in the list of commands added for newer API versions. It adds no new example.

🤖 Generated with Claude Code

@cristianrcv

Copy link
Copy Markdown
Contributor Author

Superseded by #703 (actions). This PR only added cron actions, which are now grouped with the other action sources, so there's no separate 1.150 PR.

The stack is now: #685 (1.101) → #686 (1.113) → #697 (1.145) → #698 (1.167) → #699 (1.190) → #700 (1.200) → #701 (1.230) → #702 (agents) → #703 (actions). The code at the top of the stack is identical to the old one; only the grouping changed. Agents and actions changes are grouped into one PR each instead of being spread across API versions. New branches were used instead of force-pushing.

@cristianrcv cristianrcv closed this Oct 5, 2026
@cristianrcv
cristianrcv removed this pull request from stack #693 October 5, 2026 16:19
@cristianrcv
cristianrcv deleted the feat/NOTASK-api-1.150-catch-up branch October 8, 2026 09:09
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.

2 participants