Repository navigation
Conversation
A Local Activity runs again with the same Activity id and with attempt 1 when its Workflow Task is retried, and nothing in `activity.Info` tells the two executions apart or orders them. `Info.workflow_task` has the started event id, the attempt and the started time of that task, which Core sends for a Local Activity.
Each PR with a change that users see needs a fragment.
This was referenced Nov 14, 2026
moetemp
marked this pull request as ready for review
November 14, 2026 00:56
moetemp
changed the base branch from
main
to
moe/fix-flaky-worker-shutdown-tests
November 15, 2026 18:50
moetemp
force-pushed
the
moe/activity-workflow-task-info
branch
2 times, most recently
from
November 15, 2026 20:23
1a718b8 to
88cc83e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds
activity.Info.workflow_taskfor a Local Activity. It's the Workflow Task in which the Worker dispatched this execution, and it'sNonefor every other Activity. Core already sends the value (temporalio/sdk-rust#1703), so this PR only maps it.It's a
WorkflowTaskAttemptwith three fields.started_event_idorders the Workflow Tasks of a run.attemptorders the attempts of one task.started_timetells apart two tasks with the same started event id. The server can drop a speculative task, and the next task then gets the same event id.Why?
When a Workflow Task fails or times out, the retried task runs its Local Activity again, with the same Activity id and with
attemptback at 1. Nothing inactivity.Infotells the two executions apart or orders them. A Local Activity that has an effect outside Temporal needs that.Streams is the first user. An append from a Local Activity uses its Workflow Task as its epoch, so the Store refuses a late write of the failed task.
Open for review. Is this the right shape for every author of an Activity, or should
activity.Infogive one opaque value that's unique and ordered across the executions of a Local Activity in a run?How did you test it?
test_activity_info_workflow_taskruns the same Activity as a Local Activity and as a regular one, on the local dev server. Only the first gets the Workflow Task.Link to a test plan if any -