fix(deps): update dependency @aws/durable-execution-sdk-js to v2#138
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency @aws/durable-execution-sdk-js to v2#138renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
d9ff637 to
c26f722
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.1.7→^1.1.7 || ^2.0.0Release Notes
aws/aws-durable-execution-sdk-js (@aws/durable-execution-sdk-js)
v2.0.0Compare Source
First major release. Upgrade target for users on the
1.xline (last release:1.1.7).2.0.0ships six categories of change:withRetry— a new helper for retrying a chunk of durable logic(multi-operation blocks containing
waitForCallback,invoke, etc.) with aconfigurable backoff strategy.
createLinearRetryStrategyand the newretryPresets.linearpreset for fixed-increment backoff alongside theexisting exponential strategies.
context.configureSerdes()for setting default serdesonce,
createFileSystemSerdesfor offloading large payloads to a durablemount (Amazon S3 Files, EFS), and inline previews to keep PII out of
GetDurableExecutionHistoryand the AWS console.NestingType.FLATonmapand
parallelskips the per-iterationCONTEXToperation for up to 2x costreduction and up to 2x more iterations per execution, trading per-branch
observability for throughput.
specific error subclasses (
PromiseCombinatorError,CallbackExternalError,CallbackTimeoutError,CallbackSubmitterError). This is the main source ofbreaking changes for code that branches on error type.
DurableInstrumentationPlugininterface for emitting custom instrumentation. This API is experimental and
may change in a backward-incompatible way in any release.
A number of operational fixes and security updates are also included.
⚠ Upgrade guide (breaking changes)
1. Promise combinator failures now throw
PromiseCombinatorErrorcontext.Promise.all,Promise.allSettled,Promise.any, andPromise.racepreviously rejected with
StepError. They now reject withPromiseCombinatorError, which extendsDurableOperationErrordirectly — notStepErrororChildContextError.If you don't care about distinguishing the operation type, catch the base class
DurableOperationError.2. Callback failures now form a typed hierarchy under
CallbackErrorcreateCallbackandwaitForCallbackpreviously threwCallbackErrorfor everyfailure mode. v2 organizes the specific callback errors into a hierarchy and
adds
CallbackExternalError, which is thrown when the external entity completes acallback with a failure (via
SendDurableExecutionCallbackFailure):FAILEDCallbackErrorCallbackExternalErrorTIMED_OUT)CallbackErrorCallbackTimeoutErrorwaitForCallbacksubmitter threwCallbackErrorCallbackSubmitterErrorCallbackErrorCallbackErrorinstanceof CallbackErroris safe. BecauseCallbackExternalError,CallbackTimeoutError, andCallbackSubmitterErrorall extendCallbackError,existing
catch (e) { if (e instanceof CallbackError) ... }code keeps matchingall callback failures. The break only affects code that relies on the exact
errorType/namestring being"CallbackError"for external failures ortimeouts.
3. KMS exceptions during checkpoint / state APIs are non-retryable
KMS exceptions during
CheckpointDurableExecutionandGetDurableExecutionStateare now treated as non-retryable customer errors instead of being retried.
4.
runInChildContextapplies the serdes round-trip in all modesrunInChildContextpreviously randeserialize(serialize(result))only forsmall (checkpointed) payloads; large payloads (replay-children mode) and virtual
contexts returned the raw in-memory result. With a non-identity serdes, the
value a caller received depended on payload size or the virtual flag. All three
modes now apply the same round-trip, so callers observe consistent results
regardless of payload size. No public API change, but observed values may change
if you use a serdes whose
deserialize(serialize(x))differs fromx.5.
FileSystemSerdesConfig.moderenamed tostorageModeOnly relevant if you adopted
createFileSystemSerdesduring the2.0.0-alphaline;
1.xusers are unaffected.Added
withRetry— retry a block of durable logicA new helper for retrying chunks of logic that contain operations a
stepcannot host (e.g.
waitForCallback,invoke). Semantically arunInChildContextwith a retry policy wrapped around it.createLinearRetryStrategy+retryPresets.linearLinear backoff with a configurable initial delay and increment.
context.configureSerdes()+SerdesConfigSet default serdes once on the context instead of passing
serdes:to everyoperation. Defaults flow into
step,runInChildContext,invoke, andwaitForCondition. Callbacks (createCallback,waitForCallback) require anexplicit
defaultCallbackDeserializer— they keep the passthroughdeserializer otherwise so customer-provided callback payloads aren't accidentally
JSON-parsed. Per-operation
serdes:arguments still win over the default.createFileSystemSerdes(basePath, config?)A built-in
Serdesthat writes each value to a file underbasePathand storesonly a small file pointer in the checkpoint, keeping executions under the
per-checkpoint size limit (~256KB) when individual operations produce large
results. Supports
FileSystemSerdesMode.ALWAYS(default) andFileSystemSerdesMode.OVERFLOW(inline JSON until a threshold, then spill to afile).
It also accepts an optional
generatePreviewfunction (with thebuildPreviewhelper plus
PreviewMode,FieldMatchMode) to store a redacted inline previewin the checkpoint while keeping the full value on disk — useful for keeping PII
out of
GetDurableExecutionHistoryand the AWS console.NestingTypeformapandparallelTrade observability for cost on batch operations. The default is
NestingType.NESTED(existing behavior), so existing code is unaffected unlessyou opt in.
NestingType.FLATskips per-iterationCONTEXToperations for upto 2x cost reduction and higher per-execution scale, at the price of less
detailed history.
errorMapperonChildConfigrunInChildContext, promise combinators, andwithRetryaccept a function toremap the thrown error type — useful when you want a domain error class instead
of
ChildContextError.Instrumentation plugin system (experimental)
A new
DurableInstrumentationPlugininterface with lifecycle hooks forexecution, invocation, operation, and attempt-level events, composed by a plugin
runner and wired through the entire execution path (
step,runInChildContext,invoke,wait,waitForCondition, callbacks). Register plugins via the newpluginsfield onDurableExecutionConfig. Plugin errors are isolated(fire-and-forget) and can never alter customer output.
Safe
DurableContextdetectionDurableContextImplnow carries a package-namespacedSymbol.for("@​aws/durable-execution-sdk-js/durable-context")brand and aSymbol.toStringTagof"DurableContext", so external libraries can detect adurable context without importing the SDK or relying on name checks.
Changed
Promise combinators no longer block Lambda termination during idle waits.
context.Promise.all,Promise.allSettled,Promise.any, andPromise.racepreviously ran each branch inside an internal
ctx.step. A step keeps theLambda invocation alive, so when every branch was idle (e.g. all waiting on a
waitorwaitForCallback) the function could not be torn down and you keptpaying for idle compute. The combinators are now implemented on top of
runInChildContext, which lets Lambda terminate while all branches are idleand resume on a later invocation.
Consequence — execution history shape changes. Because each branch now runs
in a child context instead of a step,
GetDurableExecutionHistory(and the AWSconsole) now show a
CONTEXToperation per branch instead of aSTEPoperation. Anything that parses history or asserts on operation types/counts
for code using promise combinators must be updated. This change is also what
enables the typed
PromiseCombinatorError(upgrade guide §1).UserAgent header uses
aws-durable-execution-sdk-js/<version>and appends-bundledwhen running from the Lambda bundled runtime path.Fixed
errorDatais preserved across nestedrunInChildContextboundaries.DurableOperationError.toErrorObjectnow walks the cause chain (bounded to 10hops) to surface the first
errorDatait finds, instead of dropping it eachtime an error is re-wrapped in a fresh
ChildContextError.in batch operations.
PromiseCombinatorErrorsurvives replay. It was missing fromDurableOperationError.fromErrorObject, so it deserialized asStepErroronreplay, breaking
instanceofchecks and error-identity determinism.buildPreviewno longer leaks excluded subtrees. A field excluded viaFieldMatchMode.PATHstill had its descendant leaves surface underINCLUDE_ALLmode, leaking PII intoGetDurableExecutionHistory. Excludednodes now skip recursion entirely.
createFileSystemSerdesOVERFLOW threshold accounts for double-encoding.The check now measures the final persisted envelope (
{ data: <json> }, whichre-escapes quotes/backslashes and inflates size 10–30%) rather than the raw
inline JSON, so boundary payloads correctly overflow to file and stay under the
~256KB checkpoint limit.
shouldRetry: falseno longer crashes on replay.An
AtMostOncePerRetrystep interrupted (e.g. Lambda timeout) whose retrystrategy declines a retry now passes the required metadata when marking the
operation complete, instead of throwing
metadata required on first callon afresh Lambda instance.
context.getSourceCode()so the plugin works onESLint v10.
DeleteFunctioncalls during cleanup inintegration tests.
Security
@aws-sdk/*deps to pull in the patchedfast-xml-parser.fast-xml-parser,handlebars,flatted,lodash,minimatch,picomatch, andvite; updateeslint-plugin-tsdocto^0.5.2.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.