Add client-go-compatible Retry-After retries to generated clients - #2671
Conversation
|
@sttts thanks for the PR, please take a look at the CI test failures |
|
@yliaog it's green now |
|
please remove fixup! in the commit message also investigate e2e test failure |
|
close to retrigger the CI tests |
|
@yliaog: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/reopen |
|
@yliaog: Reopened this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest |
|
@sttts: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/close |
|
@yliaog: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/reopen |
|
@yliaog: Reopened this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/close |
|
@yliaog: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/reopen |
|
@yliaog: Reopened this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/close |
|
@yliaog: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/reopen |
|
@yliaog: Reopened this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
dbccac0 to
7efe5a4
Compare
|
@yliaog have squashed to remove the fixup commit. |
|
@sttts why do you need to add kubernetes/aio/client/_retry.py, instead of using the util directly? |
7efe5a4 to
e0fec3c
Compare
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
e0fec3c to
0f0afb6
Compare
|
Updated this to use |
|
thanks for the PR |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5d5e3ed
into
kubernetes-client:master
What type of PR is this?
/kind feature
What this PR does / why we need it:
Wires the retry helpers from #2634 into the generated sync and asyncio REST clients via repo-local post-generation patches, matching the Java-style approach instead of carrying Kubernetes-specific behavior in kubernetes-client/gen.
The generated clients gain opt-in
client_go_retriessupport forGETandHEADRetry-After responses. The retry ceiling followsconfiguration.retrieswhen set and otherwise uses the client-go default. Sync uses urllib3 for normal retries and disables urllib3 status retries only for the client-go read wrapper; asyncio uses its async helper directly for that same read path.Which issue(s) this PR fixes:
None
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Testing
git diff --checkgit apply --unidiff-zero --reverse --check scripts/client_go_retry_patch.diffgit apply --unidiff-zero --reverse --check scripts/client_go_retry_asyncio_patch.diffgit apply --unidiff-zero --check scripts/client_go_retry_patch.diffagainst a freshorigin/masterworktreegit apply --unidiff-zero --check scripts/client_go_retry_asyncio_patch.diffagainst a freshorigin/masterworktreepython3 -m py_compile ...for the changed retry/rest/config/test modulesuv run --with-requirements requirements.txt --with-requirements requirements-asyncio.txt python -c "import kubernetes.client.rest; import kubernetes.aio.client.rest"uv run --with-requirements requirements.txt --with-requirements requirements-asyncio.txt python -m unittest -q ...for the new targeted retry tests