Problem
Generated commands currently retry HTTP 429/5xx by default for every method, including POST, PUT, PATCH, and DELETE. That can duplicate non-idempotent API operations when a server returns a retryable status after partially processing the request.
Evidence
pkg/runtime/client.go defaults MaxRetries to 3 when unset and wraps all requests in retryTransport.
pkg/runtime/retry.go retries on 429, 500, 502, 503, and 504 without checking the HTTP method.
pkg/runtime/build.go sends all generated operations through DoRaw / DoRawFull with the default client options.
- Existing
TestRetryTransport_ReplaysBody proves a POST request body is replayed on retry.
Expected behavior
Default retries should only apply to safe/idempotent operations, or generated mutating commands should opt into retries only when the operation is explicitly safe, for example via an idempotency key or a future spec/overlay hint.
Verification
make test currently passes, so this is an uncovered behavior gap rather than a failing existing test.
Problem
Generated commands currently retry HTTP 429/5xx by default for every method, including
POST,PUT,PATCH, andDELETE. That can duplicate non-idempotent API operations when a server returns a retryable status after partially processing the request.Evidence
pkg/runtime/client.godefaultsMaxRetriesto3when unset and wraps all requests inretryTransport.pkg/runtime/retry.goretries on429,500,502,503, and504without checking the HTTP method.pkg/runtime/build.gosends all generated operations throughDoRaw/DoRawFullwith the default client options.TestRetryTransport_ReplaysBodyproves aPOSTrequest body is replayed on retry.Expected behavior
Default retries should only apply to safe/idempotent operations, or generated mutating commands should opt into retries only when the operation is explicitly safe, for example via an idempotency key or a future spec/overlay hint.
Verification
make testcurrently passes, so this is an uncovered behavior gap rather than a failing existing test.