Skip to content

feat: add scheduleWorkflowType and deprecate scheduleWorkflowName - #22

Merged
mrsimonemms merged 2 commits into
mainfrom
feat/schedule-workflow-type
Oct 28, 2026
Merged

mrsimonemms merged 2 commits into
mainfrom
feat/schedule-workflow-type

Conversation

@YJ-928

@YJ-928 YJ-928 commented Oct 28, 2026

Copy link
Copy Markdown
Member

Description

scheduleWorkflowName names a workflow type, not a name, since document.name became document.workflowType (zigflow/zigflow#340).

  • scheduleWorkflowType: new key, the workflow type a schedule starts.
  • scheduleWorkflowName: kept and marked deprecated: true, so existing files still validate.
  • A schedule no longer requires either key. Zigflow will default the target to document.workflowType; only the runtime can tell when that does not apply (every top-level task is a Do task), so zigflow reports that case at load. That change follows in a zigflow PR once this merges.

Related issue

Relates to zigflow/zigflow#617 (the zigflow PR closes it).

How to test

go test ./...

TestSchema_ScheduleNeedsNoWorkflowKey replaces TestSchema_ScheduleRequiresScheduleWorkflowName. Run against main, it fails for a schedule with no metadata, metadata without a key, and scheduleWorkflowType (3 of 4 cases); it passes here. schema.json and schema.yaml were regenerated by the pre-commit hooks, which all pass.

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

Part of zigflow/zigflow#617. scheduleWorkflowName names a workflow type, not a
name, since document.name became document.workflowType (zigflow/zigflow#340).

- scheduleWorkflowType: the workflow type a schedule starts.
- scheduleWorkflowName: kept, marked deprecated, so existing files still pass.
- A schedule no longer requires either key in the schema. Zigflow defaults the
  target to document.workflowType; only the runtime can tell when that does
  not apply (every top-level task is a Do task), so it reports that case.

Signed-off-by: Yash B Joshi <68319416+YJ-928@users.noreply.github.com>

@mrsimonemms mrsimonemms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you. I think we should get rid of the deprecated tag entirely as no releases yet.

Comment thread constants.go Outdated
No release of Studio uses it yet. document.metadata is open, so files that
still set it keep validating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yash B Joshi <68319416+YJ-928@users.noreply.github.com>
@YJ-928
YJ-928 requested a review from mrsimonemms October 28, 2026 10:56
@mrsimonemms
mrsimonemms merged commit 5b72b6f into main Oct 28, 2026
4 checks passed
@mrsimonemms
mrsimonemms deleted the feat/schedule-workflow-type branch October 28, 2026 11:02
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