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

Fix non-enum CSR condition field, omit enums from static openapi snapshot #109178

Merged
merged 2 commits into from Mar 31, 2022

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Mar 31, 2022

What type of PR is this?

/kind bug
/kind feature

What this PR does / why we need it:

Follow-up to #108639

  1. Fixes an incorrectly marked enum field on CSR conditions
  2. Omits enums from the static openapi snapshot being used to generate clients

xref #109177

Does this PR introduce a user-facing change?

Omit enum declarations from the static openapi file captured at https://git.k8s.io/kubernetes/api/openapi-spec. This file is used to generate API clients, and use of enums in those generated clients (rather than strings) can break forward compatibility with additional future values in those fields. See https://issue.k8s.io/109177 for details.

/sig api-machinery
for openapi snapshot

/sig auth
for CSR API

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 31, 2022
@liggitt liggitt added this to the v1.24 milestone Mar 31, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt

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:

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 added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/code-generation kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Mar 31, 2022
@liggitt liggitt added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Mar 31, 2022
@liggitt liggitt added the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Mar 31, 2022
@liggitt
Copy link
Member Author

liggitt commented Mar 31, 2022

/cc @jiahuif

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Mar 31, 2022
@liggitt liggitt added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 31, 2022
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@liggitt
Copy link
Member Author

liggitt commented Mar 31, 2022

#109182 flake

/retest

@aojea
Copy link
Member

aojea commented Mar 31, 2022

k8s.io/kubernetes/test/integration/apiserver/apply: TestDroppingSubresourceField expand_more	2m26s
k8s.io/kubernetes/test/integration/auth: TestRBAC expand_more	0s
k8s.io/kubernetes/test/integration/client: TestApplyWithApplyConfiguration expand_more	0s
k8s.io/kubernetes/test/integration/controlplane: TestOpenAPIDelegationChainPlumbing expand_more	2m24s
k8s.io/kubernetes/test/integration/controlplane/transformation: TestSecretsShouldBeTransformed expand_more	2m24s
k8s.io/kubernetes/test/integration/cronjob: TestCronJobLaunchesPodAndCleansUp expand_more

/retest

@dims
Copy link
Member

dims commented Mar 31, 2022

/priority critical-urgent
/lgtm

@k8s-ci-robot k8s-ci-robot added the priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 31, 2022
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 31, 2022
@liggitt
Copy link
Member Author

liggitt commented Mar 31, 2022

/retest

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 31, 2022
@liggitt
Copy link
Member Author

liggitt commented Mar 31, 2022

rebased after #109195 merged, readding tag

@liggitt liggitt added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 31, 2022
@k8s-ci-robot k8s-ci-robot merged commit e89b80b into kubernetes:master Mar 31, 2022
@sftim
Copy link
Contributor

sftim commented Apr 13, 2022

This PR seems to have removed some enum explanations from the generated API docs.

Could I advocate for a changelog entry that is more clear about what has happened to the OpenAPI spec as a result of this PR? (I don't think I'd have understood that entry without context).

@jiahuif
Copy link
Member

jiahuif commented Apr 13, 2022

Currently, we do not have support for types that can be either enum or any value. Some client generators break when encountering an enum type, especially Java and Python that has built-in enum types. As a result, we have to undo the generated comments from enum types generator.

@liggitt
Copy link
Member Author

liggitt commented Apr 13, 2022

Could I advocate for a changelog entry that is more clear about what has happened to the OpenAPI spec as a result of this PR? (I don't think I'd have understood that entry without context).

updated the changelog

@sftim
Copy link
Contributor

sftim commented Apr 13, 2022

I also filed #109463 to cover the new gap in our API docs

@liggitt liggitt deleted the openapi-master branch May 5, 2022 15:00
@liggitt liggitt removed the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Sep 9, 2023
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. area/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-blocker release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

7 participants