Skip to content

feat(sdk): Add subtypes for Step, Wait, Callback and Invoke operations#405

Merged
nvasiu merged 1 commit into
mainfrom
add-subtypes
May 26, 2026
Merged

feat(sdk): Add subtypes for Step, Wait, Callback and Invoke operations#405
nvasiu merged 1 commit into
mainfrom
add-subtypes

Conversation

@nvasiu
Copy link
Copy Markdown
Contributor

@nvasiu nvasiu commented May 25, 2026

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Issue Link, if available

#396

Description

Made sub-types mandatory for all operation types.

  • Added new OperationSubType values for all operation types that were missing them (step, wait, callback and invoke).
  • Updated OperationSubType values to now include their corresponding parent OperationType.
  • OperationSubType is now a required argument for OperationIdentifier. OperationType is no longer passed, instead the type value is retrieved from the OperationSubType.

Updated all locations that create operations using OperationIdentifier, to now pass OperationSubType.

  • DurableContextImpl (creates step, wait, invoke, callback, childContext, map, parallel, and waitForCondition operations)
  • ConcurrencyOperation (creates child map and parallel operations)
  • All related tests

Additional Changes:

WaitForConditionOperation was inconsistent with other operations because it created it's own OperationIdentifier within it's constructor.

  • For all other operations, DurableContextImpl creates the OperationIdentifier and then passes it to the operation constructors.
  • Updated WaitForConditionOperation to work in the same way.

Updated BaseDurableOperation to remove null checks on sub-type. since the sub-type is now required.

ChildContextOperation explicitly checks for unreachable subtypes. Updated ChildContextOperation to check for the new subtype values.

Updated LocalMemoryExecutionClient.applyResult to preserve subtype when updating an operation. Previously the subtype value was not passed on to the updated operation, causing test failures.

Demo/Screenshots

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Have unit tests been written for these changes? Updated Tests

Integration Tests

Have integration tests been written for these changes? Updated Tests

Examples

Has a new example been added for the change? (if applicable) N/A

@nvasiu nvasiu requested a review from a team May 25, 2026 23:52
Comment thread sdk/src/main/java/software/amazon/lambda/durable/context/DurableContextImpl.java Outdated
Added new OperationSubType values for all operation types that were
missing them (step, wait, callback and invoke). And pass these values
when creating operations in DurableContextImpl.

ChildContextOperation explicitly checks for unreachable subtypes.
Updated ChildContextOperation to check for the new subtype values.

Updated the tests for the above operations that check the subtype to
use these new subtype values.

Updated LocalMemoryExecutionClient.applyResult to preserve subtype
when updating an operation. Previously the subtype value was not
passed on to the updated operation, causing test failures.
@nvasiu nvasiu merged commit ceed427 into main May 26, 2026
13 of 14 checks passed
@nvasiu nvasiu deleted the add-subtypes branch May 26, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants