Repository navigation
Regenerate Python clients with shared legacy model helpers - #2762
Abhinav0905 wants to merge 1 commit into
Conversation
|
|
|
Welcome @Abhinav0905! |
|
/assign |
|
I audited the regeneration against base
So normal model and request serialization remain compatible. The behavior change is limited to correcting duplicate differently cased headers and malformed/internal query-helper inputs. |
kubernetes-client/python#2786 - fix(stream): handle tuple _request_timeout - 3 files, score: 77/100, 2 critical issues kubernetes-client/python#2762 - Regenerate Python clients with shared legacy - 30 files, score: 77/100, 13 critical issues kubernetes-client/python#2698 - Support _request_timeout in dynamic client - 2 files, score: 66/100, clean code BaaRai/ARTEX#494 - fix(server): do not return database errors - 2 files, score: 68/100, 1 security issue torvalds/GuitarPedal#60 - WebMIDI: keep queued BLE writes - 2 files, score: 77/100, clean code
|
Hi @yliaog, could you take a look at the client regeneration when you have a chance? All eight build checks passed. I'd especially appreciate a second look at the header and query-serialization changes called out in the compatibility audit. Thanks! |
|
thanks for the PR Please bump OPENAPI_GENERATOR_COMMIT in kubernetes-client/gen (openapi/python.sh and openapi/python-aio.sh) to a tagged release (v7.27.0 or v7.28.0). Drop the OPENAPI_GENERATOR_COMMIT changes from scripts/constants.py, scripts/update-client.sh, and scripts/update-client-asyncio.sh, rebase onto current master (so recent rest.py / patch updates like #2783 stay intact), and regenerate from the tagged release. |
58b1868 to
c7d77fb
Compare
|
[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:
Regenerates the synchronous and asyncio Python clients with the OpenAPI Generator v7.27.0 release. It contains the shared legacy model helpers from OpenAPITools/openapi-generator#24730.
scripts/constants.py,scripts/update-client.shorscripts/update-client-asyncio.sh.scripts/swagger.jsonand the existing package version. The regenerated code replaces 1,690 helper copies with two private modules. An AST comparison found no other changes in the 845 model classes per client.CIMultiDictimport. Two REST test assertions now check the outgoing header and caller input rather than the identity of the header dict. rest: send Content-Type application/json for JSON bodies #2783's wire-level tests are unchanged.Which issue(s) this PR is related to:
Related to #2677. This removes duplicate conversion helpers, not the separate sync and async clients. The upstream-first approach was agreed in #2677.
Special notes for your reviewer:
The v7.27.0 generator adds case-insensitive header handling and query serialization changes. Those changes are separate from model helper extraction and explain the generated API and transport diff. Generation used the published Maven plugin and
python.xml/python-aio.xmlfromgen, then ranpostprocess_python.pyand reapplied the Kubernetes patches. The schema was not fetched or changed.Measured against
2ea2c0a4fcf8206d71bd46b21806a32fb769e15awith CPython 3.12.14, setuptools 84.2.1 and wheel 0.48.0:The compressed wheel is 11.12% smaller. To repeat, run
python devel/measure-package-size.py /path/to/checkoutagainst clean checkouts with the same Python and build tools.Validation:
python -m pytest -q kubernetes/utils/rest_test.py kubernetes/test/test_legacy_model_helpers.py: 24 passed, including the JSON Content-Type wire tests.git diff --checkpassed.Does this PR introduce a user-facing change?
AI usage disclosure:
AI assisted with regeneration setup, test changes, local verification and the PR description. The checked-in clients were produced by the tagged OpenAPI Generator release.