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

Remove storage versions flag #67678

Merged

Conversation

caesarxuchao
Copy link
Member

@caesarxuchao caesarxuchao commented Aug 21, 2018

This pull follows up #68080. The --storage-versions flag of kube-apiserver is removed.

The --storage-versions flag of kube-apiserver is removed. The storage versions will always be the default value built-in the kube-apiserver binary.

@caesarxuchao caesarxuchao self-assigned this Aug 21, 2018
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Aug 21, 2018
@k8s-ci-robot k8s-ci-robot requested review from liggitt and sttts August 21, 2018 21:18
@caesarxuchao
Copy link
Member Author

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Aug 22, 2018
@caesarxuchao caesarxuchao force-pushed the remove-storage-versions-flag branch 2 times, most recently from 0e39962 to 5a84234 Compare August 22, 2018 20:11
@sttts
Copy link
Contributor

sttts commented Aug 23, 2018

/cc @enj

@k8s-ci-robot k8s-ci-robot requested a review from enj August 23, 2018 14:59
@@ -112,7 100,7 @@ func (o *DefaultResourceEncodingConfig) InMemoryEncodingFor(resource schema.Grou

resourceOverride, resourceExists := groupEncoding.InternalResourceEncodings[resource.Resource]
if !resourceExists {
return groupEncoding.DefaultInternalEncoding, nil
return schema.GroupVersion{Group: resource.Group, Version: runtime.APIVersionInternal}, nil
Copy link
Member

Choose a reason for hiding this comment

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

why was this changed?

@@ -94,7 81,8 @@ func (o *DefaultResourceEncodingConfig) StorageEncodingFor(resource schema.Group

resourceOverride, resourceExists := groupEncoding.ExternalResourceEncodings[resource.Resource]
if !resourceExists {
return groupEncoding.DefaultExternalEncoding, nil
// return the most preferred external version for the group
return o.scheme.PrioritizedVersionsForGroup(resource.Group)[0], nil
Copy link
Member

Choose a reason for hiding this comment

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

same here, didn't expect this

@liggitt
Copy link
Member

liggitt commented Aug 23, 2018

/cc @deads2k

@k8s-ci-robot k8s-ci-robot requested a review from deads2k August 23, 2018 16:13
@liggitt
Copy link
Member

liggitt commented Aug 23, 2018

the etcd_storage integration test would be the most interesting test to ensure still works after this

I also expected the flag to be announced/released as deprecated prior to removing it

@caesarxuchao
Copy link
Member Author

I'll try to finish this PR and remove the "WIP" today, please do not review the details yet.

I'll take another look at the etcd_storage integration test.

@liggitt
Copy link
Member

liggitt commented Aug 24, 2018

I'll try to finish this PR and remove the "WIP" today, please do not review the details yet.

if the first step is to mark the flag deprecated, then wait for the deprecation period, it seems like the first PR wouldn't be able to remove all of this yet.

@caesarxuchao
Copy link
Member Author

/retest

@caesarxuchao
Copy link
Member Author

if the first step is to mark the flag deprecated

Can we keep the flag, but make it non-functional, and mark it as deprecated?

It shouldn't break regular users, unless someone reads etcd directly.

If we keep this flag functioning for two more releases, storage migration won't be safe unless users follow instructions to disable this flag.

@caesarxuchao
Copy link
Member Author

Tests are passing, especially the etcd_storage_path_test. Removing WIP.

@caesarxuchao caesarxuchao changed the title [WIP] Remove storage versions flag Remove storage versions flag Aug 24, 2018
@caesarxuchao
Copy link
Member Author

/retest

@caesarxuchao
Copy link
Member Author

Rebased. @liggitt PTAL, thanks.

@liggitt
Copy link
Member

liggitt commented Jan 11, 2019

I'll try one more workaround for the storage version migrator e2e test and report back.

was this not successful?

@caesarxuchao
Copy link
Member Author

It was successful enough, kubernetes-sigs/kube-storage-version-migrator#16 :)
So this pull was the same as it used to be, just a rebase.

@liggitt
Copy link
Member

liggitt commented Jan 11, 2019

It was successful enough, kubernetes-sigs/kube-storage-version-migrator#16 :)
So this pull was the same as it used to be, just a rebase.

excellent, thanks

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 11, 2019
@liggitt
Copy link
Member

liggitt commented Jan 11, 2019

/approve cancel
/lgtm cancel

actually, I'm not sure this got reviewed. will queue it up, glad it can progress for 1.14

@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 11, 2019
@caesarxuchao
Copy link
Member Author

No, it wasn't reviewed thoroughly.

I'll squash after it's reviewed.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2019
@caesarxuchao caesarxuchao force-pushed the remove-storage-versions-flag branch from 9279333 to b041fdb Compare January 29, 2019 18:27
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 29, 2019
@caesarxuchao
Copy link
Member Author

@liggitt PTAL. Thanks.

@caesarxuchao caesarxuchao force-pushed the remove-storage-versions-flag branch from b041fdb to b07003f Compare January 29, 2019 22:23
@k8s-ci-robot
Copy link
Contributor

@caesarxuchao: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws b07003f3f71d162d58036a892470480b49943736 link /test pull-kubernetes-e2e-kops-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

Chao Xu added 4 commits January 30, 2019 13:28
The storage version now is solely decided by the
scheme.PrioritizedVersionsForGroup(). For cohabitating resources, the storage
version will be that of the overriding group as returned by
storageFactory.getStorageGroupResource().
is either decided by the schema's version priority, or by the per
resource override.

This fixes a bug where the "batch" group is encoded in v1beta1, which
was hidden when --storage-versions is a valid flag.
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.

one comment on the variable names. looks reasonable otherwise. leaning heavily on the etcd storage path test (no change needed there is a really good sign)

DefaultInternalEncoding schema.GroupVersion
InternalResourceEncodings map[string]schema.GroupVersion
type OverridingResourceEncoding struct {
ExternalResourceEncodings schema.GroupVersion
Copy link
Member

Choose a reason for hiding this comment

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

nit: ExternalResourceEncoding

InternalResourceEncodings map[string]schema.GroupVersion
type OverridingResourceEncoding struct {
ExternalResourceEncodings schema.GroupVersion
InternalResourceEncodings schema.GroupVersion
Copy link
Member

Choose a reason for hiding this comment

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

nit: InternalResourceEncoding

@caesarxuchao caesarxuchao force-pushed the remove-storage-versions-flag branch from b07003f to 4ea0708 Compare February 11, 2019 23:09
@caesarxuchao
Copy link
Member Author

Fixed the nits. PTAL. Thanks.

@liggitt
Copy link
Member

liggitt commented Feb 11, 2019

/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 Feb 11, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, 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 Feb 11, 2019
@k8s-ci-robot k8s-ci-robot merged commit 0ae81c9 into kubernetes:master Feb 12, 2019
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants