Skip to content

chore: updating VAP default failure policy to fail#3702

Merged
JaydipGabani merged 15 commits into
open-policy-agent:masterfrom
JaydipGabani:default-fail
Nov 22, 2024
Merged

chore: updating VAP default failure policy to fail#3702
JaydipGabani merged 15 commits into
open-policy-agent:masterfrom
JaydipGabani:default-fail

Conversation

@JaydipGabani
Copy link
Copy Markdown
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:

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
@JaydipGabani JaydipGabani requested a review from a team as a code owner November 14, 2024 23:58
@ritazh
Copy link
Copy Markdown
Member

ritazh commented Nov 18, 2024

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

@JaydipGabani
Copy link
Copy Markdown
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 <gabanijaydip@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

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:

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Copy link
Copy Markdown
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
Copy Markdown
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.

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
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