Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add EventPolicy reconciliation for Sequence #8106
Add EventPolicy reconciliation for Sequence #8106
Changes from 3 commits
fb45ef6
3298698
043141a
2c99a12
1696769
0adb907
e82a1db
5e73f53
ca8b3ae
78a8b0a
fe72c3c
f088cf8
22520ed
f048559
092f87e
8126f8c
2f23635
268c595
38017b8
fc8be57
b7bfc92
56b071b
dce2679
18373ca
5da98e0
36a1cb3
6042cbb
9d1e73b
e6cddbe
cf4d257
ad4df83
6c8fa1a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Are we using the kind, version or group label? I can only see the name being useful, and therefore the GVK can be removed
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.
If I understand the flow correctly, I think the GK is used when the controller is trying to watch which eventpolicy get changed.
eventing/pkg/reconciler/sequence/controller.go
Lines 69 to 77 in 9ea1d54
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.
when is the channel name empty?
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.
When we are making the eventpolicy for the sequence.
As you can see from the test here:
https://github.com/knative/eventing/pull/8106/files#diff-42ed9804c3511a386317c39a39cea9571e16d694153edb7d79c800ae4589ffaaR2302
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.
Sorry, but I didn't get it, is empty only for testing? when is the channel name empty in the real production case?
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 see now by trying to answer your question. It is only for the testing purposes. I couldn't come up with any use case in the real production use. I will try to see what I can do and provide update in this thread.
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.
there are a few more cases to handle in the logic here, for example, when a channel is removed or added (meaning a step is removed or added) channels will change and we will need to remove event policies, what I would do is:
<prefix> + sequence-name
label)Optimize the algorithm where possible
Check failure on line 424 in pkg/reconciler/sequence/sequence.go
GitHub Actions / style / Golang / Lint