Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/temporalcli/commands.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -1107,17 +1107,17 @@ 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).")
s.Command.Flags().StringVar(&s.TaskQueue, "task-queue", "", "Name of the task queue for the Activity.")
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
Expand Down
13 changes: 10 additions & 3 deletions internal/temporalcli/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
Loading