temporalio / temporalio/sdk-java
Failed promise before calling allOf is not failing the wrapped promise.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Expected Behavior
Promise.allOf(promises) should fail as long as one of the promises fails, no matter it is already failed before calling the allOf or after.
Actual Behavior
If one Promise in promises is already failed before calling allOf, the failure is ignored.
How to reproduce
A workflow like following will ended successfully.
val promise1 = Async.procedure { throw RuntimeException() }
val promise2 = Async.procedure {
// do something else
}
someActivity.doSomething()
Promise.allOf(promise1, promise2).get()
Analysis
AllOfPromise#addPromise only handles the promise that is not completed.
Specifications
- Version: 1.20.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at AllOfPromise#addPromise and reproduce the Kotlin workflow from the issue, focusing on a promise that has already failed before Promise.allOf is called. Verify that the wrapped promise fails for both pre-completed and later-failing inputs, and add or update coverage for those cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100