Skip to content
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

List applying EventPolicies in Sequence status #8012

Merged
merged 13 commits into from
Jul 1, 2024

Conversation

rahulii
Copy link
Contributor

@rahulii rahulii commented Jun 18, 2024

Fixes #7978

Proposed Changes

  • 🎁 List EventPolicies in the Sequence .status.policies, which apply for it.
  • 🎁 Add the EventPoliciesReady condition to indicate, if the referenced policies are Ready

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

List applying EventPolicies in Sequence status

Docs

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2024
@knative-prow knative-prow bot requested review from aliok and matzew June 18, 2024 12:45
@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 18, 2024
Copy link

knative-prow bot commented Jun 18, 2024

Hi @rahulii. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@rahulii rahulii changed the title add SequenceConditionEventPoliciesReady in status [WIP] add SequenceConditionEventPoliciesReady in status Jun 18, 2024
@creydr
Copy link
Member

creydr commented Jun 24, 2024

Hello @rahulii,
thanks for your work so far on this. Do you need any more details to continue here? You can also check on #8014, how we solved this for the Channel (particularly on b7ff773 and 7891138).
Please let us know if you have any questions :)

@rahulii
Copy link
Contributor Author

rahulii commented Jun 25, 2024

@creydr thanks for the references, will get this done.

@creydr
Copy link
Member

creydr commented Jun 28, 2024

Hello @rahulii,
any updates on this?

@rahulii rahulii force-pushed the list-applying-policies-in-sequence branch from b81cf1f to f83e5f6 Compare June 28, 2024 10:51
@rahulii
Copy link
Contributor Author

rahulii commented Jun 28, 2024

Hello @rahulii, any updates on this?

hey @creydr yes I was trying to understand the changes on your PR - particularly this func - https://github.com/knative/eventing/pull/8014/files#diff-118d54e11363ce17cd0de2c082c234f0dcd47f4d1078f58d1d6b0866a091886bR128

@creydr
Copy link
Member

creydr commented Jun 28, 2024

hey @creydr yes I was trying to understand the changes on your PR - particularly this func - https://github.com/knative/eventing/pull/8014/files#diff-118d54e11363ce17cd0de2c082c234f0dcd47f4d1078f58d1d6b0866a091886bR128

Hey @rahulii,
this was only specific to the Channel implementation, as we needed to copy the policy also to the backing channel. This is not needed for the Sequence.
I guess you can focus mostly on something like b7ff773 and 7891138

@creydr
Copy link
Member

creydr commented Jun 28, 2024

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 28, 2024
@rahulii
Copy link
Contributor Author

rahulii commented Jun 28, 2024

hey @creydr yes I was trying to understand the changes on your PR - particularly this func - https://github.com/knative/eventing/pull/8014/files#diff-118d54e11363ce17cd0de2c082c234f0dcd47f4d1078f58d1d6b0866a091886bR128

Hey @rahulii, this was only specific to the Channel implementation, as we needed to copy the policy also to the backing channel. This is not needed for the Sequence. I guess you can focus mostly on something like b7ff773 and 7891138

ah gotcha!

@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 1, 2024
pkg/reconciler/sequence/controller.go Outdated Show resolved Hide resolved
pkg/reconciler/sequence/sequence_test.go Outdated Show resolved Hide resolved
@rahulii rahulii marked this pull request as ready for review July 1, 2024 11:01
@knative-prow knative-prow bot requested review from aslom and Leo6Leo July 1, 2024 11:01
@rahulii rahulii requested a review from creydr July 1, 2024 11:03
@creydr creydr changed the title [WIP] add SequenceConditionEventPoliciesReady in status List applying EventPolicies in Sequence status Jul 1, 2024
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 1, 2024
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
@rahulii rahulii force-pushed the list-applying-policies-in-sequence branch from 2079135 to 7a8cf64 Compare July 1, 2024 11:19
Signed-off-by: rahulii <r.sawra@gmail.com>
Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good so far. Need to fix the linting issue and failing unit test

pkg/reconciler/sequence/controller.go Outdated Show resolved Hide resolved
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 9 lines in your changes missing coverage. Please review.

Project coverage is 67.92%. Comparing base (3b1bfb4) to head (8b2ede3).

Files Patch % Lines
pkg/apis/flows/v1/sequence_lifecycle.go 50.00% 4 Missing ⚠️
pkg/reconciler/testing/v1/sequence.go 84.21% 3 Missing ⚠️
pkg/reconciler/sequence/sequence.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8012      +/-   ##
==========================================
+ Coverage   67.89%   67.92%   +0.02%     
==========================================
  Files         366      366              
  Lines       17115    17154      +39     
==========================================
+ Hits        11621    11651      +30     
- Misses       4773     4781       +8     
- Partials      721      722       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: rahulii <r.sawra@gmail.com>
Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fixing this @rahulii 🎉

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2024
Copy link

knative-prow bot commented Jul 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, rahulii

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2024
@knative-prow knative-prow bot merged commit 96c30bd into knative:main Jul 1, 2024
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List applying policies in Sequence .status.policies
2 participants