Skip to content

[Feature]: add waitForCallback #147

Merged
zhongkechen merged 7 commits intomainfrom
callback
Mar 5, 2026
Merged

[Feature]: add waitForCallback #147
zhongkechen merged 7 commits intomainfrom
callback

Conversation

@zhongkechen
Copy link
Copy Markdown
Contributor

@zhongkechen zhongkechen commented Mar 4, 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

Fix: #89

Description

  • add waitForCallback to DurableContext
  • updated ChildContextOperation to support subType
  • removed withSkipTime. runUntilComplete always auto advance. For manual advance, use run + advanceTime instead.

Demo/Screenshots

image

the screenshot is outdated. -step has been renamed to -submitter

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? Yes

Integration Tests

Have integration tests been written for these changes? N/A

Examples

Has a new example been added for the change? (if applicable) Yes

@zhongkechen zhongkechen force-pushed the callback branch 2 times, most recently from 7d0582c to d1b4cc3 Compare March 4, 2026 05:31
@zhongkechen zhongkechen self-assigned this Mar 4, 2026
@zhongkechen zhongkechen requested review from a team, maschnetwork and phipag March 4, 2026 18:27
@zhongkechen zhongkechen marked this pull request as ready for review March 4, 2026 18:28
@zhongkechen
Copy link
Copy Markdown
Contributor Author

I need to include the error type fix as well: aws/aws-durable-execution-sdk-python#313

Comment thread README.md Outdated
if (stepOp != null) {
var stepError = stepOp.stepDetails().error();
if (StepInterruptedException.isStepInterruptedException(stepError)) {
throw new CallbackSubmitterException(callbackOp, new StepInterruptedException(stepOp));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause NPE if callbackOp is null?

Copy link
Copy Markdown
Contributor Author

@zhongkechen zhongkechen Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, callbackOp is always created before stepOp. I've updated the error handling logic in the latest commit to fix a different issue. Please check again

Comment thread sdk/src/test/java/software/amazon/lambda/durable/TestUtils.java Outdated
@zhongkechen zhongkechen merged commit d9b69ce into main Mar 5, 2026
10 checks passed
@zhongkechen zhongkechen deleted the callback branch March 5, 2026 00:00
nvasiu pushed a commit to nvasiu/aws-durable-execution-sdk-java that referenced this pull request Mar 5, 2026
* add waitForCallback

* fix cloud test cases for waitForCallback

* add unit tests

* fix exception type

* update step name

* fix error handling

* add name length validator
@zhongkechen zhongkechen mentioned this pull request Mar 5, 2026
2 tasks
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.

[Feature]: design and implement waitForCallback

2 participants