Repository navigation
fix: propagate context into handler workers - #756
zhongkechen wants to merge 22 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…/python-756-20261006 # Conflicts: # packages/aws-durable-execution-sdk-python-otel/README.md
…/python-756-20261006
| concurrency: | ||
| group: otel-conformance-tests | ||
| cancel-in-progress: false | ||
| queue: max |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Checked the current official Actions workflow schema: concurrency-mapping supports queue, whose allowed values are single and max. Both workflow-level and job-level concurrency use this mapping.
The reviewed head 74c5486 has also completed Cloud tests and Conformance Tests successfully with these declarations, so the workflows are accepted and running. Keeping queue: max together with cancel-in-progress: false retains pending runs while preserving the active tests.
This comment has been minimized.
This comment has been minimized.
Codex AI reviewNo actionable findings. Residual risk: static inspection only; tests were not executed per request. Reviewed commit |
Fixes #428.
Carry invocation-start context into the SDK-owned handler worker so ordinary user spans and logs inherit the durable trace. Opted-in Invocation/Execution scopes bind the existing Invocation/Workflow span when the ambient parent is absent or unrelated, retain valid same-trace parents and baggage, and restore context on return, failure or suspension.
Isolate plugin-bearing invocation context from the host. Failed startup or scope-entry bindings are discarded before subsequent setup and user code; finalizers retain the Context that owns their tokens. Existing hook threads/order, result/exception identity and the no-plugin path are preserved.
Optional scopes require literal
__durable_handler_context_api__ = 1on the concrete class. The generic base provides no marker/default hook, so old helpers, properties and dynamic attributes remain untouched; custom subclasses explicitly redeclare the marker. Provider API 1, dependency floors, plugin lifetime and checkpoint/replay formats are unchanged. This fix is independent of #737. Supported older cores load the new plugin and retain their existing tracing behavior; the new worker-scope behavior requires the updated core.Validation:
test-pypi-otel-minimumlane pins actual installed core 2.0.0 and passes all 362 pre-existing-suite cases plus 14 valid registration cases; exact version, site-packages import and absence of the new handler API are asserted. The separate installed core 2.0.x legacy lane passes 14 cases. Repository type checks, formatting and workflow wiring pass. The capable installed-core lane requires core 2.1+ and was not run locally; runtime dependencies still support core 2.0.0.Cross-SDK conformance coverage is in #758 and aws/aws-durable-execution-conformance-tests#131. Current-head CI and actual AI review generation/posting are monitored separately.