Skip to content

Correct activity update-options timeout help text - #1276

Open
Duncanma wants to merge 1 commit into
mainfrom
duncan/activity-update-options-timeout-help
Open

Duncanma wants to merge 1 commit into
mainfrom
duncan/activity-update-options-timeout-help

Conversation

@Duncanma

Copy link
Copy Markdown
Contributor

Related issues

Docs side: temporalio/documentation#5490 (Activity timeout defaults and how Update Options resolves timeouts). That PR previously hand-edited the generated activity.mdx reference. This change replaces that edit, and the docs reference picks it up on the next CLI release.

What changed?

Help text only, for temporal activity update-options:

  • --schedule-to-start-timeout: the help said an omitted value "defaults to the schedule-to-close timeout or workflow execution timeout." That describes scheduling, not updating. On update-options, the CLI only adds a field to the update mask when you pass its flag (commands.activity.go), so omitting the flag leaves the stored value unchanged. Passing 0s clears it, and the server then sets it to the schedule-to-close timeout.
  • Command description: adds a paragraph explaining that the server re-applies its timeout caps after the merge (service/history/api/updateactivityoptions/api.go, chasm/lib/activity/operator_commands.go). Lowering schedule-to-close lowers the others. Raising it doesn't raise them, so pass --start-to-close-timeout too if each attempt needs more time.

commands.gen.go is regenerated with make gen.

Checklist

Help text

  • All flags shown in help text and examples are implemented and functional
  • Long descriptions end with a period and include at least one example invocation

The 0s in the flag description is deliberately not in backticks: pflag treats a backticked word in a flag's usage as its type name, which made the flag render as --schedule-to-start-timeout 0s instead of duration.

Manual tests

Setup

temporal server start-dev --headless
temporal activity start \
    --activity-id YourActivityId \
    --type YourActivity \
    --task-queue YourTaskQueue \
    --schedule-to-close-timeout 24h

activity describe shows schedule-to-close, schedule-to-start, and start-to-close all at 86400s.

Happy path (each step followed by temporal activity describe --activity-id YourActivityId -o json)

Command scheduleToClose scheduleToStart startToClose
--schedule-to-close-timeout 48h 172800s 86400s 86400s
--schedule-to-close-timeout 1h 3600s 3600s 3600s
--schedule-to-start-timeout 10m 3600s 600s 3600s
--heartbeat-timeout 30s (schedule-to-start omitted) 3600s 600s 3600s
--schedule-to-start-timeout 0s 3600s 3600s 3600s

--heartbeat-timeout 2h is stored as 1h0m0s, capped at start-to-close.

Help output

$ temporal activity update-options --help
...
      --schedule-to-start-timeout duration   Limits time an activity task
                                             ...
                                             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.

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.
@Duncanma
Duncanma requested a review from a team as a code owner November 18, 2026 00:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T00:11:00.953292Z 0e40f88 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant