Skip to content

[Brook G3] Added activity.Info.workflow_task for Local Activities. - #369

Closed
moetemp wants to merge 2 commits into
moe/brook/review/basefrom
moe/brook/review/g3-workflow-task
Closed

moetemp wants to merge 2 commits into
moe/brook/review/basefrom
moe/brook/review/g3-workflow-task

Conversation

@moetemp

@moetemp moetemp commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What was changed

This PR adds activity.Info.workflow_task for Local Activities, and bumps Core to the merged C1, which adds field 21 to ActivityTask.Start.

  • activity.WorkflowTaskAttempt is experimental and None for other activities. Retries that the Worker runs in the same task get the same value. It also has previous_attempt and previous_started_time of the run's last completed Workflow Task.
  • The submodule pins C1's merge commit 4b3af8db on temporalio/sdk-rust (temporalio/sdk-rust#1703). C1 was squash-merged, so poe update-core refuses the move from the pre-merge pin. I moved the pin by hand and added Core's new changelog entries.
  • I dropped the imported changelog entry for the C bridge's startup timeout, since it doesn't apply to Python. The update-only activation rule in breaking-changes is already met on main since temporalio/sdk-python#2010.

Depends on C1 (temporalio/sdk-rust#1703), which is merged.
Part of the Brook review series.

Why?

A Local Activity can't find out which Workflow Task attempt dispatched it, or which earlier tasks of its run failed. Streams needs both, since readers withdraw the Records that a failed task's Local Activities wrote. Other users can scope an idempotency key to the task attempt.

Checklist

  1. How was this tested:
    • poe bridge-lint, poe lint, poe gen-docs, the new Local Activity test and the Worker, client, Workflow and Nexus suites.
    • Fork CI passes, except the arm jobs, since the fork has no arm runners.

Core gives a Local Activity the Workflow Task attempt that dispatched
it, and the run's last completed and failed tasks. The bump to C1 also
takes the Core changes on sdk-rust `main` since the pin.
Core moved `workflow_task` to field 21 when it merged, and added the attempt and the started
time of the run's last completed Workflow Task.
@moetemp

moetemp commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

Closed in favor of #381, the combined branch, which has this change.

@moetemp moetemp closed this Nov 10, 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.

1 participant