Repository navigation
Notable Changes
Added
-
Add experimental Nexus Handler Callbacks for standalone Nexus operations through
NexusClient.start_operation. Usetemporalio.nexus.create_completion_callbackto send the result or failure and source context to a Nexus handler. -
Workers that don't configure poller behavior now auto-enroll in poller autoscaling when the server enables it (
frontend.pollerAutoscalingAutoEnroll); otherwise they keep using a fixed 5-poller maximum. -
Add experimental envconfig extensions:
ClientConfig.load_client_connect_configacceptsextensionsthat read their own config fromprofile.<profile>.ext.<name>TOML tables (exposed asClientConfigProfile.extand never rejected by strict mode) and env vars, and contribute client plugins to the returned config'splugins. -
Core: A local activity's
ActivityTask.Starthasworkflow_task(field 21), with the started event id, attempt and start time of the workflow task in which Core dispatched it.workflow_taskalso hasprevious_started_event_id,previous_attemptandprevious_started_time, which name the run's last completed workflow task, andfailed_tasks, the started event ids of the run's last 100 failed or timed out workflow tasks. Retries that Core runs locally keep the value. Core leaves it unset for other activities. -
Core: Client environment config profiles include the raw TOML tables under
profile.<name>.ext, keyed by extension name, for SDK envconfig extensions. Strict mode accepts any content underext. The C bridge's profile JSON includes them as anextobject, with TOML datetimes as strings. -
Client and worker plugins have a new
Plugin.version()method. Worker plugins report it in worker heartbeats; override it or passversiontoSimplePlugin. -
Add Python 3.15 support.
-
Nexus operation handlers now propagate their
NexusSerializationContextto the workflow updates they send, which encode their result, failure and rejection with it. Update handles decode them with the context the server returns. Requires a server that propagates the context. -
Nexus operation handlers now propagate their
NexusSerializationContextto the workflows and standalone activities they start, which encode their results and failures (and a standalone activity's heartbeat details) with it because these are returned to the Nexus caller. Clients decode them with the context the server returns, including handles obtained by ID and standalone Nexus operation handles. Requires a server that propagates the context. -
Added
activity.Info.nexus_serialization_context. To complete a Nexus-started standalone activity asynchronously, pass it toAsyncActivityHandle.with_context. -
Warn when
asyncio.TaskGroupis created in a sandboxed workflow because its non-deterministic task cancellation order can cause replay failures.
Changed
-
Core: Poller pools now report their poller target to the server on each poll and in the worker heartbeat: the current target for autoscaling pools, the configured maximum for fixed-size pools. (We'll use this count on the server side for now for load balancing pollers between workers, and for creating a per-worker poller count metric.)
-
Process workflow activation jobs as a single batch by default (workflow logic flag 2), so signal and update handlers no longer run before other jobs delivered in the same workflow task, such as the random seed update after a reset. Histories that record this flag replay with the new ordering only on SDK 1.31.0 or later.
-
Cancelling a Nexus operation handle after its synchronous response has already arrived now raises
CancelledErrorwhen the handle is awaited, matching activities, instead of returning the result. -
Update the
langsmithextra to requiretemporalio-langsmith>=0.1.1.
💥 Breaking Changes
-
Drop Python 3.10 support; Python 3.11 or newer is now required.
-
The workflow sandbox now restricts
time.clock_gettime()andtime.clock_gettime_ns()at runtime, liketime.time()andtime.monotonic(). Calling them from workflow code raisesRestrictedWorkflowAccessError. -
Experimental: a Temporal operation handler can now send only one signal (including signal-with-start) per invocation; a second raises a
BAD_REQUESTerror, unless the first signal failed. Signals from other Nexus operation handlers are not limited. -
Core: Core now rejects activation responses with a nondeterminism error if the activation contained only updates and the response rejects every update but also includes another workflow command. SDKs must return only update rejections when all validators reject an update-only activation.
-
Regenerate Python bindings with grpcio-tools 1.49.1. The SDK now requires protobuf >=4.21.12 (protobuf 3 is no longer supported), and the optional grpc extra requires grpcio >=1.49.1.
Fixed
-
temporalio.contrib.pydantic: settingToJsonOptionson the Pydantic payload converter no longer drops field aliases or serializesinf/nanasnull; the JSON output now matches the default converter apart from the options themselves. -
Core: Downloading an ephemeral dev or test server binary now retries transient HTTP failures, such as a
503returned while a release is rolling out, with backoff instead of failing on the first attempt. -
Fix the payload converter and failure converter losing their serialization context when external storage is configured. A converter that implements WithSerializationContext now gets the workflow, activity or other context whether or not external storage is enabled.
-
temporalio.contrib.aws.lambda_worker:shutdown_hooksnow run before configuration teardown when an invocation fails or is cancelled after configuration setup succeeds, including task queue validation failures. -
temporalio.contrib.aws.lambda_worker.otel.apply_defaultsnow creates its tracer provider once per process, so warm Lambda invocations no longer leak an OTLP span exporter thread and gRPC channel each time. -
Core: A workflow task failure reported with the cause
WORKFLOW_TASK_FAILED_CAUSE_EXTERNAL_STORAGE_FAILUREis now counted onworkflow_task_execution_failedwithfailure_reason="ExternalStorageError", matching activity failures with the storage cause. It was previously counted asWorkflowError. -
Core: Ephemeral dev and test servers now complete the automatic port reservation handshake on Linux and macOS before starting, preventing intermittent address-in-use errors during TCP teardown.
-
Core: Resource-based worker tuners now read CPU usage and quotas from standard cgroup v1 mounts. Workers on cgroup v1 systems no longer fall back to host CPU usage and admit work based on understated container load.
-
asyncio.sleep(),asyncio.wait_for()and other asyncio timers no longer reuse thetimeout_summaryand Event Groups of an earlierworkflow.wait_condition()call in the same task. -
Fix
contrib.opentelemetryMetricsExporterrecording a metric under another metric's instrument or another attribute set's labels when instruments or attributes are created per call. It cached them byid(), which Python reuses once an object is freed. -
Calling
Worker.run()again on the same worker now raisesRuntimeError("Already started")instead of a bridge panic. -
Keep an empty TLS table when
ClientConfigProfileandClientConfigare converted to and from dictionaries, so a profile that enables TLS with default settings does not lose it. -
Workflow workers without a payload codec or external storage skip the payload codec passes and the per-command serialization-context lookups on every activation and completion, restoring the workflow task and replay performance lost since 1.23.
-
Fix OpenTelemetryPlugin dropping the worker-side span for a rejected update or a failed query. An exception from an update validator or query handler does not fail the workflow task, so its span is now ended and exported with an error status.
-
Experimental: signals and signal-with-start sent from a Temporal operation handler now reuse the Nexus operation request ID, so a retried Nexus task no longer delivers the same signal twice.
-
Fix OpenTelemetry logger attribute typing and logger-provider test collection with OpenTelemetry 1.45 and newer by accepting string-keyed mappings without restricting attribute value types.
-
Core: Preserve queued queries across workflow eviction so requests for the same run are answered instead of silently dropped.
-
Core: Rejection-only update tasks no longer dispatch local activities resumed from replay before validation, allowing those tasks to remain unrecorded in workflow history.
-
Core: Preparing a legacy query now remains in replay mode, preventing unrecorded local activity attempts that could execute twice or leave the workflow stuck.
-
Fix argument conversion for activity methods that annotate
selfwithSelf.
SDK Core Commits
489337edRemove activity cancel tokens once the activity finishes (#1677)6dd00313Honored the per-runner timeout for the integ test matrix. (#1674)849f9ae0Fix Nexus metrics shutdown race (#1672)2286cf22feat: add external storage concurrency limiter APIs (#1673)994bab3cfeat: allow customizing test server startup timeout (#1678)c9c31a82Extend polling test server startup timeout (#1681)829eb7ebKeep legacy query preparation in replay mode (#1658)4433bf1bbuild(deps): update rstest requirement from 0.26 to 0.27 (#1683)0a5d6462Update API (#1690)34ee222cMigrate user-facing Rust SDK changelog to release fragments (#1635)b16e8088fix(core): preserve buffered queries across run eviction (#1693)ea118d37fix: skip wait conditions when a task only rejects updates (#1697)85975e9bClarify contributor restrictions on soliciting user information (#1680)7a7144e1Extend fixed test server startup timeout (#1698)42e9ada7feat: add external storage runner (#1696)aaa0db5fUse API activity failure cause (#1609)535216c6Add Required PR Checks job to gate merges (#1695)d28e7be2Propagate Nexus serialization context to workflow, update and activity tasks (#1717)2963d617refactor: separate storage driver errors from external storage errors (#1705)f49305f1feat: reject external storage references with TMPRL1105 (#1706)c4045f18Fallback to cgroup v1 for cpu in the resource based tuner (#1702)a3cf9059Fix heartbeat test poller configuration (#1723)e3f73fcafix: defer storage reference retrieval storage in describe calls (#1720)cd0e3d84feat: offload large payloads via external storage (#1708)3a4ad95eEnsure waiters are always notified in Nexus worker (#1244)d8720a5brefactor: gather external storage code into one module (#1726)70b594f1feat: report storage driver types in worker heartbeats (#1724)9ea86f57VLN-1791: fix mise-action-below-v5 (#1725)a7735951feat: provide storage drivers target information (#1728)4b3af8dbfeat(brook): add the dispatching Workflow Task to each Local Activity start (#1703)c198a965feat: offload activity heartbeat details to external storage (#1729)a7d198eeExtract shared sticky polling machinery (#1686)1fd54a9eReserve ephemeral ports on macOS (#1735)f4b8b2b3feat: report external storage failures with the storage failure cause (#1738)8dff9b84Test poller autoscaling signal handling (#1722)3c99279cfeat: accept plugin versions through the C bridge (#1751)e1ae09e0Complete ephemeral port teardown (#1754)96926faeRun required PR checks only on pull requests (#1748)ad7caa94build(deps): update lru requirement from 0.18 to 0.19 (#1742)bd999ef3build(deps): update rstest requirement from 0.27 to 0.28 (#1741)2f972ee6fix(client): apply the data converter to workflow user metadata (#1750)67174ea9fix: request update completion for execute update (#1755)51009f8cPreserve encoded schedule actions and add OTel header opt-in (#1734)3a83c693ci: remove macos-intel from PR builds (#1756)0713f0c2feat: report external storage metrics on workflow completions (#1740)1aebc388feat: store and retrieve a message's payload fields concurrently (#1744)b9016f4ffeat(envconfig): add extension support (#1736)d4ef50addocs: consolidate unreleased external storage changelog entries (#1761)ff30d403fix(client): send retained schedule actions back without re-storing them (#1758)8751afdbci: run the macOS arm jobs on macos-15 (#1763)687ffb05chore: bump rust version & wasmtime (#1767)4c3d2e49Synchronize worker shutdown eviction test (#1757)38dfee48fix: retry ephemeral server downloads and reduce port test churn (#1764)2af87425docs: fix stale crates/core paths after rename to sdk-core (#1771)f2770d0fReport poller target on each poll and in the worker heartbeat (#1688)96032e69Add extstore s3 driver (#1721)396c6adbchore: downversion s3 driver for manual release (#1777)c675c324chore: release 1.2.0 (#1778)
What's Changed
- Bump authlib from 1.8.0 to 1.9.1 by @dependabot[bot] in #2032
- Update temporalio-langsmith to 0.1.1 by @VegetarianOrc in #2033
- Fix OpenTelemetry logger attribute compatibility by @tconley1428 in #2035
- keep aliases and inf/nan when ToJsonOptions is set by @avanish-garg in #2039
- Add nexus handler callbacks for SANO by @VegetarianOrc in #1926
- Update Core by @JoshuaFrenchwood in #2042
- Keep converter serialization context when external storage is enabled by @parbhatkapila4 in #2050
- Test custom slot supplier slot info fields by @dalindev in #2048
- Move macOS arm64 release runner to macos-15 by @jmaeagle99 in #2051
- Allow os.path in the workflow sandbox on Python 3.13.12+ by @pcbeingused333 in #2061
- Export OpenTelemetry spans for rejected updates and failed queries by @parbhatkapila4 in #2057
- Preserve an empty TLS table in envconfig dict conversion by @Jackmeson1 in #2054
- Stop later asyncio timers from reusing wait_condition's summary and Event Groups by @LindseyZ1205 in #2059
- Restrict time.clock_gettime and clock_gettime_ns in the workflow sandbox by @Jackmeson1 in #2055
- Fix MetricsExporter mixing up instruments and labels when object ids are reused by @sohom-cs in #2037
- Fix activity search attribute test on Cloud by @tconley1428 in #2078
- Fix activity method Self annotation handling by @VegetarianOrc in #2065
- Run required PR checks only on pull requests by @yuandrew in #2077
- Report plugin versions in worker heartbeats by @campoy in #2064
- Bump joserfc from 1.7.5 to 1.7.6 by @dependabot[bot] in #2082
- Reject repeated Worker.run() before bridge validation by @Jackmeson1 in #2074
- Enable single-batch workflow activation processing by default by @DABH in #2081
- Pass unset poller behavior to core so workers can auto-enroll in poller autoscaling by @veeral-patel in #2066
- Nexus serialization context workflows activities by @JoshuaFrenchwood in #2043
- Propagate Nexus serialization context to workflow updates by @JoshuaFrenchwood in #2045
- Update sdk-core to main (ff30d403) by @johanngan in #2093
- feat(envconfig): add extension support by @johanngan in #2079
- Support Python 3.11 through 3.15 by @VegetarianOrc in #2088
- Dedup retried Nexus signals by @atol in #2036
- Bump protobuf from 4.25.9 to 5.29.6 by @dependabot[bot] in #2096
- create OTel tracer provider once per process by @avanish-garg in #2041
- Increase CI test timeouts by @VegetarianOrc in #2097
- Run Lambda worker shutdown hooks when an invocation fails by @Jackmeson1 in #2073
- Warn against asyncio TaskGroup in workflows by @VegetarianOrc in #2085
- Skip no-op payload passes and context lookups without a codec or external storage by @tonypodero in #2090
- Cap pytest below 9.2 for pytest-asyncio compatibility by @VegetarianOrc in #2113
- Update sdk-core to core-v0.11.0 (c675c324) by @veeral-patel in #2109
- Prepare release 1.36.0 by @VegetarianOrc in #2110
New Contributors
- @dalindev made their first contribution in #2048
- @pcbeingused333 made their first contribution in #2061
- @Jackmeson1 made their first contribution in #2054
- @sohom-cs made their first contribution in #2037
- @campoy made their first contribution in #2064
- @veeral-patel made their first contribution in #2066
- @johanngan made their first contribution in #2093
- @tonypodero made their first contribution in #2090
Full Changelog: 1.35.0...1.36.0