From 0e40f88ecff4ab67ce4748370ccae26715201dd4 Mon Sep 17 00:00:00 2001 From: Duncan Mackenzie Date: Tue, 17 Nov 2026 16:08:42 -0800 Subject: [PATCH] Correct activity update-options timeout help text The --schedule-to-start-timeout help on update-options described the scheduling-time default ("schedule-to-close timeout or workflow execution timeout"). On update-options an omitted flag leaves the stored value unchanged, and 0s clears it, after which the server sets it to the schedule-to-close timeout. Also explain in the command description that the server re-applies its timeout caps after the update, so lowering schedule-to-close lowers the others, but raising it doesn't raise them. --- internal/temporalcli/commands.gen.go | 6 +++--- internal/temporalcli/commands.yaml | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/internal/temporalcli/commands.gen.go b/internal/temporalcli/commands.gen.go index 7e314c50b..a61772382 100644 --- a/internal/temporalcli/commands.gen.go +++ b/internal/temporalcli/commands.gen.go @@ -1107,9 +1107,9 @@ func NewTemporalActivityUpdateOptionsCommand(cctx *CommandContext, parent *Tempo s.Command.Use = "update-options [flags]" s.Command.Short = "Change the values of options affecting an Activity (Experimental)" if hasHighlighting { - s.Command.Long = "Update an Activity's options. Updates are incremental, only changing the\nspecified options.\n\nNote: This is an experimental feature and may change in the future.\n\nFor example:\n\n\x1b[1mtemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\x1b[0m\n\nYou may follow this command with \x1b[1mtemporal activity reset\x1b[0m, and the new\nvalues will apply after the reset.\n\nFor a Standalone Activity before its first dispatch, use \x1b[1m--start-delay\x1b[0m\nto change when the first Activity Task becomes available. The duration is\nmeasured from the Activity's original schedule time, and \x1b[1m0s\x1b[0m makes it\navailable immediately. \x1b[1m--start-delay\x1b[0m cannot be changed after the first\nActivity Task has been dispatched and is not supported for workflow\nActivities.\n\nEither \x1b[1m--activity-id\x1b[0m or \x1b[1m--query\x1b[0m must be specified.\n\nWorkflow Activity options can be updated in bulk with a visibility query list filter:\n\n\x1b[1mtemporal activity update-options \\\n --query 'WorkflowType=\"YourWorkflow\"' \\\n --task-queue NewTaskQueueName\x1b[0m\n\nThe \x1b[1m--query\x1b[0m flag currently applies only to Workflow Activities.\n\nOmit \x1b[1m--workflow-id\x1b[0m to target a Standalone Activity by Activity ID\nand optional Run ID." + s.Command.Long = "Update an Activity's options. Updates are incremental, only changing the\nspecified options.\n\nNote: This is an experimental feature and may change in the future.\n\nFor example:\n\n\x1b[1mtemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\x1b[0m\n\nYou may follow this command with \x1b[1mtemporal activity reset\x1b[0m, and the new\nvalues will apply after the reset.\n\nAfter the update, the server re-applies its timeout rules. It caps the\nschedule-to-start and start-to-close timeouts at the schedule-to-close\ntimeout, and the heartbeat timeout at the start-to-close timeout, so\nlowering one timeout can lower others. Raising the schedule-to-close\ntimeout doesn't raise the others. Pass \x1b[1m--start-to-close-timeout\x1b[0m as\nwell if each attempt needs more time.\n\nFor a Standalone Activity before its first dispatch, use \x1b[1m--start-delay\x1b[0m\nto change when the first Activity Task becomes available. The duration is\nmeasured from the Activity's original schedule time, and \x1b[1m0s\x1b[0m makes it\navailable immediately. \x1b[1m--start-delay\x1b[0m cannot be changed after the first\nActivity Task has been dispatched and is not supported for workflow\nActivities.\n\nEither \x1b[1m--activity-id\x1b[0m or \x1b[1m--query\x1b[0m must be specified.\n\nWorkflow Activity options can be updated in bulk with a visibility query list filter:\n\n\x1b[1mtemporal activity update-options \\\n --query 'WorkflowType=\"YourWorkflow\"' \\\n --task-queue NewTaskQueueName\x1b[0m\n\nThe \x1b[1m--query\x1b[0m flag currently applies only to Workflow Activities.\n\nOmit \x1b[1m--workflow-id\x1b[0m to target a Standalone Activity by Activity ID\nand optional Run ID." } else { - s.Command.Long = "Update an Activity's options. Updates are incremental, only changing the\nspecified options.\n\nNote: This is an experimental feature and may change in the future.\n\nFor example:\n\n```\ntemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\n```\n\nYou may follow this command with `temporal activity reset`, and the new\nvalues will apply after the reset.\n\nFor a Standalone Activity before its first dispatch, use `--start-delay`\nto change when the first Activity Task becomes available. The duration is\nmeasured from the Activity's original schedule time, and `0s` makes it\navailable immediately. `--start-delay` cannot be changed after the first\nActivity Task has been dispatched and is not supported for workflow\nActivities.\n\nEither `--activity-id` or `--query` must be specified.\n\nWorkflow Activity options can be updated in bulk with a visibility query list filter:\n\n```\ntemporal activity update-options \\\n --query 'WorkflowType=\"YourWorkflow\"' \\\n --task-queue NewTaskQueueName\n```\n\nThe `--query` flag currently applies only to Workflow Activities.\n\nOmit `--workflow-id` to target a Standalone Activity by Activity ID\nand optional Run ID." + s.Command.Long = "Update an Activity's options. Updates are incremental, only changing the\nspecified options.\n\nNote: This is an experimental feature and may change in the future.\n\nFor example:\n\n```\ntemporal activity update-options \\\n --activity-id YourActivityId \\\n --workflow-id YourWorkflowId \\\n --task-queue NewTaskQueueName \\\n --schedule-to-close-timeout DURATION \\\n --schedule-to-start-timeout DURATION \\\n --start-to-close-timeout DURATION \\\n --heartbeat-timeout DURATION \\\n --retry-initial-interval DURATION \\\n --retry-maximum-interval DURATION \\\n --retry-backoff-coefficient NewBackoffCoefficient \\\n --retry-maximum-attempts NewMaximumAttempts\n```\n\nYou may follow this command with `temporal activity reset`, and the new\nvalues will apply after the reset.\n\nAfter the update, the server re-applies its timeout rules. It caps the\nschedule-to-start and start-to-close timeouts at the schedule-to-close\ntimeout, and the heartbeat timeout at the start-to-close timeout, so\nlowering one timeout can lower others. Raising the schedule-to-close\ntimeout doesn't raise the others. Pass `--start-to-close-timeout` as\nwell if each attempt needs more time.\n\nFor a Standalone Activity before its first dispatch, use `--start-delay`\nto change when the first Activity Task becomes available. The duration is\nmeasured from the Activity's original schedule time, and `0s` makes it\navailable immediately. `--start-delay` cannot be changed after the first\nActivity Task has been dispatched and is not supported for workflow\nActivities.\n\nEither `--activity-id` or `--query` must be specified.\n\nWorkflow Activity options can be updated in bulk with a visibility query list filter:\n\n```\ntemporal activity update-options \\\n --query 'WorkflowType=\"YourWorkflow\"' \\\n --task-queue NewTaskQueueName\n```\n\nThe `--query` flag currently applies only to Workflow Activities.\n\nOmit `--workflow-id` to target a Standalone Activity by Activity ID\nand optional Run ID." } s.Command.Args = cobra.NoArgs s.Command.Flags().StringVarP(&s.ActivityId, "activity-id", "a", "", "The Activity ID to update options. Mutually exclusive with --query. Set --workflow-id to target a workflow Activity, or omit it to target a standalone Activity (the latest run unless --run-id is set).") @@ -1117,7 +1117,7 @@ func NewTemporalActivityUpdateOptionsCommand(cctx *CommandContext, parent *Tempo s.ScheduleToCloseTimeout = 0 s.Command.Flags().Var(&s.ScheduleToCloseTimeout, "schedule-to-close-timeout", "Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted.") s.ScheduleToStartTimeout = 0 - s.Command.Flags().Var(&s.ScheduleToStartTimeout, "schedule-to-start-timeout", "Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. Defaults to the schedule-to-close timeout or workflow execution timeout if not specified.") + s.Command.Flags().Var(&s.ScheduleToStartTimeout, "schedule-to-start-timeout", "Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is to put it back into the same queue. If omitted, the current value is unchanged. Set to 0s to clear it, and the server sets it to the schedule-to-close timeout.") s.StartToCloseTimeout = 0 s.Command.Flags().Var(&s.StartToCloseTimeout, "start-to-close-timeout", "Maximum time an activity is allowed to execute after being picked up by a worker. This timeout is always retryable.") s.HeartbeatTimeout = 0 diff --git a/internal/temporalcli/commands.yaml b/internal/temporalcli/commands.yaml index c177f4ee7..2f635e36f 100644 --- a/internal/temporalcli/commands.yaml +++ b/internal/temporalcli/commands.yaml @@ -432,6 +432,13 @@ commands: You may follow this command with `temporal activity reset`, and the new values will apply after the reset. + After the update, the server re-applies its timeout rules. It caps the + schedule-to-start and start-to-close timeouts at the schedule-to-close + timeout, and the heartbeat timeout at the start-to-close timeout, so + lowering one timeout can lower others. Raising the schedule-to-close + timeout doesn't raise the others. Pass `--start-to-close-timeout` as + well if each attempt needs more time. + For a Standalone Activity before its first dispatch, use `--start-delay` to change when the first Activity Task becomes available. The duration is measured from the Activity's original schedule time, and `0s` makes it @@ -476,9 +483,9 @@ commands: Limits time an activity task can stay in a task queue before a worker picks it up. This timeout is always non retryable, as all a retry would achieve is - to put it back into the same - queue. Defaults to the schedule-to-close timeout or workflow execution - timeout if not specified. + to put it back into the same queue. + If omitted, the current value is unchanged. Set to 0s to clear it, + and the server sets it to the schedule-to-close timeout. - name: start-to-close-timeout type: duration description: |