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 job sink #8064

Merged
merged 12 commits into from
Jul 4, 2024

Conversation

rahulii
Copy link
Contributor

@rahulii rahulii commented Jul 2, 2024

Fixes #8062

Proposed Changes

  • 🎁 List EventPolicies in the JobSink .status.policies, which apply for it.
  • 🎁 Add the EventPoliciesReady condition to indicate, if the referenced policies are Ready
  • 🎁 Add unit and integration tests

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 JobSink status

Docs

Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
@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 Jul 2, 2024
@knative-prow knative-prow bot requested review from aliok and Leo6Leo July 2, 2024 09:39
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 2, 2024
Copy link

knative-prow bot commented Jul 2, 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.

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

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 52.80899% with 42 lines in your changes missing coverage. Please review.

Project coverage is 68.04%. Comparing base (96c30bd) to head (d790b54).
Report is 5 commits behind head on main.

Files Patch % Lines
pkg/apis/sinks/v1alpha1/job_sink_lifecycle.go 0.00% 16 Missing ⚠️
pkg/reconciler/testing/v1alpha1/jobsink.go 76.92% 12 Missing ⚠️
pkg/reconciler/jobsink/controller.go 0.00% 11 Missing ⚠️
pkg/reconciler/jobsink/jobsink.go 50.00% 1 Missing and 1 partial ⚠️
pkg/reconciler/sequence/sequence.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8064      +/-   ##
==========================================
+ Coverage   67.92%   68.04%   +0.12%     
==========================================
  Files         366      367       +1     
  Lines       17154    17249      +95     
==========================================
+ Hits        11651    11737      +86     
+ Misses       4781     4780       -1     
- Partials      722      732      +10     

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

Signed-off-by: rahulii <r.sawra@gmail.com>
@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 2, 2024
Signed-off-by: rahulii <r.sawra@gmail.com>
@rahulii rahulii marked this pull request as ready for review July 2, 2024 11:26
@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 2, 2024
@knative-prow knative-prow bot requested a review from pierDipi July 2, 2024 11:26
@rahulii
Copy link
Contributor Author

rahulii commented Jul 2, 2024

cc: @creydr @pierDipi

@creydr
Copy link
Member

creydr commented Jul 2, 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 Jul 2, 2024
@creydr
Copy link
Member

creydr commented Jul 2, 2024

/test reconciler-tests

Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 3, 2024
Signed-off-by: rahulii <r.sawra@gmail.com>
Signed-off-by: rahulii <r.sawra@gmail.com>
"k8s.io/apimachinery/pkg/runtime"
utilrand "k8s.io/apimachinery/pkg/util/rand"
clientgotesting "k8s.io/client-go/testing"
"k8s.io/utils/pointer"
Copy link
Member

Choose a reason for hiding this comment

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

SA1019: "k8s.io/utils/pointer" is deprecated: Use functions in k8s.io/utils/ptr instead: ptr.To to obtain a pointer, ptr.Deref to dereference a pointer, ptr.Equal to compare dereferenced pointers. (staticcheck)

we already use that package for job sink:

"k8s.io/utils/ptr"

Let's stay consistent.

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, Thanks!

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

rahulii commented Jul 4, 2024

/ok-to-test

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

@pierDipi pierDipi 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

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

knative-prow bot commented Jul 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi, 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 4, 2024
@pierDipi
Copy link
Member

pierDipi commented Jul 4, 2024

Thanks @rahulii

@knative-prow knative-prow bot merged commit 657c3cd into knative:main Jul 4, 2024
33 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List applying policies in JobSink .status.policies
4 participants