Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenApi generate from k8s 1.28 with USE_SINGLE_PARAMETER and client-side openapi validation enabled #2991

Merged

Conversation

yue9944882
Copy link
Member

@yue9944882 yue9944882 commented Jan 11, 2024

With this PR, the generated openapi client will land a non-backward-compatible change which refactors the api interface simpler and clearer, e.g.:

Previously the API interface was like:

V1PodList list =
        api.listPodForAllNamespaces(null, null, null, null, null, null, null, null, null, null);

After enabling USE_SINGLE_PARAMETER, it will be:

    V1PodList list = api.listPodForAllNamespaces()
            .fieldSelector(..) // optional builder flow
            .resourceVersion(..)
            .execute();

yue9944882 and others added 2 commits January 10, 2024 19:04
Signed-off-by: Min Jin <[email protected]>

remove JSON edition temporarily

Signed-off-by: Min Jin <[email protected]>

ignore JSON unit test temporarily

Signed-off-by: Min Jin <[email protected]>

use forked gen

Signed-off-by: Min Jin <[email protected]>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 11, 2024
@yue9944882 yue9944882 force-pushed the automated-generate-6f7825ce branch from de3d820 to 09f9c21 Compare January 11, 2024 05:31
Signed-off-by: Min Jin <[email protected]>

remove java8 from build action

Signed-off-by: Min Jin <[email protected]>
@yue9944882 yue9944882 force-pushed the automated-generate-6f7825ce branch from 09f9c21 to 56449d9 Compare January 11, 2024 05:32
Signed-off-by: Min Jin <[email protected]>
@yue9944882 yue9944882 force-pushed the automated-generate-6f7825ce branch from 5f9c000 to 06a989d Compare January 11, 2024 06:40
@brendandburns
Copy link
Contributor

This will be a pretty disruptive change. Is there a way to have both options be feasible for a time? Otherwise people adopting this change will require some major code changes.

Or maybe we can do this change in the main branch but not in the -legacy version? Is that the plan?

@yue9944882
Copy link
Member Author

@brendandburns right, for those who are not ready to onboard the new API interface, they can still use the legacy version module by adding -legacy suffix to their pom dependency:

https://github.com/kubernetes-client/java/blob/master-java8/pom.xml#L5

in the foreseeable future, we publish both from master branch and master-java8 branch together

@brendandburns
Copy link
Contributor

Sounds good.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, yue9944882

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [brendandburns,yue9944882]

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

@k8s-ci-robot k8s-ci-robot merged commit 726e88c into kubernetes-client:master Jan 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants