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 policies in Parallel #8083

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

rahulii
Copy link
Contributor

@rahulii rahulii commented Jul 8, 2024

Fixes #7979

Proposed Changes

🎁 List EventPolicies in the Parallel .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 Parallel status

Docs

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

knative-prow bot commented Jul 8, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 8, 2024
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 77.08333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 67.87%. Comparing base (fe6bd56) to head (405b1eb).
Report is 11 commits behind head on main.

Files Patch % Lines
pkg/apis/flows/v1/parallel_lifecycle.go 50.00% 4 Missing ⚠️
pkg/reconciler/testing/v1/parallel.go 84.21% 3 Missing ⚠️
pkg/reconciler/parallel/controller.go 88.23% 1 Missing and 1 partial ⚠️
pkg/reconciler/parallel/parallel.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8083      +/-   ##
==========================================
+ Coverage   67.84%   67.87%   +0.03%     
==========================================
  Files         367      367              
  Lines       17349    17474     +125     
==========================================
+ Hits        11770    11861      +91     
- Misses       4844     4873      +29     
- Partials      735      740       +5     

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

Signed-off-by: rahulii <r.sawra@gmail.com>
@rahulii rahulii marked this pull request as ready for review July 8, 2024 12:56
@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 8, 2024
@knative-prow knative-prow bot requested a review from creydr July 8, 2024 12:56
@rahulii rahulii changed the title List applying policies in job sink List applying policies in Parallel Jul 8, 2024
@rahulii
Copy link
Contributor Author

rahulii commented Jul 8, 2024

/ok-to-test

@knative-prow knative-prow bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 8, 2024
@Leo6Leo Leo6Leo self-requested a review July 9, 2024 12:37
Copy link
Member

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! @rahulii , great job! Could you also take a look at the formatting issue that is reported by reviewdog?

pkg/apis/flows/v1/parallel_lifecycle.go Show resolved Hide resolved
pkg/reconciler/testing/v1/parallel.go Outdated Show resolved Hide resolved
Signed-off-by: rahulii <r.sawra@gmail.com>
@rahulii
Copy link
Contributor Author

rahulii commented Jul 10, 2024

Thank you for the PR! @rahulii , great job! Could you also take a look at the formatting issue that is reported by reviewdog?

@Leo6Leo not sure if this PR has any changes related to reviewdog failure? It's showing boilerplate text issues. Can you PTAL?

@Cali0707
Copy link
Member

not sure if this PR has any changes related to reviewdog failure? It's showing boilerplate text issues. Can you PTAL?

Recently reviewdog started reporting failures on the whole project (not just modified files in the PR). We're trying to go through and fix those issues, so unless the reviewdog failure is on one of the files you changed in this PR don't worry about it - we are working to fix it all

@rahulii
Copy link
Contributor Author

rahulii commented Jul 10, 2024

not sure if this PR has any changes related to reviewdog failure? It's showing boilerplate text issues. Can you PTAL?

Recently reviewdog started reporting failures on the whole project (not just modified files in the PR). We're trying to go through and fix those issues, so unless the reviewdog failure is on one of the files you changed in this PR don't worry about it - we are working to fix it all

thanks for the update @Cali0707 👍🏼

Copy link
Member

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks for the great work! It looks good to me right now.
/cc @Cali0707

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

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

Looks good, just a few things I think we need to fix up and then this should be good to merge - nice work @rahulii !

pkg/reconciler/parallel/controller.go Outdated Show resolved Hide resolved
pkg/reconciler/parallel/controller_test.go Show resolved Hide resolved
pkg/reconciler/parallel/parallel.go Show resolved Hide resolved
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2024
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Comment on lines +60 to +66
var globalResync func()
featureStore := feature.NewStore(logging.FromContext(ctx).Named("feature-config-store"), func(name string, value interface{}) {
if globalResync != nil {
globalResync()
}
})
featureStore.WatchConfigs(cmw)
Copy link
Member

Choose a reason for hiding this comment

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

Nice! We just need to use this store in the parallelreconciler.NewImpl(ctx, r, ...options) now (line 58). See for example how that is done here:

impl := inmemorychannelreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
return controller.Options{
ConfigStore: featureStore,
}
})

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, thanks for reminding @Cali0707 👍🏼

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, PTAL!

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

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thanks for all your work here @rahulii !

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

knative-prow bot commented Jul 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, 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 12, 2024
@knative-prow knative-prow bot merged commit e73f2c9 into knative:main Jul 12, 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 Parallel .status.policies
3 participants