Skip to content

[DO NOT MERGE] Implement operator commands for Standalone Activities - #543

Open
GregoryTravis wants to merge 38 commits into
mainfrom
gmt/operator-commands
Open

[DO NOT MERGE] Implement operator commands for Standalone Activities#543
GregoryTravis wants to merge 38 commits into
mainfrom
gmt/operator-commands

Conversation

@GregoryTravis

@GregoryTravis GregoryTravis commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Implement operator commands for standalone activities

Adds pause, unpause, reset, and update-options to standalone activities, plus
the describe surface needed to observe their effects.

Standalone activities already supported start, result, describe, cancel, and
terminate. This adds the four operator commands the server exposes for them, so
an operator can hold, resume, restart, and retune a running activity without
going through a workflow.

Describe: payload fields are opt-in

DescribeActivityExecutionRequest gates four payload-bearing fields behind
per-call flags (api#792). All four are now plumbed through describe and
default to false.

GregoryTravis and others added 30 commits June 18, 2026 15:50
…e + bridge updates)

# Conflicts:
#	temporalio/ext/sdk-core
#	temporalio/lib/temporalio/api/enums/v1/failed_cause.rb
#	temporalio/lib/temporalio/api/namespace/v1/message.rb
#	temporalio/lib/temporalio/api/workflowservice/v1/request_response.rb
#	temporalio/sig/temporalio/api/enums/v1/failed_cause.rbs
…in + api overlay + api-adapter fixups), Cargo.lock regenerated, pin Ruby 3.3.11
@GregoryTravis
GregoryTravis requested a review from a team as a code owner August 18, 2026 01:22
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ GregoryTravis
❌ SAA-OC-Tracking


SAA-OC-Tracking seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ GregoryTravis
❌ SAA-OC-Tracking


SAA-OC-Tracking seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@chris-olszewski chris-olszewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Largest concern is the update_options API

Comment thread temporalio/.ruby-version Outdated
@@ -0,0 +1 @@
3.3.11

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed; this was part of tracking upstream server changes (and working around a CI segfault) and should have been removed before the PR.

Comment thread CHANGELOG.md Outdated

See https://docs.temporal.io/standalone-activity for the cross-SDK feature overview.

#### Standalone Activity operator commands

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is in the wrong section of the changelog

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Comment thread temporalio/Cargo.lock

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was there a reason/need for updating the Rust lockfile? I don't see any bridge changes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed; this was part of tracking upstream server changes (and working around a CI segfault) and should have been removed before the PR.

Comment on lines +226 to +237
def update_options(
task_queue: UNSET,
schedule_to_close_timeout: UNSET,
schedule_to_start_timeout: UNSET,
start_to_close_timeout: UNSET,
heartbeat_timeout: UNSET,
retry_policy: UNSET,
priority: UNSET,
start_delay: UNSET,
restore_original: false,
rpc_options: nil
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm really not sold on this approach to distinguishing clearing a value compared to not updating it. UNSET will be visible as the default for users, but not the declaration/existence in the YARD documentation. Also, to me UNSET reads as "unsetting" the value. I think either UNDEFINED or NOT_SET would be better along with making the value public.

There's a similar design problem for search attribute updates that we resolved by having an explicit Update class, but that doesn't map super well here since these are real attributes and not just user chosen names. We could get away with **kwargs inspection directly, but that might make for less useful docs/autocomplete. It is a pattern used by Rails for partial updates so not outlandish to use here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Used kwargs inspection.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we need to provide signatures for update_options

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added, and also added a bunch more missing types.

Comment thread temporalio/test/client_activity_test.rb Outdated
Comment on lines +308 to +311
# execution_time is populated by the server (api#807 + temporal#11017); without start_delay
# it should be at or near schedule_time.
refute_nil desc.execution_time
assert_in_delta desc.schedule_time.to_f, desc.execution_time.to_f, 1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would this assertion capture an SDK bug, isn't this server behavior?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, removed.

Comment on lines +53 to +66
# unpause carries the reason, jitter, and an auto-generated dedup request_id (api#844).
unpause_req = captured.fetch(:unpause)
assert_equal 'go', unpause_req.reason
assert_equal 5, unpause_req.jitter.seconds
assert_equal 0, unpause_req.jitter.nanos
refute_empty unpause_req.request_id

# reset carries jitter and an auto-generated dedup request_id (api#844).
reset_req = captured.fetch(:reset)
assert_equal 2, reset_req.jitter.seconds
assert_equal 0, reset_req.jitter.nanos
refute_empty reset_req.request_id

# update_options carries an auto-generated dedup request_id (api#844).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All of these references to the specific API PR that introduced these fields feels unnecessary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed, the assertions are self-explanatory.

@GregoryTravis GregoryTravis changed the title Implement operator commands for Standalone Activities [DO NOT MERGE] Implement operator commands for Standalone Activities Aug 20, 2026
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.

3 participants