Skip to content

sdk-2.7.0 / otel-1.2.0 / test-1.3.1

Choose a tag to compare

@zhongkechen zhongkechen released this 16 Oct 17:42
· 135 commits to main since this release
Immutable release. Only release title and notes can be modified.
911b7f0
Package Published version Prepared version
@aws/durable-execution-sdk-js 2.6.0 2.7.0
@aws/durable-execution-sdk-js-otel 1.1.0 1.2.0
@aws/durable-execution-sdk-js-testing 1.3.0 1.3.1

These versions are already on main through #956. Use the exact sdk-2.7.0 tag for Lambda managed-runtime rollout. Package changes have separate timelines below.

@aws/durable-execution-sdk-js

Why Upgrade

  • Get consistent waitForCondition state and results across initial execution and replay, including with custom serializers and wait strategies that mutate their input.
  • Keep successful undefined results from map and parallel, so batch result lists remain consistent with success counts.
  • Improve instrumentation accuracy with fresh completion IDs in local/custom-client invocations and clear diagnostics for conflicting OTel registrations.
  • Enable optional trace metadata for each new durable invoke checkpoint, without changing the application payload, using the updated Lambda client support.

What's Changed

  • fix(sdk): preserve UpdatedOperationIds in local/custom-client invocation inputs so instrumentation can distinguish fresh external completions from replay, by @zhongkechen in #954.
  • fix(sdk): reject competing execution and invocation OTel views across supported registration paths, with diagnostics identifying the conflict, by @zhongkechen in #956.
  • fix(sdk): round-trip waitForCondition initial state through the configured serializer before the first check, and deserialize the checkpointed success payload before returning it. Initial execution and replay now agree even when a wait strategy mutates its input, by @musatoktas in #974.
  • fix(sdk): preserve successful map/parallel branches returning undefined in BatchResult.succeeded() and getResults(), including mock results and replay, by @shin4141 in #982.
  • feat(sdk): collect optional plugin trace metadata for new context.invoke() START checkpoints and serialize the X-Ray header in ChainedInvokeOptions.XAmznTraceId. Existing checkpointed STARTs retain their replay behavior. The Lambda client dependency is now ^3.1152.0, by @zhongkechen in #957.
  • chore(deps): refresh SDK dependencies and build tooling, by @ParidelPooya in #985 and #992.

Serializer behavior: #974 adds a serialize/deserialize round-trip for initialState and an additional deserialization on success. Invalid initial state is rejected before the first condition check.

Full Changelog (reviewed main): sdk-2.6.0/test-1.3.0...911b7f0e

@aws/durable-execution-sdk-js-otel

Why Upgrade

  • Follow workflows across suspension and resume with polling continuation links, invocation timestamps aligned with application instrumentation, and earlier execution-root export for eligible fallback traces.
  • See fresh wait, invoke, and callback completions while reducing duplicate terminal spans on successful replays.
  • Supply calling-operation identity and sampling decisions, including Sampled=0, in optional chained-invoke metadata when used with core 2.7.0 and a compatible tracer.

What's Changed

  • fix(otel): export an SDK-owned synthetic execution root for fallback traces, by @blackmore-technology-group in #935.
  • fix(otel): declare mutually exclusive execution/invocation views while preserving provider API version 1, by @zhongkechen in #956.
  • fix(otel): align invocation-view span timestamps with the user instrumentation clock, by @zhongkechen in #962.
  • fix(otel): link resumed polling operation segments to their initial operation and Workflow; keep each polling attempt under its operation parent with a Workflow link, by @zhongkechen in #964.
  • fix(otel): export the stable synthetic root at the start of each eligible sampled fallback invocation, including invocations that later suspend. Emit at most one copy per invocation; identical copies on retries and resumes can recover an earlier lost export, by @zhongkechen in #966.
  • fix(otel): retain fresh completion notifications from invocation inputs and checkpoint responses, export wait/invoke/callback completions, and suppress duplicate terminal spans on later successful replays. Drain remaining notifications at invocation end, by @zhongkechen in #953.
  • feat(otel): supply chained-invoke Root/Parent/Sampled metadata from the resolved execution trace and calling operation, including Sampled=0, without creating additional spans. Omit this metadata when the durable sampler bridge cannot be verified, by @zhongkechen in #957.
  • chore(deps): update build and test dependencies, including property-based test tooling, while retaining the existing runtime peer ranges, by @ParidelPooya in #985 and #992.

Synthetic-root behavior: Early export requires a stable backend executionStartTimestamp and a tracer whose sampler supports the durable wrapper. Missing timestamps or opaque samplers retain the terminal-only fallback. The root is a zero-duration identity anchor with execution-ARN-scoped identity; Workflow carries execution duration and outcome. A later eligible invocation can retry delivery, but export is not guaranteed after process loss or a service-side stop before any successful delivery. Complete propagated remote parents are not materialized as SDK-owned roots.

Replay visibility: #953 needs operation metadata or lifecycle hooks. For completed child contexts, configure sufficient pluginsConfig.childOperationsDepth to retain the child operations whose completions must remain visible. Failed/RETRYING invocations may re-export recovery data if the runtime redelivers updated operation IDs; no export acknowledgement is persisted in checkpoints.

Chained-invoke propagation: The new checkpoint hook requires core 2.7.0. Local serialization and compatibility coverage do not yet establish deployed caller/callee Root/Parent/Sampled delivery or the expected parent topology. Sampled cloud traces alone do not qualify unsampled delivery.

LMI scope: The LMI changes in #955 will ship with the breaking LMI fixes in a future major release. They are excluded from this release and are not a prerequisite for it.

The optional core peer remains >=2.4.0 <3.0.0, and separate OTel-only Lambda layers remain supported. The JS repository publishes npm packages; it has no OTel Lambda-layer publication workflow.

Full Changelog (reviewed main): otel-1.1.0...911b7f0e

@aws/durable-execution-sdk-js-testing

Why Upgrade

  • Catch checkpoint errors locally with validation closer to the service's operation metadata, option, and payload rules, reducing surprises after deployment.
  • Exercise more realistic replay inputs by excluding descendants of completed contexts unless ReplayChildren is enabled.
  • Run local tests faster by removing the fixed 100 ms completion delay and scheduling queued invocations independently of fake-clock advancement.

What's Changed

  • fix(test): admit compatible later 2.x core versions through the peer range >=1.0.1 <3.0.0, by @zhongkechen in #956.
  • fix(test): align local checkpoint validation with the service's operation metadata, option constraints, JSON types, and payload limits. Callback and heartbeat timeout values of 0 now mean no timeout, by @ParidelPooya in #996.
  • fix(test): omit descendants of completed contexts from invocation inputs and GetDurableExecutionState unless ReplayChildren is enabled. Apply the rule across all ancestors, including unfinished branches under an early-completed map or parallel, by @ParidelPooya in #1002.
  • fix(test): drain final checkpoint updates before run() settles, removing the fixed 100 ms completion delay for both resolved executions and runner-level rejections, by @ParidelPooya in #1003 and #1009.
  • fix(test): speed up tests using skipTime by scheduling queued invocations independently of the fake clock's 20 ms advancement interval. Durable timers and timestamps remain controlled by the fake clock, with FIFO ordering and sequential execution preserved, by @ParidelPooya in #1010.
  • chore(deps): update the Lambda client dependency to ^3.1150.0, Commander to ^14.0.3, and development tooling, by @ParidelPooya in #985 and #992.

Local-test behavior changes: Tests relying on permissive validation or previous error messages may need updates. STEP/CONTEXT output is limited to 256 KiB, chained-invoke input to 1 MiB, and execution output to 6 MiB; the error limit increases from 32 KiB to 256 KiB. Fractional integer options are truncated, so a 1.5-second wait records and waits 1 second. Invalid checkpoints now fail the execution with CheckpointUnrecoverableExecutionError rather than only rejecting the invocation. Some service checks, including cross-account/region invocation validation, remain outside the local runner.

Runner operation inspection still retains all operations after replay pruning. Handler failures returning a FAILED result and runner-level rejections both use the faster drain path. Tests expecting run() to reject should attach a rejection handler before awaiting other work; the former 100 ms delay could mask handlers attached too late. A failed final drain rejects an otherwise resolving run() rather than returning an incomplete result. If the runner is already rejecting, its original error is preserved and the drain error is logged.

Testing 1.3.1 accompanies the core and OTel minor releases. The invocation-input metadata correction is in core 2.7.0 (#954); use that core version with the testing package to receive the fix.

Full Changelog (reviewed main): sdk-2.6.0/test-1.3.0...911b7f0e

New Contributors

Full Changelog: sdk-2.6.0/test-1.3.0...sdk-2.7.0