Skip to content

1.36.0

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Nov 01:12
4733537

Notable Changes

Added

  • Add experimental Nexus Handler Callbacks for standalone Nexus operations through NexusClient.start_operation. Use temporalio.nexus.create_completion_callback to 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_config accepts extensions that read their own config from profile.<profile>.ext.<name> TOML tables (exposed as ClientConfigProfile.ext and never rejected by strict mode) and env vars, and contribute client plugins to the returned config's plugins.

  • Core: A local activity's ActivityTask.Start has workflow_task (field 21), with the started event id, attempt and start time of the workflow task in which Core dispatched it. workflow_task also has previous_started_event_id, previous_attempt and previous_started_time, which name the run's last completed workflow task, and failed_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 under ext. The C bridge's profile JSON includes them as an ext object, 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 pass version to SimplePlugin.

  • Add Python 3.15 support.

  • Nexus operation handlers now propagate their NexusSerializationContext to 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 NexusSerializationContext to 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 to AsyncActivityHandle.with_context.

  • Warn when asyncio.TaskGroup is 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 CancelledError when the handle is awaited, matching activities, instead of returning the result.

  • Update the langsmith extra to require temporalio-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() and time.clock_gettime_ns() at runtime, like time.time() and time.monotonic(). Calling them from workflow code raises RestrictedWorkflowAccessError.

  • Experimental: a Temporal operation handler can now send only one signal (including signal-with-start) per invocation; a second raises a BAD_REQUEST error, 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: setting ToJsonOptions on the Pydantic payload converter no longer drops field aliases or serializes inf/nan as null; 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 503 returned 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_hooks now 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_defaults now 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_FAILURE is now counted on workflow_task_execution_failed with failure_reason="ExternalStorageError", matching activity failures with the storage cause. It was previously counted as WorkflowError.

  • 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 the timeout_summary and Event Groups of an earlier workflow.wait_condition() call in the same task.

  • Fix contrib.opentelemetry MetricsExporter recording a metric under another metric's instrument or another attribute set's labels when instruments or attributes are created per call. It cached them by id(), which Python reuses once an object is freed.

  • Calling Worker.run() again on the same worker now raises RuntimeError("Already started") instead of a bridge panic.

  • Keep an empty TLS table when ClientConfigProfile and ClientConfig are 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 self with Self.

SDK Core Commits

  • 489337ed Remove activity cancel tokens once the activity finishes (#1677)
  • 6dd00313 Honored the per-runner timeout for the integ test matrix. (#1674)
  • 849f9ae0 Fix Nexus metrics shutdown race (#1672)
  • 2286cf22 feat: add external storage concurrency limiter APIs (#1673)
  • 994bab3c feat: allow customizing test server startup timeout (#1678)
  • c9c31a82 Extend polling test server startup timeout (#1681)
  • 829eb7eb Keep legacy query preparation in replay mode (#1658)
  • 4433bf1b build(deps): update rstest requirement from 0.26 to 0.27 (#1683)
  • 0a5d6462 Update API (#1690)
  • 34ee222c Migrate user-facing Rust SDK changelog to release fragments (#1635)
  • b16e8088 fix(core): preserve buffered queries across run eviction (#1693)
  • ea118d37 fix: skip wait conditions when a task only rejects updates (#1697)
  • 85975e9b Clarify contributor restrictions on soliciting user information (#1680)
  • 7a7144e1 Extend fixed test server startup timeout (#1698)
  • 42e9ada7 feat: add external storage runner (#1696)
  • aaa0db5f Use API activity failure cause (#1609)
  • 535216c6 Add Required PR Checks job to gate merges (#1695)
  • d28e7be2 Propagate Nexus serialization context to workflow, update and activity tasks (#1717)
  • 2963d617 refactor: separate storage driver errors from external storage errors (#1705)
  • f49305f1 feat: reject external storage references with TMPRL1105 (#1706)
  • c4045f18 Fallback to cgroup v1 for cpu in the resource based tuner (#1702)
  • a3cf9059 Fix heartbeat test poller configuration (#1723)
  • e3f73fca fix: defer storage reference retrieval storage in describe calls (#1720)
  • cd0e3d84 feat: offload large payloads via external storage (#1708)
  • 3a4ad95e Ensure waiters are always notified in Nexus worker (#1244)
  • d8720a5b refactor: gather external storage code into one module (#1726)
  • 70b594f1 feat: report storage driver types in worker heartbeats (#1724)
  • 9ea86f57 VLN-1791: fix mise-action-below-v5 (#1725)
  • a7735951 feat: provide storage drivers target information (#1728)
  • 4b3af8db feat(brook): add the dispatching Workflow Task to each Local Activity start (#1703)
  • c198a965 feat: offload activity heartbeat details to external storage (#1729)
  • a7d198ee Extract shared sticky polling machinery (#1686)
  • 1fd54a9e Reserve ephemeral ports on macOS (#1735)
  • f4b8b2b3 feat: report external storage failures with the storage failure cause (#1738)
  • 8dff9b84 Test poller autoscaling signal handling (#1722)
  • 3c99279c feat: accept plugin versions through the C bridge (#1751)
  • e1ae09e0 Complete ephemeral port teardown (#1754)
  • 96926fae Run required PR checks only on pull requests (#1748)
  • ad7caa94 build(deps): update lru requirement from 0.18 to 0.19 (#1742)
  • bd999ef3 build(deps): update rstest requirement from 0.27 to 0.28 (#1741)
  • 2f972ee6 fix(client): apply the data converter to workflow user metadata (#1750)
  • 67174ea9 fix: request update completion for execute update (#1755)
  • 51009f8c Preserve encoded schedule actions and add OTel header opt-in (#1734)
  • 3a83c693 ci: remove macos-intel from PR builds (#1756)
  • 0713f0c2 feat: report external storage metrics on workflow completions (#1740)
  • 1aebc388 feat: store and retrieve a message's payload fields concurrently (#1744)
  • b9016f4f feat(envconfig): add extension support (#1736)
  • d4ef50ad docs: consolidate unreleased external storage changelog entries (#1761)
  • ff30d403 fix(client): send retained schedule actions back without re-storing them (#1758)
  • 8751afdb ci: run the macOS arm jobs on macos-15 (#1763)
  • 687ffb05 chore: bump rust version & wasmtime (#1767)
  • 4c3d2e49 Synchronize worker shutdown eviction test (#1757)
  • 38dfee48 fix: retry ephemeral server downloads and reduce port test churn (#1764)
  • 2af87425 docs: fix stale crates/core paths after rename to sdk-core (#1771)
  • f2770d0f Report poller target on each poll and in the worker heartbeat (#1688)
  • 96032e69 Add extstore s3 driver (#1721)
  • 396c6adb chore: downversion s3 driver for manual release (#1777)
  • c675c324 chore: release 1.2.0 (#1778)

What's Changed

New Contributors

Full Changelog: 1.35.0...1.36.0