Align retry safety for mutating connector operations across SDKs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
Research direction
Start in ConnectorHttpClient._send_with_retry and ConnectorClientOptions, then inspect the existing retry tests and the shared runtime/options surface used by generated clients. Add focused coverage for safe and unsafe methods, including the opt-in path, and update the API documentation and release notes so the default and opt-in behavior are documented.
Written by the indexing model from the issue text.
Description
Description
Align the Python Connector SDK's retry safety contract with the Node.js SDK behavior introduced in Azure/Connectors-NodeJS-SDK PR #91.
At main commit d273862108d16615009572d730c12950be040a8c, ConnectorHttpClient._send_with_retry retries every HTTP method for 429, every 5xx response, and aiohttp.ClientError. ConnectorClientOptions exposes retry counts and backoff settings but has no method-safety setting. A POST, PUT, PATCH, or DELETE connector action can therefore be submitted again after the service committed it but returned a transient response, or after an ambiguous transport failure.
The cross-language Connector SDK contract should be:
- Retry safe methods (
GET,HEAD,OPTIONS, andTRACE) according to the configured retry policy. - Do not automatically retry unsafe methods (
POST,PUT,PATCH, andDELETE) by default. - Provide an explicit, language-idiomatic per-client opt-in for applying the configured retry policy to unsafe methods, equivalent to Node.js
retryUnsafeHttpMethods. - Preserve the current retry-count, delay, timeout, and exponential-backoff options.
Motivation
Connector operations include side-effecting actions such as sending messages and creating meetings, chats, channels, or files. Automatically replaying a completed action can duplicate customer-visible effects. This risk and the desired explicit opt-in are protocol-level concerns, not Node.js-specific behavior.
Consistent defaults across the .NET, Python, and Node.js Connector SDKs make client behavior predictable when customers move the same connector integration between languages.
Acceptance criteria
- Add a
ConnectorClientOptionssetting with Python-idiomatic naming for opting unsafe HTTP methods into retries. - Safe methods retain the configured retry behavior by default.
- Unsafe methods make one attempt by default for both transient HTTP responses and
aiohttp.ClientErrorfailures. - Unsafe methods use the configured retry behavior when explicitly enabled.
- Add focused tests proving at least:
- a transient GET is retried;
- a transient POST is sent once by default;
- a transient POST is retried when explicitly enabled;
- PUT, PATCH, and DELETE follow the unsafe classification.
- Document the default and opt-in behavior in API documentation and release notes.
- Confirm whether implementation is confined to hand-written runtime/options code. Generated-client regeneration is not expected because generated clients use the shared
ConnectorHttpClientandConnectorClientOptionsruntime surface.
Related work
- Node.js implementation: Azure/Connectors-NodeJS-SDK PR #91
- .NET alignment: Azure/Connectors-NET-SDK issue #269
- Dominant language
- Python
- Stars
- 0
- Forks
- 3
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 9
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.
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·