temporalio / temporalio/sdk-java
Make WorkflowStub#getResult timeout configurable on WorkflowOptions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
Right now the caller can set a timeout on getResult by working directly with WorkflowStub using the following method:
https://github.com/temporalio/sdk-java/blob/b0199150b69bb5a4eaf6c13ba4b89c2a8746a113/temporal-sdk/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java#L232
But if the caller is not using the low-level stub API and just calls the workflow method of a workflow proxy (which most of our users for sure do) a method with Integer.MAX_VALUE timeout is used by default:
https://github.com/temporalio/sdk-java/blob/b0199150b69bb5a4eaf6c13ba4b89c2a8746a113/temporal-sdk/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java#L222
We should allow defining the #getResult timeout on WorkflowOptions to allow the neat proxy API to enforce reasonable timeouts.
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 in temporal-sdk/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java at the linked getResult paths around lines 222 and 232, then trace how workflow proxies receive WorkflowOptions. Add the option's timeout through the proxy path without changing the existing low-level behavior. Done means callers can configure a reasonable getResult timeout through WorkflowOptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100