microsoft / microsoft/durabletask-java
Apply DurableHttpRequest.HttpRetryOptions when scheduling durable HTTP retries
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 29
- Forks
- 18
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
HttpRetryOptions is exposed on DurableHttpRequest, but DurableHttp.callHttp does not use that configuration to schedule retries unless the caller separately supplies TaskOptions. This is the Java retry-scheduling follow-up to Azure/azure-functions-durable-extension#1984, not a request to add a second HTTP API or retry-options type.
Current behavior
Checked v1.9.0 and main at cfdfbf505ed0c4b1b5e9d39a55504650f1dd09e8:
HttpRetryOptionsexposes intervals, maximum attempts, backoff, retry timeout, and status-code selection.DurableHttpRequestserializes those options underretryOptionsfor the HTTP activity.DurableHttp.callHttp(ctx, request)delegates with nullTaskOptions. The implementation then callsctx.callActivitywithout a retry policy; it does not derive one fromrequest.getHttpRetryOptions().- The extension's HTTP activity uses the configured status codes to turn matching responses into failures, but durable retry scheduling is separate from that failure classification.
Consequently, the code path for setting only the request's HttpRetryOptions does not schedule the configured retry attempts. Supplying a separate TaskOptions/RetryPolicy can schedule retries, but duplicates configuration and leaves the request-level attempt/backoff settings unapplied.
This finding is based on source-path inspection; an end-to-end failure/retry reproduction has not been executed.
Reproduction scenario
- Configure a
DurableHttpRequestwithHttpRetryOptionsspecifying three attempts and HTTP 503 as retryable. - Call
ctx.callHttp(request)without separateTaskOptions. - Use an endpoint that returns 503 for the first attempt and 200 for the next attempt.
- Verify whether the orchestration schedules the second request using the request's retry policy rather than failing after the first HTTP activity.
Acceptance Criteria
- Apply the request's
HttpRetryOptionsto durable retry scheduling when no explicit scheduling override is supplied. - Honor attempt limits, first/max intervals, backoff, and retry timeout, while retaining HTTP-status-code filtering.
- Define and document precedence when explicit
TaskOptionsand request-level HTTP retry options are both supplied. - Preserve existing behavior when retry options are omitted.
- Add coverage for request-only retry configuration, retry-then-success, exhaustion, excluded status codes, transport failures, and explicit
TaskOptionsinteraction. - Update API documentation/examples so callers do not need two inconsistent policies for one HTTP request.
Related
- Original cross-language tracker: Azure/azure-functions-durable-extension#1984.
- Existing broad HTTP support tracker: microsoft/durabletask-java#39.
- HTTP API implementation: microsoft/durabletask-java#271.
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 with DurableHttp.callHttp and trace how DurableHttpRequest.getHttpRetryOptions is passed to ctx.callActivity, then inspect HttpRetryOptions and TaskOptions retry behavior. Define precedence for explicit TaskOptions, preserve status-code filtering, and add coverage for request-only retries, success, exhaustion, exclusions, transport failures, and interaction cases. Update the API documentation or examples when the behavior is settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, distributed-systems, documentation, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100