[Major Release]: Java SDK v2 #457
zhongkechen
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Major Release 2.0 Breaking Changes Summary
This document summarizes the currently open issues labeled
BREAKINGand organizes them using the structure from .github/DISCUSSION_TEMPLATE/major-releases.yml.Source issue query: open BREAKING issues
Primary purpose of this major release: align Java logger metadata with the other SDKs. The headline change is renaming
durableExecutionArntoexecutionArn, and the associated logger metadata cleanup also renamescontextIdtooperationIdandcontextNametooperationName. The other breaking changes are included as secondary 2.0 cleanup and correctness work.Proposed Version Number
2.0.0Description of the Breaking Changes
Align Java logger metadata with other SDKs (primary change for 2.0)
Issue: #440, discussion #438, implementation PR #465
{ "durableExecutionArn": "arn:aws:lambda:...", "contextId": "child-context-id", "contextName": "inventory-check" }{ "executionArn": "arn:aws:lambda:...", "operationId": "child-context-id", "operationName": "inventory-check" }Remove deprecated
StepConfig.semanticsin favor ofsemanticsPerRetryIssue: #452
Use per-context replay status for logging and plugin callbacks
Issue: #383
Throw
IllegalStateExceptionfor context validation failures instead ofIllegalDurableOperationExceptionIssue: #455
stepFuture.get()inside another step can surface asIllegalDurableOperationExceptionIllegalStateExceptionAlways serialize and deserialize child context results before returning them, including large-payload and virtual child-context paths
Issue: #456
Justification for the Changes
executionArnname, and PR #465 carries the relatedcontextIdtooperationIdandcontextNametooperationNamecleanup.StepConfig.semanticsis already deprecated because it has incorrect behavior for interrupted steps. Keeping it in the API invites users onto the wrong knob and forces the SDK to preserve confusing semantics.IllegalDurableOperationExceptionis intended for SDK or backend correctness problems. Using it for customer validation errors misclassifies the fault and makes operational handling noisier than it should be.Changes Needed in Consuming Code
1. Update log queries, dashboards, and alerts for the new logger metadata keys
durableExecutionArnwithexecutionArnin CloudWatch Logs Insights queries, metric filters, dashboards, parsers, and alert rules that read Java SDK logs.contextIdwithoperationIdandcontextNamewithoperationNameanywhere you parse or index Java SDK log metadata.2. Replace
semantics(...)withsemanticsPerRetry(...)StepConfig.builder().semantics(...)usage tosemanticsPerRetry(...).config.semantics().Migration example:
3. Rebaseline replay-sensitive logging and plugin expectations
parallel,map, and nested workflows.4. Update exception handling and tests for validation failures
IllegalDurableOperationExceptionfor invalid context usage withIllegalStateException.IllegalDurableOperationExceptionas an SDK defect signal.5. Make child context result types fully serialization-safe
runInChildContext(...), concurrency branches, and virtual child contexts can survive a full SerDes round trip.SerDes, test child-context result types explicitly on both normal-size and large-payload paths.Validation example:
MyTypeshould deserialize back into the shape your handler expects without depending on the original instance identity.Deprecation Changes Required for Previous Versions
durableExecutionArntoexecutionArn,contextIdtooperationId, andcontextNametooperationName, along with the recommendedcoalesce(...)query pattern during mixed-version rollouts.StepConfig.semantics()andStepConfig.Builder.semantics(...)deprecated in the current 1.x line, with docs and release notes pointing users tosemanticsPerRetry(...).IllegalStateExceptionwill replaceIllegalDurableOperationExceptionfor context validation failures in 2.0.Additional Context
durableExecutionArntoexecutionArn, pluscontextIdtooperationIdandcontextNametooperationName.2.0currently includes #452, #440, and #456.executionArnonly in logger anddurableExecutionArneverywhere else."Beta Was this translation helpful? Give feedback.
All reactions