-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
remove enum markers on types without validation #108639
remove enum markers on types without validation #108639
Conversation
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. |
78d449a
to
6406c02
Compare
6406c02
to
c35aebe
Compare
Looks good, but can we clarify the doc on these fields so that we have a better understanding why/how that happened? |
// These are valid conditions of node. Currently, we don't have enough information to decide
// node condition. In the future, we will add more. The proposed set of conditions are:
// NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable.
|
That first comment is hand-wavy, but not as in "we can have other values", but rather as "This was written when Kubernetes started and we didn't really know where we're going". I'm sure we can improve this.
I'm sure we can improve this field comment. |
types: PodConditionType, NodeConditionType
Thanks, |
228f3c9
to
c9dd7bd
Compare
I've manually checked the validation of every type listed above and updated as needed. |
/retest |
/hold cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, jiahuif, 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 |
Awesome, let's cherry-pick this in the the latest release! |
/triage accepted |
…f-#108639-upstream-release-1.23 Automated cherry pick of #108639: unmark non-validated types as enums.
We now have a gap where these non-exhaustive, enum-like field values are not documented. Folks will previously have found those explanations useful. See kubernetes/website#32833 (review) for an example where the v1.23 docs enumerate taints and list meanings ( I'll file a feature request about this. |
The enums were removed from the 1.23 static file as well in #109179 |
That's OK by accident because SIG Docs makes an assumption that once we've made a minor release the [Open]API for that release doesn't change. |
What type of PR is this?
/kind bug
/kind feature
What this PR does / why we need it:
This PR unmarks a few types that are not validated to be in a set of defined values as enum type. In production, we see applications and/or cloud providers setting these fields to be a value that is not built in.
Which issue(s) this PR fixes:
xref: kubernetes-client/python#1733
xref: kubernetes-client/python#1735
xref: kubernetes-client/python#1739
Special notes for your reviewer:
Release note: this affects only generated clients but not directly the end users.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: