-
Notifications
You must be signed in to change notification settings - Fork 601
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
Refactor the AuthStatus Logic in Eventing OIDC Feature Track #7417
Refactor the AuthStatus Logic in Eventing OIDC Feature Track #7417
Conversation
Signed-off-by: pingjiang <[email protected]>
Hi @xiangpingjiang. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7417 +/- ##
==========================================
- Coverage 76.79% 76.70% -0.09%
==========================================
Files 253 253
Lines 14098 14169 +71
==========================================
+ Hits 10826 10868 +42
- Misses 2732 2749 +17
- Partials 540 552 +12 ☔ View full report in Codecov by Sentry. |
/ok-to-test |
/retest |
13bd9a5
to
a7628df
Compare
Hey @xiangpingjiang, are you blocked on anything? Is this PR ready for review now? |
hello @Leo6Leo I think it's ready for rewiew, just the upgrade-tests_eventing_main test sometimes fails, sometimes succeeds. Can I ignore it ? |
@xiangpingjiang Sounds good, thanks for the PR! Will take a look at 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.
Hello @xiangpingjiang,
thanks for working on this. I left a few comments (mostly about naming)
Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[email protected]>
/retest |
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.
I really like how this is looking so far!
pkg/auth/serviceaccount.go
Outdated
MarkOIDCIdentityCreatedFailed(reason, messageFormat string, messageA ...interface{}) | ||
} | ||
|
||
func SetupOIDCServiceAccount(flags feature.Flags, ctx context.Context, serviceAccountLister corev1listers.ServiceAccountLister, kubeclient kubernetes.Interface, gvk schema.GroupVersionKind, objectMeta metav1.ObjectMeta, marker OIDCIdentityStatusMarker, setAuthStatus func(a *duckv1.AuthStatus)) pkgreconciler.Event { |
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.
@xiangpingjiang would you be able to add a unit test or two for this function? That way we can catch any breaking changes earlier if this every gets updated
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.
@Cali0707 I will try to do that. SetupOIDCServiceAccount func rely on EnsureOIDCServiceAccountExistsForResource func, the EnsureOIDCServiceAccountExistsForResource didn't have unit test. Do I need add unit test for EnsureOIDCServiceAccountExistsForResource first ?
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.
I think just SetupOIDCServiceAccount
is totally fine, but if you wanted to add tests for both that would be great (just not necessary IMO)
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.
Hello @Cali0707
I added some unit test, please give me a review when you have time
Signed-off-by: pingjiang <[email protected]>
…//developer20.com/go-context/ Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[email protected]>
Signed-off-by: pingjiang <[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
/cc @creydr
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, xiangpingjiang 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 |
Fixes #7377
Proposed Changes
Pre-review Checklist
Release Note
Docs