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

finish removal of exportoptions #98312

Merged
merged 3 commits into from Jan 25, 2021

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jan 22, 2021

Reiterating the reasons from #73783

fixes #98289

Export has fundamental issues with handling multiple use cases. As we discussed with @liggitt and bgrant0607 in #24855 and #49497, this can't be solved server-side. Avoiding export and instead just getting the resource as it exists today, the transformations could then be done client-side and at some later date. Doing it this way allows a single retrieval to be used for different purposes and allows an "export" to be done before deciding how you may later use it.

Since then, kubectl has also been updated to remove the option: #88649 and we are now ready to finish the removal.

To ensure no unexpected values are returned if some old clients are still lingering, we detect when the export query parameter is set and return a 400 to indicate an error. This prevents an old client that wasn't updated from receiving unexpected data and misbehaviing.

/kind cleanup
/priority important-soon
/assign @liggitt
@kubernetes/sig-api-machinery-api-reviews

The `export` query parameter (inconsistently supported by API resources and deprecated in v1.14) is fully removed.  Requests setting this query parameter will now receive a 400 status response.

@k8s-ci-robot k8s-ci-robot added 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. area/apiserver area/code-generation area/test sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jan 22, 2021
Copy link
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

also address in Accept header content type negotiation?

// if specified, the server should transform the returned
// output and remove fields that are always server specified,
// or which fit the default behavior.
case "export":
options.Export = v == "1"

// export is true if the representation requested should exclude fields the server
// has set
Export bool

@fejta-bot
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.

@deads2k deads2k force-pushed the finish-export-option-removal branch from 6c9d254 to 0c6f407 Compare January 22, 2021 16:32
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 22, 2021
@deads2k deads2k force-pushed the finish-export-option-removal branch from 0c6f407 to 77a3625 Compare January 22, 2021 17:59
@deads2k
Copy link
Contributor Author

deads2k commented Jan 22, 2021

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 22, 2021
@deads2k deads2k force-pushed the finish-export-option-removal branch from 77a3625 to 3f0f38e Compare January 22, 2021 18:47
@deads2k
Copy link
Contributor Author

deads2k commented Jan 22, 2021

hmmm....

/retest

?

@liggitt liggitt added the kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. label Jan 25, 2021
@liggitt
Copy link
Member

liggitt commented Jan 25, 2021

/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 25, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 25, 2021
@k8s-ci-robot k8s-ci-robot merged commit b7fc3f9 into kubernetes:master Jan 25, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Jan 25, 2021
mattmoyer added a commit to mattmoyer/pinniped that referenced this pull request Apr 9, 2021
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312).

Signed-off-by: Matt Moyer <moyerm@vmware.com>
mattmoyer added a commit to mattmoyer/pinniped that referenced this pull request Apr 9, 2021
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312).

Signed-off-by: Matt Moyer <moyerm@vmware.com>
mattmoyer added a commit to mattmoyer/pinniped that referenced this pull request Apr 9, 2021
This type was removed in Kubernetes v1.21.0 (see kubernetes/kubernetes#98312).

Signed-off-by: Matt Moyer <moyerm@vmware.com>
milas added a commit to tilt-dev/tilt-apiserver that referenced this pull request Jun 8, 2021
* Remove sample controller + dependency on controller-runtime
  (it was unused, leftover from original codegen; will hopefully
  help avoid conflicts downstream)
* Remove `rest.Exporter` which was fully removed in K8s v1.21
  (see kubernetes/kubernetes#98312)
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 area/code-generation area/test 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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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
None yet
Development

Successfully merging this pull request may close these issues.

ExportOptions was planed to removal in 1.18 while still used now
4 participants