Skip to content

fix: schedule create/update drop priority/fairness flags #1028

@chaptersix

Description

@chaptersix

Bug

temporal schedule create and temporal schedule update accept --priority-key, --fairness-key, and --fairness-weight flags (via SharedWorkflowStartOptions) but silently discard them. The values never reach the server.

Root cause

toScheduleAction in internal/temporalcli/commands.schedule.go calls buildStartOptions, which correctly populates opts.Priority, but the resulting client.ScheduleWorkflowAction literal does not include the Priority field:

action := &client.ScheduleWorkflowAction{
    ID:                       opts.ID,
    Workflow:                 sw.Type,
    TaskQueue:                opts.TaskQueue,
    WorkflowExecutionTimeout: opts.WorkflowExecutionTimeout,
    WorkflowRunTimeout:       opts.WorkflowRunTimeout,
    WorkflowTaskTimeout:      opts.WorkflowTaskTimeout,
    UntypedSearchAttributes:  untypedSearchAttributes,
    Memo:                     opts.Memo,
    StaticSummary:            opts.StaticSummary,
    StaticDetails:            opts.StaticDetails,
    // Priority: opts.Priority  <-- missing
}

client.ScheduleWorkflowAction does have a Priority field in the SDK (confirmed in go.temporal.io/sdk@v1.41.1).

Fix

Add Priority: opts.Priority to the ScheduleWorkflowAction struct literal in toScheduleAction. This fixes both schedule create and schedule update since they share the same function.

Also

schedule describe text output (printableSchedule) does not surface the priority field. JSON output works correctly via raw proto passthrough.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions