-
Notifications
You must be signed in to change notification settings - Fork 595
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(): fix a bug while deleting event policies for channels #8141
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: rahulii <[email protected]>
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rahulii 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 |
/cc: @creydr |
Signed-off-by: rahulii <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8141 +/- ##
==========================================
+ Coverage 67.89% 67.93% +0.03%
==========================================
Files 368 368
Lines 17570 17566 -4
==========================================
+ Hits 11929 11933 +4
+ Misses 4893 4886 -7
+ Partials 748 747 -1 ☔ View full report in Codecov by Sentry. |
Hello @rahulii, eventing/pkg/reconciler/channel/resources/eventpolicy.go Lines 46 to 49 in b58b30d
So we should be fine with deleting the backing channels EP, when the channels EP gets deleted. But as you said, we should have at least a test for it. So we could have a unit test, which tests, that the owner reference is set correctly (the deletion is a k8s internal part). WDYT about updating your PR to add a test case for this instead? |
that makes sense, will update the PR! |
@creydr so the current changes I made, should I revoke them ? should we keep the code as it was before this PR ? 🤔 |
I would only add a unit test in this PR |
@creydr if you see a unit test case just above this - https://github.com/knative/eventing/blob/main/pkg/reconciler/channel/channel_test.go#L574 |
ok. Then I think we're fine here and can close this PR |
@creydr I was just thinking, if k8s will automatically clean the policies, what the point of keeping https://github.com/knative/eventing/pull/8141/files#diff-118d54e11363ce17cd0de2c082c234f0dcd47f4d1078f58d1d6b0866a091886bL141-L162 ? And even though if we are keeping those (let's say a double check), I believe it still has a bug which can be solved. |
are we done here? |
@rahulii I guess the check doesn't hurt ATM. I only don't get, where the bug is 🤔 |
Fixes #
Proposed Changes
Pre-review Checklist
Release Note
Docs