-
Notifications
You must be signed in to change notification settings - Fork 14.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
Document server side field validation #30532
Document server side field validation #30532
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing. 🔨 Explore the source changes: d58468b 🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/619c45b6dedfb5000763b6a2 |
e95b2f0
to
0118f22
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/remove-language de |
/assign |
/retitle [WIP] Document server side field validation |
1dfb0f8
to
a21c85e
Compare
docs added PTAL @apelisse |
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Outdated
Show resolved
Hide resolved
@@ -58,6 +58,30 @@ When present, indicates that modifications should not be persisted. An invalid o | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh... the header says this is auto-generated:
The file is auto-generated from the Go source code of the component using a generic...
not sure if that's true or where the source for this is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current content lgtm though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, that's a good question. The other parameter descriptions do look like they are pulled from the comments of meta/v1/types.go
.
I tried following the instructions for updating the generated docs and was successfully able to run ./update-imported-docs.py
, but all it did was update kubectl-commands.html
with an unrelated change. I think one issue may be that I can't use a branch that doesn't exist yet
@mehabhalodiya can you confirm that these docs are still being auto-generated and that the source of truth is meta/v1/types.go
? If so, do you know how to best update these so that my new changes are included here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevindelgado I too believe, The file is auto-generated
as mentioned by @liggitt @sftim .
Also, may be you can set the branch of the previous release until 1.23 isn't formally released.
content/en/docs/reference/kubernetes-api/common-parameters/common-parameters.md
Show resolved
Hide resolved
behavior when the `ServerSideFieldValidation` feature gate is disabled. | ||
- Warn: This will send a warning via the [standard warning response | ||
header](https://datatracker.ietf.org/doc/html/rfc7234#section-5.5) for each | ||
unknown that is dropped from the object, and for each duplicate field encountered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each unknown fields, I'm assuming
@@ -58,6 +58,32 @@ When present, indicates that modifications should not be persisted. An invalid o | |||
|
|||
|
|||
|
|||
## fieldValidation {#fieldValidation} | |||
|
|||
{{< feature-state for_k8s_version="v1.23" state="alpha" >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention that we're only ever returning strict errors when there is no non-strict errors?
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of empty lines :-)
It's typical to update generated documentation in a batch update, using the tooling from https://github.com/kubernetes-sigs/reference-docs/ We usually update the API reference for an upcoming release once, just before the release, as part of the overall release process. Because of that, you don't need to update individual generated files in the branch for that upcoming release. |
Is your advice to fold this into the overall API update PR @sftim? /cc @kevindelgado |
@jlbutler: GitHub didn't allow me to request PR reviews from the following users: kevindelgado. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Closing this in favor of kubernetes/kubernetes#106722 that actually updates the source of truth for these generated docs. Since this feature is only alpha, the existing comment is fine for 1.23 and this updated comment will merge once code freeze is over and master reopens for 1.24 |
Docs for kubernetes/enhancements#2885