-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(server): don't use cluster scope list + watch in namespaced mode. Fixes #13177 #13189
Conversation
Signed-off-by: Jiacheng Xu <[email protected]>
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.
Thanks for fixing this, just one small comment
Signed-off-by: Jiacheng Xu <[email protected]>
@@ -638,7 +638,7 @@ func getWorkflowServer() (workflowpkg.WorkflowServiceServer, context.Context) { | |||
if err = wfStore.Add(&wfObj5); err != nil { | |||
panic(err) | |||
} | |||
server := NewWorkflowServer(instanceIdSvc, offloadNodeStatusRepo, archivedRepo, wfClientset, wfStore, wfStore) | |||
server := NewWorkflowServer(instanceIdSvc, offloadNodeStatusRepo, archivedRepo, wfClientset, wfStore, wfStore, nil) |
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.
Wasn't this one previously correct with metav1.NamespaceAll
?
With the new && namespace != nil
check, this now takes a different path (but still passes apparently?)
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, I think I changed it by accident and I change it back to the metav1.NamespaceAll
.
With the new && namespace != nil check, this now takes a different path (but still passes apparently?)
The value of the namespace doesn't matter regarding the test because we don't start the reflector to perform list and watch in the test and we just manually add objects to the store.
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.
But the reflector is set since the store is not nil
in this case, so it would start wouldn't it? It just isn't used actively in this test
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.
the Run
method is not called in the test, so the reflector is not started.
Signed-off-by: Jiacheng Xu <[email protected]>
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, thanks for fixing this! Will have a patch out soon!
…ixes argoproj#13177 (argoproj#13189) Signed-off-by: Jiacheng Xu <[email protected]> Signed-off-by: Yulin Li <[email protected]>
…ixes #13177 (#13189) Signed-off-by: Jiacheng Xu <[email protected]> (cherry picked from commit 8f3860d)
Fixes #13177
Verification
Try to apply the following manifests into a k8s cluster:
With the image built from this PR, don't see the following permission errors anymore: