Skip to content

Conversation

@roycaihw
Copy link
Member

@roycaihw roycaihw commented Oct 3, 2018

What this PR does / why we need it:
In 1.12 we introduced metav1.CreateOptions and metav1.UpdateOptions to support dryRun query parameter in apiserver POST/PUT/PATCH/DELETE handlers: #65105. However our openapi spec didn't reflect the parameter in POST/PUT/PATCH operations.

This PR adds CreateOptions and UpdateOptions to apiserver rest parameter installation, to parse the option struct and register the query parameters.

The openapi-generated clients (python, java, etc.) are unaware of the dryRun parameter without this fix. We may want to cherrypick this PR to 1.12, to make those clients support dry-run.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #69304

Release note:

OpenAPI spec and API reference now reflect dryRun query parameter for POST/PUT/PATCH operations

/cc @apelisse @mbohlool
/sig api-machinery

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 3, 2018
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 3, 2018
@roycaihw
Copy link
Member Author

roycaihw commented Oct 3, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added area/apiserver kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 3, 2018
@apelisse
Copy link
Member

apelisse commented Oct 3, 2018

/lgtm

Thank you for working on this.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 3, 2018
"uniqueItems": true,
"type": "boolean",
"description": "If true, partially initialized resources are included in the response.",
"name": "includeUninitialized",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These includeUninitialized's are moved to Path-level parameters (one level higher) from Operation-level parameters, because all operations under the path use includeUninitialized

@roycaihw
Copy link
Member Author

roycaihw commented Oct 3, 2018

/assign @lavalamp
for approval

I plan to cherrypick this into 1.12.1, which probably will be released around 10/11 (two weeks after 1.12.0)

/retest

@jennybuckley
Copy link

/assign @mbohlool

@mbohlool
Copy link
Contributor

mbohlool commented Oct 4, 2018

/lgtm

@lavalamp
Copy link
Contributor

lavalamp commented Oct 4, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, lavalamp, mbohlool, roycaihw

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

The pull request process is described here

Details 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2018
@k8s-ci-robot k8s-ci-robot merged commit 0928bb4 into kubernetes:master Oct 5, 2018
k8s-ci-robot added a commit that referenced this pull request Oct 6, 2018
…59-upstream-release-1.12

Automated cherry pick of #69359: Add Create and Update Options to rest param installation
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/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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. 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.

dry-run: openapi spec missing dryRun query parameter for POST/PUT/PATCH operations

6 participants