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

chore: updating VAP default failure policy to fail #3702

Merged
merged 15 commits into from
Nov 22, 2024

Conversation

JaydipGabani
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #3501

Special notes for your reviewer:

@JaydipGabani JaydipGabani requested a review from a team as a code owner November 14, 2024 23:58
@ritazh
Copy link
Member

ritazh commented Nov 18, 2024

unit test shouldnt be failing now vapb generation has a wait. pls check.

@JaydipGabani
Copy link
Contributor Author

Very strange thing is happening in unit test, with ignore policy its passing, with fail policy it is getting stuck in constraint not being marked as enforced with scoped enforcement action. I am still debugging.

Signed-off-by: Jaydip Gabani <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 47.56%. Comparing base (3350319) to head (32f4591).
Report is 203 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/constraint/constraint_controller.go 0.00% 12 Missing ⚠️
pkg/drivers/k8scel/schema/schema.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (32f4591). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (32f4591)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3702      +/-   ##
==========================================
- Coverage   54.49%   47.56%   -6.94%     
==========================================
  Files         134      236     +102     
  Lines       12329    19907    +7578     
==========================================
+ Hits         6719     9469    +2750     
- Misses       5116     9547    +4431     
- Partials      494      891     +397     
Flag Coverage Δ
unittests 47.56% <0.00%> (-6.94%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM after nit

if err != nil {
return reconcile.Result{}, err
}
vapBindingName := fmt.Sprintf("gatekeeper-%s", instance.GetName())
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we move generating the binding name from the constraint into its own function?

I think we do this string format more than once (to handle create/update), so should help with uniformity.

@JaydipGabani JaydipGabani merged commit 754675b into open-policy-agent:master Nov 22, 2024
17 checks passed
@JaydipGabani JaydipGabani deleted the default-fail branch November 22, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update default for vap generation
4 participants