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

Revert "Fix legacy fallback stale for aggregated discovery" #115981

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Feb 23, 2023

Reverts #115770

https://storage.googleapis.com/k8s-triage/index.html?text=TestLegacyFallbackNoCache#1bf2be60ce0078971afe

The test case was added recently and I am not sure how to fix it yet.

Failed
=== RUN   TestLegacyFallbackNoCache
I0222 09:04:49.496617  108495 handler_discovery.go:392] Starting ResourceDiscoveryManager
I0222 09:04:49.498038  108495 handler.go:149] Adding GroupVersion stable.example.com v1 to ResourceManager
I0222 09:04:49.502258  108495 handler.go:149] Adding GroupVersion stable.example.com v1alpha1 to ResourceManager
I0222 09:04:49.503313  108495 handler.go:149] Adding GroupVersion stable.example.com v1beta1 to ResourceManager
    handler_discovery_test.go:379: 
        	Error Trace:	/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/apiserver/handler_discovery_test.go:379
        	Error:      	Not equal: 
        	            	expected: []v2beta1.APIGroupDiscovery{v2beta1.APIGroupDiscovery{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"stable.example.com", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Versions:[]v2beta1.APIVersionDiscovery{v2beta1.APIVersionDiscovery{Version:"v1beta1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce7e0), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}, v2beta1.APIVersionDiscovery{Version:"v1alpha1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce810), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}, v2beta1.APIVersionDiscovery{Version:"v1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce840), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}}}}
        	            	actual  : []v2beta1.APIGroupDiscovery{v2beta1.APIGroupDiscovery{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"stable.example.com", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Versions:[]v2beta1.APIVersionDiscovery{v2beta1.APIVersionDiscovery{Version:"v1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce720), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}, v2beta1.APIVersionDiscovery{Version:"v1beta1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce750), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}, v2beta1.APIVersionDiscovery{Version:"v1alpha1", Resources:[]v2beta1.APIResourceDiscovery{v2beta1.APIResourceDiscovery{Resource:"foos", ResponseKind:(*v1.GroupVersionKind)(0xc000bce780), Scope:"Cluster", SingularResource:"foo", Verbs:[]string{"get", "list", "watch", "create", "update", "patch", "delete", "deletecollection"}, ShortNames:[]string(nil), Categories:[]string{"all"}, Subresources:[]v2beta1.APISubresourceDiscovery(nil)}}, Freshness:"Current"}}}}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -30,2 +30,33 @@
        	            	   Versions: ([]v2beta1.APIVersionDiscovery) (len=3) {
        	            	+   (v2beta1.APIVersionDiscovery) {
        	            	+    Version: (string) (len=2) "v1",
        	            	+    Resources: ([]v2beta1.APIResourceDiscovery) (len=1) {
        	            	+     (v2beta1.APIResourceDiscovery) {
        	            	+      Resource: (string) (len=4) "foos",
        	            	+      ResponseKind: (*v1.GroupVersionKind)({
        	            	+       Group: (string) (len=18) "stable.example.com",
        	            	+       Version: (string) (len=2) "v1",
        	            	+       Kind: (string) (len=3) "Foo"
        	            	+      }),
        	            	+      Scope: (v2beta1.ResourceScope) (len=7) "Cluster",
        	            	+      SingularResource: (string) (len=3) "foo",
        	            	+      Verbs: ([]string) (len=8) {
        	            	+       (string) (len=3) "get",
        	            	+       (string) (len=4) "list",
        	            	+       (string) (len=5) "watch",
        	            	+       (string) (len=6) "create",
        	            	+       (string) (len=6) "update",
        	            	+       (string) (len=5) "patch",
        	            	+       (string) (len=6) "delete",
        	            	+       (string) (len=16) "deletecollection"
        	            	+      },
        	            	+      ShortNames: ([]string) <nil>,
        	            	+      Categories: ([]string) (len=1) {
        	            	+       (string) (len=3) "all"
        	            	+      },
        	            	+      Subresources: ([]v2beta1.APISubresourceDiscovery) <nil>
        	            	+     }
        	            	+    },
        	            	+    Freshness: (v2beta1.DiscoveryFreshness) (len=7) "Current"
        	            	+   },
        	            	    (v2beta1.APIVersionDiscovery) {
        	            	@@ -91,33 +122,2 @@
        	            	     Freshness: (v2beta1.DiscoveryFreshness) (len=7) "Current"
        	            	-   },
        	            	-   (v2beta1.APIVersionDiscovery) {
        	            	-    Version: (string) (len=2) "v1",
        	            	-    Resources: ([]v2beta1.APIResourceDiscovery) (len=1) {
        	            	-     (v2beta1.APIResourceDiscovery) {
        	            	-      Resource: (string) (len=4) "foos",
        	            	-      ResponseKind: (*v1.GroupVersionKind)({
        	            	-       Group: (string) (len=18) "stable.example.com",
        	            	-       Version: (string) (len=2) "v1",
        	            	-       Kind: (string) (len=3) "Foo"
        	            	-      }),
        	            	-      Scope: (v2beta1.ResourceScope) (len=7) "Cluster",
        	            	-      SingularResource: (string) (len=3) "foo",
        	            	-      Verbs: ([]string) (len=8) {
        	            	-       (string) (len=3) "get",
        	            	-       (string) (len=4) "list",
        	            	-       (string) (len=5) "watch",
        	            	-       (string) (len=6) "create",
        	            	-       (string) (len=6) "update",
        	            	-       (string) (len=5) "patch",
        	            	-       (string) (len=6) "delete",
        	            	-       (string) (len=16) "deletecollection"
        	            	-      },
        	            	-      ShortNames: ([]string) <nil>,
        	            	-      Categories: ([]string) (len=1) {
        	            	-       (string) (len=3) "all"
        	            	-      },
        	            	-      Subresources: ([]v2beta1.APISubresourceDiscovery) <nil>
        	            	-     }
        	            	-    },
        	            	-    Freshness: (v2beta1.DiscoveryFreshness) (len=7) "Current"
        	            	    }
        	Test:       	TestLegacyFallbackNoCache
--- FAIL: TestLegacyFallbackNoCache (0.11s)

/kind flake

@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

@k8s-ci-robot k8s-ci-robot added kind/flake Categorizes issue or PR as related to a flaky test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 23, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pacoxu
Once this PR has been reviewed and has the lgtm label, please assign sttts for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 23, 2023
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 23, 2023
@pacoxu
Copy link
Member Author

pacoxu commented Feb 23, 2023

/cc @Jefftree @deads2k

@Jefftree
Copy link
Member

Thanks for raising this. I've opened #115991 to fix it.

@pacoxu
Copy link
Member Author

pacoxu commented Feb 23, 2023

Thanks for raising this. I've opened #115991 to fix it.

Thanks for the quick fix.

@pacoxu pacoxu closed this Feb 23, 2023
@cici37
Copy link
Contributor

cici37 commented Feb 28, 2023

/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 Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/flake Categorizes issue or PR as related to a flaky test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. 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. 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.

None yet

4 participants