-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Change the API priority #102943
Change the API priority #102943
Conversation
/retest |
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. |
/cc @mortent You may follow 8574e3e to fix the test failures.
|
/hold |
To stop CI from running tests, you can convert PR to Draft. And |
/test pull-kubernetes-verify |
assign @kubernetes/api-reviewers |
@@ -72,40 +71,6 @@ func validNewPodSecurityPolicy() *policy.PodSecurityPolicy { | |||
} | |||
} | |||
|
|||
func TestCreate(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restore these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/102943/pull-kubernetes-unit/1405733896372359168
I tried to fix these failed by removing TestCreate() and TestUpdate()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... the failing tests mean that this change completely breaks the podsecuritypolicy API. That resource doesn't have a v1 type, so switching the default for policy to v1 means that that API fails to encode.
You need to do something like the following to tell the server to keep storing PodSecurityPolicy objects in v1beta1:
diff --git a/pkg/kubeapiserver/default_storage_factory_builder.go b/pkg/kubeapiserver/default_storage_factory_builder.go
index 31479d77646..4802f4cf07d 100644
--- a/pkg/kubeapiserver/default_storage_factory_builder.go
+++ b/pkg/kubeapiserver/default_storage_factory_builder.go
@@ -62,6 +62,7 @@ func NewStorageFactoryConfig() *StorageFactoryConfig {
resources := []schema.GroupVersionResource{
apisstorage.Resource("csistoragecapacities").WithVersion("v1beta1"),
+ policy.Resource("podsecuritypolicies").WithVersion("v1beta1"),
}
return &StorageFactoryConfig{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for your help
I will fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look like the test failed still there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm other than restoring the dropped tests
edit: this breaks the podsecuritypolicy API. see #102943 (comment)
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: CaoDonghui123 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@CaoDonghui123: The following tests failed, say
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. |
/triage accepted |
@CaoDonghui123: PR needs rebase. 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. |
@CaoDonghui123 can you pls rebase? |
"policy/v1beta1/podsecuritypolicies": "khBLobUXkqA=", | ||
"policy/v1/poddisruptionbudgets": "EVWiDmWqyJw=", | ||
"policy/v1beta1/poddisruptionbudgets": "EVWiDmWqyJw=", | ||
"policy/v1beta1/podsecuritypolicies": "bAz9Pn7x8wg=", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podsecuritypolicies must not change, there's no v1 version to encode to (I would not expect this test to pass)
What type of PR is this?
/kind api-change
What this PR does / why we need it:
TODO (mortent): priority should change after 1.21. See #95718 (comment)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: