Skip to content

Generate Python client-go retry wiring - #304

Open
sttts wants to merge 3 commits into
kubernetes-client:masterfrom
sttts:sttts-client-go-retry-generation
Open

Generate Python client-go retry wiring#304
sttts wants to merge 3 commits into
kubernetes-client:masterfrom
sttts:sttts-client-go-retry-generation

Conversation

@sttts

@sttts sttts commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • apply Kubernetes-specific post-generation patches for sync and async Python clients
  • add opt-in client_go_retries and client_go_retry_backoff configuration fields to generated clients
  • wire generated GET/HEAD requests to the client-go-compatible retry helpers from client: add Kubernetes-aware retry helpers python#2634
  • use the public helper paths kubernetes.utils.retry for sync and kubernetes.aio.utils.retry for AIO

Validation

  • dry-ran the new patches against OpenAPI Generator v6.6.0 python-legacy templates
  • dry-ran existing downstream Python REST patches after applying the generator retry patches
  • ran git diff --check

Depends on kubernetes-client/python#2634.

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 15, 2026
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sttts
Once this PR has been reviewed and has the lgtm label, please assign yue9944882 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 15, 2026
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
@sttts
sttts force-pushed the sttts-client-go-retry-generation branch from b48aab0 to 359a4ca Compare July 15, 2026 16:58
sttts added 2 commits July 17, 2026 13:58
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
@yliaog

yliaog commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

thanks for the PR.

#305 (comment) upgrades the openapi generator to v7.24.0, the patches in this PR would need to be reworked after the upgrade. Let's wait a few days for that.

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2026
@kubernetes-prow

Copy link
Copy Markdown

PR needs rebase.

Details

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.

@yliaog

yliaog commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@sttts could you please rebase? thanks.

@brendandburns

Copy link
Copy Markdown
Contributor

Also, don't we want this to be updated in the upstream code generator? Instead of patching here?

Also, if we do need patches, I would suggest that we carry the patches in the python client repository, not the gen repository, that's what we do for Java:

https://github.com/kubernetes-client/java/blob/master/.github/workflows/generate.yml#L127

@yliaog

yliaog commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

+1 to what @brendandburns said, better to update the upstream openapi generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants