microsoft / microsoft/durabletask-python

Add HTTP-specific retry options to azure-functions-durable v2 call_http

Open
#268 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
40
Forks
33
Avg merge
2d 2h
Merged PRs (30d)
6

Description

Add configurable, durable HTTP failure retries to the azure-functions-durable v2 compatibility package in this repository. This is the Python v2 follow-up to Azure/azure-functions-durable-extension#1984, not a request for generic activity retry support.

Current behavior

Checked azure-functions-durable==2.0.0rc1 (azurefunctions-v2.0.0rc1):

  • DurableOrchestrationContext.call_http(method, uri, content=None, headers=None, token_source=None, is_raw_str=False) has no HTTP retry parameter and schedules the built-in HTTP polling sub-orchestration.
  • DurableHttpRequest neither accepts nor serializes a retry policy or retryable-status-code list.
  • builtin_http_activity returns HTTP error responses rather than treating selected statuses as retryable failures.
  • The polling orchestrator calls activities without a retry policy and repeats only for HTTP 202 responses with a Location header.

This package executes HTTP through worker-side built-ins rather than the extension's native HTTP action. Retry support must be implemented in that worker path, not just added to a host-bound JSON field.

Acceptance Criteria

  • Expose HTTP-specific retry configuration on call_http, including first retry interval, maximum attempts, backoff coefficient, maximum retry interval, retry timeout, and retryable HTTP status codes.
  • Carry the configuration through the request model/serialization and apply durable retries to selected HTTP statuses and retryable transport failures.
  • Define and document status-code defaults consistent with .NET HttpRetryOptions (an omitted/empty status-code list retries 4xx/5xx responses when a retry policy is supplied).
  • Preserve existing behavior when retry options are omitted, and keep HTTP 202 polling distinct from failure retries.
  • Add coverage for retry-then-success, exhausted attempts, excluded status codes, backoff/timeout limits, replay, and interaction with 202 polling.
  • Document usage and any intentional differences from .NET HTTP retry semantics.

Related

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DurableOrchestrationContext.call_http and the HTTP worker path in azure-functions-durable/azure/durable_functions/http/models.py and builtin.py. Trace request serialization and the polling orchestrator before comparing the .NET HttpRetryOptions semantics. Done means configured failure retries, preserved 202 polling and no-option behavior, documented usage, and tests for success, exhaustion, exclusions, limits, replay, and polling interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.