Skip to content

feat: Add optional task queue prop to RunWorkflow - #25

Merged
YJ-928 merged 2 commits into
zigflow:mainfrom
SGunner2014:feat/run-workflow-task-queue
Nov 3, 2026
Merged

YJ-928 merged 2 commits into
zigflow:mainfrom
SGunner2014:feat/run-workflow-task-queue

Conversation

@SGunner2014

Copy link
Copy Markdown
Contributor

Description

This adds an optional taskQueue property to the run.workflow schema. If defined, then the new workflow will run on the task queue specified. Otherwise, it will default to the parent's task queue as is the current behaviour.

This PR updates the schema validation only, runtime support will be handled separately.

Related issue

Relates to zigflow/zigflow#556

How to test

Run the focused schema tests:

go test -run 'TestRunWorkflowTaskQueueProperty|TestSchema_RunWorkflowTaskQueue' -v ./...

Start a workflow with a workflow step configured with a custom taskQueue:

document:
  dsl: 1.0.0
  workflowType: order-orchestrator
  taskQueue: orchestration-queue
  version: 1.0.0
 
do:
  - processOrder:
      run:
        workflow:
          type: order-processing
          taskQueue: orders.v2
          input:
            orderId: ORD-123

The child workflow should then be triggered on the task queue orders.v2.

Checklist

  • This PR links to an issue using Fixes #..., Closes #... or Relates to #...
  • All tests pass
  • Tests have been added or updated where behaviour changed
  • Documentation has been updated where needed

@SGunner2014 SGunner2014 changed the title Add optional task queue prop to RunWorkflow feat: Add optional task queue prop to RunWorkflow Oct 30, 2026
@SGunner2014
SGunner2014 force-pushed the feat/run-workflow-task-queue branch 2 times, most recently from 4a61e98 to a95df53 Compare October 30, 2026 10:53
Signed-off-by: Sam Gunner <me@sgunner.me>
@SGunner2014
SGunner2014 force-pushed the feat/run-workflow-task-queue branch from ec62af9 to 2684ccb Compare October 30, 2026 10:59
@SGunner2014
SGunner2014 marked this pull request as ready for review October 30, 2026 11:16
@YJ-928
YJ-928 requested a review from a team November 2, 2026 05:16
@YJ-928 YJ-928 added the enhancement New feature or request label Nov 2, 2026

@YJ-928 YJ-928 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @SGunner2014, this looks good: optional, additive, and named like the other run.workflow fields, and CI is green. Approving.

Two small things, neither blocking:

  • 64-character name is accepted reads as if there were a 64-character limit, but the schema sets no maximum. I'd drop that case or rename it.
  • The commit shows as unverified on GitHub (unknown_key). It doesn't block this repo, but zigflow/zigflow requires verified signatures, so add the signing key to your GitHub account before the runtime PR.

For the follow-up runtime PR in zigflow/zigflow (nothing to change here):

  • Say whether taskQueue is a plain string or can be a runtime expression (${ ... }). If expressions are allowed, it needs to be evaluated before the child starts, plus a test.
  • Nothing can check that a worker polls that queue, so the child would sit pending. A line in the run.workflow docs saying a worker must listen on that queue would save people a confusing wait.

I'll merge in a day or two so you can fold in the first point if you want; it's fine as is otherwise.

Signed-off-by: Sam Gunner <me@sgunner.me>
@SGunner2014

Copy link
Copy Markdown
Contributor Author

@YJ-928 Thanks, makes sense. I've updated the PR to remove this test case and have added a signing key for future changes.

@YJ-928

YJ-928 commented Nov 3, 2026

Copy link
Copy Markdown
Member

Thanks @SGunner2014, all good. Merging. Looking forward to the runtime PR in zigflow/zigflow.

@YJ-928
YJ-928 merged commit ddcbfc0 into zigflow:main Nov 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants