Repository navigation
Regenerate Python clients with shared legacy model helpers - #2762
Abhinav0905 wants to merge 1 commit into
Conversation
Pin OpenAPI Generator to the merged helper deduplication change and regenerate both clients from the existing Kubernetes schema. Preserve Kubernetes patches, add serialization compatibility tests, and make package size comparisons reproducible. Related to kubernetes-client#2677.
|
|
|
Welcome @Abhinav0905! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Abhinav0905 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This is the downstream follow-up proposed and accepted in #2677, and promised after the upstream fix. OpenAPITools/openapi-generator#24730 merged on October 19.
3cf4b374881ed853d522d67b326428e09defcf29, while keeping the existing environment override.scripts/swagger.json. The Kubernetes schema and package version stay the same.CIMultiDictimport.Which issue(s) this PR fixes:
Related to #2677. This addresses repeated legacy helpers; it does not remove the separate sync/async clients or all package duplication.
Special notes for your reviewer:
Measured against
774884db83b36fb5d3e54629f01b14cad2d67852, using CPython 3.12.14, setuptools 84.2.1 and wheel 0.48.0:These count file contents, not filesystem allocation or dependencies. Bytecode uses optimization level 0 and relative compile paths. Both wheels use
setup-release.py, including both clients. This measures code reduction separately from thepip --no-compileworkaround.To repeat with the same interpreter and separate clean checkouts:
Regeneration used the CLI built from the pinned upstream commit and the settings from kubernetes-client/gen@
d01fc8a15955e08c5102b7f9916a99b094ebd0e1:compatibleWithPythonLegacy, lazy imports, independent implicit clients, existing name/parameter mappings and disabled generated API/model tests. Both outputs passed through that revision'spostprocess_python.py, then the patches in the update scripts were reapplied. The input spec was not fetched or changed.The pin advances the generator from 7.25.0 to a specific 7.27.0-SNAPSHOT commit. Its generated case-insensitive header handling and query serialization changes are included, so the diff is broader than the helper imports alone.
Validation:
python -m pytest -q --ignore=kubernetes/e2e_test --ignore=kubernetes/aio/e2e_testto_dict()overrides.bash -n;git diff --checkpasses.Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: