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

Skip publishing OpenAPI for nonstructural schemas #82653

Merged
merged 2 commits into from Sep 12, 2019

Conversation

@liggitt
Copy link
Member

commented Sep 12, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:

  • Restores compatibility with 1.15 CRDs by not publishing openapi non-structural schemas
  • Restores compatibility with 1.14 CRDs by not publishing openapi for structural schemas whose CRDs set spec.preserveUnknownProperties=true

Which issue(s) this PR fixes:
Fixes #82651

Does this PR introduce a user-facing change?:

Restores compatibility with <=1.15.x custom resources by not publishing OpenAPI for non-structural custom resource definitions

/assign @roycaihw @sttts
/cc @aanm
/sig api-machinery

@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

/milestone v1.16
/priority critical-urgent

@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

/retest

@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

verified only {"type":"object"} definition is now published for:

  • non-structural schemas
  • structural schemas in CRDs with spec.preserveUnknownFields=true
@aanm
aanm approved these changes Sep 12, 2019
Copy link
Contributor

left a comment

I've test it out kube-apiserver rc.1 with this patch and it works again. Thanks @liggitt ! 🚤

@liggitt liggitt force-pushed the liggitt:skip-publish-nonstructural branch from cd6eb38 to 9cf1516 Sep 12, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@liggitt liggitt force-pushed the liggitt:skip-publish-nonstructural branch from 9cf1516 to 0d832d7 Sep 12, 2019
@liggitt liggitt changed the title Skip publishing nonstructural schemas Skip publishing OpenAPI for nonstructural schemas Sep 12, 2019
@liggitt liggitt added this to Bugs/Cleanup/Tests in Custom Resource Definitions Sep 12, 2019
@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

/retest

@sttts

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2019

/lgtm

@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

grrr

diff -Naupr -x _output /home/prow/go/src/k8s.io/kubernetes/test/integration/master/BUILD /tmp/verify-bazel.PIXBfZ/go/src/k8s.io/kubernetes/test/integration/master/BUILD
--- /home/prow/go/src/k8s.io/kubernetes/test/integration/master/BUILD	2019-09-12 18:29:28.613188619 +0000
+++ /tmp/verify-bazel.PIXBfZ/go/src/k8s.io/kubernetes/test/integration/master/BUILD	2019-09-12 18:29:54.776436873 +0000
@@ -70,6 +70,7 @@ go_test(
         "//vendor/github.com/evanphx/json-patch:go_default_library",
         "//vendor/github.com/go-openapi/spec:go_default_library",
         "//vendor/github.com/stretchr/testify/require:go_default_library",
+        "//vendor/k8s.io/utils/pointer:go_default_library",
         "//vendor/sigs.k8s.io/yaml:go_default_library",
     ] + select({
         "@io_bazel_rules_go//go/platform:android": [

Run ./hack/update-bazel.sh
@liggitt liggitt force-pushed the liggitt:skip-publish-nonstructural branch from 0d832d7 to 0f64ec9 Sep 12, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Sep 12, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Sep 12, 2019

New changes are detected. LGTM label has been removed.

@liggitt liggitt added the lgtm label Sep 12, 2019
@liggitt

This comment has been minimized.

Copy link
Member Author

commented Sep 12, 2019

bazel regenerated, retagged

@k8s-ci-robot k8s-ci-robot merged commit 21db9c2 into kubernetes:master Sep 12, 2019
25 checks passed
25 checks passed
cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-conformance-kind-ipv6 Job succeeded.
Details
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-alpha-features Skipped.
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
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
@k8s-ci-robot k8s-ci-robot modified the milestones: v1.16, v1.17 Sep 12, 2019
@liggitt liggitt moved this from Bugs/Cleanup/Tests to Complete in Custom Resource Definitions Sep 12, 2019
@liggitt liggitt deleted the liggitt:skip-publish-nonstructural branch Sep 13, 2019
k8s-ci-robot added a commit that referenced this pull request Sep 13, 2019
…3-upstream-release-1.16

Automated cherry pick of #82653: Skip publishing OpenAPI for nonstructural schemas
@roycaihw

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

LGTM

@roycaihw

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

/area custom-resources

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.