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

Graduate storageVersionHash field in the discovery doc to beta #78325

Merged

Conversation

@caesarxuchao
Copy link
Member

commented May 25, 2019

#72942 introduced this field as alpha. Now we graduate the field to beta according to https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/35-storage-version-hash.md.

/kind feature
/sig api-machinery

The storageVersionHash feature is beta now. "StorageVersionHash" is a field in the discovery document of each resource. It allows clients to detect if the storage version of that resource has changed. Its value must be treated as opaque by clients. Only equality comparison on the value is valid.

/assign @roycaihw @liggitt @lavalamp

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 25, 2019

/retest

1 similar comment
@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 25, 2019

/retest

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:storageVersionHash-beta branch from 74051d5 to 2764abf May 25, 2019

@@ -55,7 +55,7 @@ run_assert_short_name_tests() {
output_message=$(kubectl get --raw=/api/v1)

## test if a short name is exported during discovery
kube::test::if_has_string "${output_message}" '{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":\["create","delete","deletecollection","get","list","patch","update","watch"\],"shortNames":\["cm"\]}'
kube::test::if_has_string "${output_message}" '{"name":"configmaps","singularName":"","namespaced":true,"kind":"ConfigMap","verbs":\["create","delete","deletecollection","get","list","patch","update","watch"\],"shortNames":\["cm"\]'

This comment has been minimized.

Copy link
@caesarxuchao

caesarxuchao May 25, 2019

Author Member

This change is needed because the output_message does not end at "shortNames", it also has "storageVersionHash" now.

This comment has been minimized.

Copy link
@lavalamp

lavalamp May 29, 2019

Member

Please add this in a comment, or add a ,"storageVersionHash":?

This comment has been minimized.

Copy link
@caesarxuchao

caesarxuchao May 30, 2019

Author Member

Added a ,"storageVersionHash":

@liggitt

This comment has been minimized.

Copy link
Member

commented May 28, 2019

@sttts and I were discussing which aspects of a CRD should factor into its storage version hash. GIven that pruning and defaulting can change what persists in storage, should the schema of a CRD factor into its storage version hash?

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 29, 2019

@sttts @liggitt

I don't think storageVersionHash should include the CRD's OpenAPI schema. In case of changing CRD schema in a backwards compatible way, it's similar to adding a new field with default value to a built-in v1 API, which does not require storageVersionHash change, nor an immediate storage migration.

Or maybe I missed your point?

@lavalamp

This comment has been minimized.

Copy link
Member

commented May 29, 2019

re: Jordan's question: the issue is that you can do things to CRD schemas that you (hopefully) cannot to built-in resources. E.g. if you remove a field, then there are a bunch of stored items which need to be re-pruned. Technically this should trigger a migration, however it is also (severe) user error. I am OK not triggering the migrator for this condition--we can always add this in the future.

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:storageVersionHash-beta branch from 2764abf to 2243a0b May 30, 2019

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:storageVersionHash-beta branch from 2243a0b to 2f4c273 May 30, 2019

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

@liggitt PTAL. It'd be great if we can get this in 1.15. Thank you.

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

/retest

@lavalamp

This comment has been minimized.

Copy link
Member

commented May 30, 2019

/lgtm
/approve

/retest

@k8s-ci-robot k8s-ci-robot added the lgtm label May 30, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented May 30, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, lavalamp

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

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

/retest

2 similar comments
@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

/retest

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

commented May 30, 2019

/retest

@liggitt liggitt added this to the v1.15 milestone May 31, 2019

@k8s-ci-robot k8s-ci-robot merged commit d817a7e into kubernetes:master Jun 1, 2019

21 checks passed

cla/linuxfoundation caesarxuchao authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.