-
Notifications
You must be signed in to change notification settings - Fork 391
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 gap in APIExport virtual workspace queues #2720
🐛 Fix gap in APIExport virtual workspace queues #2720
Conversation
Fix a gap in the APIExport virtual workspace queueing where it was possible to incorrectly return a "not found" error when trying to list a claimed resource. The gap was that we weren't queueing the dependent APIExports; i.e., if APIExport A gets updated, and APIExport B has a permission claim on A's identity, we need to make sure to queue B in this situation. Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
aa661f2
to
c359931
Compare
/approve |
apiExport, ok := obj.(*apisv1alpha1.APIExport) | ||
if !ok { | ||
return []string{}, fmt.Errorf("obj %T is not an APIExport", obj) | ||
} | ||
|
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.
Noticed we have these type checks present across all indexers -- are we considering dropping them everywhere?
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.
Yes
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.
Could we also strictly type this stuff? Why obj interface{}
?
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.
Index function
@@ -131,11 +135,16 @@ func (c *APIReconciler) reconcile(ctx context.Context, apiExport *apisv1alpha1.A | |||
continue | |||
} | |||
|
|||
logger = logger.WithValues("identity", pc.IdentityHash) | |||
|
|||
logger.V(4).Info("getting APIExports by identity") |
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.
Is project policy on logging that v=4
is effectively "anything goes"? Just notice a lot of messages being propagated throughout here 👍🏻
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.
We can lower to 5 or 6 later, or remove them entirely, but this was critical in determining what was going on.
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.
ack
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hasheddan, ncdc 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 |
Summary
Fix a gap in the APIExport virtual workspace queueing where it was possible to incorrectly return a "not found" error when trying to list a claimed resource. The gap was that we weren't queueing the dependent APIExports; i.e., if APIExport A gets updated, and APIExport B has a permission claim on A's identity, we need to make sure to queue B in this situation.
Related issue(s)
Fixes #2713