Repository navigation
Conversation
<!-- Describe what has changed in this PR --> **What changed?** Basically just a single field change and some comment changes based on a Notion doc proposal. <!-- Tell your future self why have you made these changes --> **Why?** <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR** --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Pin Core to the rebased session stack (temporalio/sdk-rust#1687 at ae440be3), which adopts temporalio/api#885 at d183f54c. Regenerate the Python protos and encode workflow-session placement as the `workflow_session` Empty field instead of the old bool, which a server built on the new API would otherwise ignore. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
SDKs (Core) already reject an empty SingleSessionOptions.stable_identity; state the requirement on the field so servers and other SDKs see it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin Core to the session stack (temporalio/sdk-rust#1687 at 59f8a8f7), which adopts the session API from temporalio/api#885, regenerate the Python protos, refresh the bridge lockfile, and import Core's release notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin Core to the session stack (temporalio/sdk-rust#1687 at 6e88cb53), which adopts the session API from temporalio/api#885, regenerate the Python protos, refresh the bridge lockfile, and import Core's release notes.
api main took field 11 on PollWorkflowTaskQueueRequest and PollActivityTaskQueueRequest for poller_pool_info. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y queue A multi-session worker's sticky queue is named after its worker_instance_key, so MultiSessionOptions carries no address. Single-session keeps stable_identity. Exactly one admission mode is required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds SessionInfo (exclusive_worker, bound_worker_info) in session/v1 and records it on WorkflowTaskStartedEventAttributes (session_info) and WorkflowExecutionStartedEventAttributes (inherited_session_info), so the server can rebuild a workflow's worker binding from history, for example on reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkerInfo Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stance key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker queue is the only worker field the binding needs: a multi-session worker's queue is its instance key, and a single-session binding never moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unset means unbound, {} a multi-session binding, {exclusive_worker: true} a
single-session binding. The worker queue comes from the workflow task's
scheduled event.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sushisource
left a comment
There was a problem hiding this comment.
I think we should use the word "service" rather than "serve" in the context of "the worker serves a session" as I think it's a little more clear that it means the worker is responsible for handling that session(s)
| // Serialization context propagated from the Nexus caller that started this workflow. | ||
| temporal.api.nexus.v1.PropagatedSerializationContext propagated_nexus_serialization_context = 44; | ||
|
|
||
| // Session info this run inherited from the previous run (continue-as-new, retry or cron), so the server |
There was a problem hiding this comment.
Shouldn't cron be called schedule?
There was a problem hiding this comment.
good point, forgot that we discourage crons now. i think, for now, shall be removing the use of either schedules/crons over here since we have not decided internally if we wanna support the inheritance of session options to those type of runs.
For example, in the world of versioning, we allowed versioning related fields to be set for CAN workflows but not crons/schedules. Shall come back to this and then later edit the comment if we decide that we wanna support this.
| // concurrently, the server treats them as pollers of a single worker and | ||
| // process affinity is lost. | ||
| // | ||
| // Note: this effectively acts as a configurable sticky queue. |
There was a problem hiding this comment.
Unclear what "configurable" sticky queue means
There was a problem hiding this comment.
a sticky queue that can be named/specified by the user
There was a problem hiding this comment.
going to change the comment to say what thomas responded here.
| // server can rebuild the binding from history (for example on reset). See | ||
| // session_info on WorkflowTaskStartedEventAttributes and inherited_session_info | ||
| // on WorkflowExecutionStartedEventAttributes: | ||
| // * unset: not bound (started by a worker without sessions). | ||
| // * {}: bound to a multi-session worker. | ||
| // * {exclusive_worker: true}: bound to a single-session worker. |
There was a problem hiding this comment.
I think all these semantics belong on the fields use this type. No need to refer to the fields that use it, either. IDEs will tell you where a type is used just fine.
…drop cron Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
**What changed?** `SessionInfo.worker_queue`: the sticky queue of the worker a workflow is bound to (stable identity for single-session, worker instance key for multi-session). **Why?** History has no other record of the bound worker's queue: the workflow task that binds a worker is scheduled on the normal queue, the started/completed events carry no queue, and the started event's `task_queue` is the workflow's normal queue that SDKs read. Without it, a reset to the binding task or a continue-as-new/retry rebuild loses the binding. Written only on history events; read only when the server rebuilds state from them. **Breaking changes** None. New experimental field on top of #885. **Server PR** To follow, with the session stack. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A workflow with session activities waiting for a session worker can only have its workflow tasks completed by a worker servicing sessions; the server fails a completion from any other worker with this cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What changed?
WorkerSessionOptionson workflow/activity polls with one required admission mode:SingleSessionOptions{stable_identity}orMultiSessionOptions{}. The worker's sticky queue is named afterstable_identity(single-session) orworker_instance_key(multi-session).ActivitySessionOptionsso an activity can run in its workflow's session.SessionInfo{exclusive_worker}recorded onWorkflowTaskStartedEventAttributesandWorkflowExecutionStartedEventAttributes(inherited across continue-as-new/retry/cron), so resets can keep a single-session worker's binding. Reset for multi-session workers comes later.WorkerHeartbeat.session_options.Why?
Workflow as Session: route a workflow's tasks to the worker it is bound to, keep that binding across resets and new runs, and let the server move workflows off a stopped multi-session worker.
Breaking changes
None. All new fields are experimental.
Server PR
(still cooking)