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

fix: vap error logging for rego only templates #3520

Merged

Conversation

martijnvdp
Copy link
Contributor

@martijnvdp martijnvdp commented Aug 30, 2024

What this PR does / why we need it:
currently logging vap generation errors on rego only templates, this pr changes the or operator to and to exclude the ErrCodeNotDefined error

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 #3516

Special notes for your reviewer:

@martijnvdp martijnvdp requested a review from a team as a code owner August 30, 2024 07:51
Signed-off-by: martijnvdp <m.vanderploeg@nl.ccv.eu>
@martijnvdp martijnvdp force-pushed the fix-vap-error-logging branch from 1f8840c to 3ff7238 Compare August 30, 2024 07:55
@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.97%. Comparing base (3350319) to head (5b85603).
Report is 132 commits behind head on master.

Files with missing lines Patch % Lines
...onstrainttemplate/constrainttemplate_controller.go 0.00% 0 Missing and 1 partial ⚠️

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

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (5b85603)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3520      +/-   ##
==========================================
- Coverage   54.49%   47.97%   -6.53%     
==========================================
  Files         134      219      +85     
  Lines       12329    15169    +2840     
==========================================
+ Hits         6719     7277     +558     
- Misses       5116     7074    +1958     
- Partials      494      818     +324     
Flag Coverage Δ
unittests 47.97% <0.00%> (-6.53%) ⬇️

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.

Copy link
Member

@ritazh ritazh 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 PR @martijnvdp!

@ritazh
Copy link
Member

ritazh commented Sep 2, 2024

@JaydipGabani please cherrypick this to 3.17 and cut a release for v3.17.1

@ritazh ritazh requested a review from a team September 4, 2024 00:46
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

@JaydipGabani JaydipGabani merged commit 7429d70 into open-policy-agent:master Sep 4, 2024
19 checks passed
JaydipGabani pushed a commit to JaydipGabani/gatekeeper that referenced this pull request Sep 4, 2024
Signed-off-by: martijnvdp <m.vanderploeg@nl.ccv.eu>
Co-authored-by: Jaydipkumar Arvindbhai Gabani <gabanijaydip@gmail.com>
(cherry picked from commit 7429d70)
JaydipGabani added a commit to JaydipGabani/gatekeeper that referenced this pull request Sep 4, 2024
Signed-off-by: martijnvdp <m.vanderploeg@nl.ccv.eu>
Co-authored-by: Jaydipkumar Arvindbhai Gabani <gabanijaydip@gmail.com>
(cherry picked from commit 7429d70)
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
JaydipGabani added a commit that referenced this pull request Sep 6, 2024
…3525)

Signed-off-by: martijnvdp <m.vanderploeg@nl.ccv.eu>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Co-authored-by: Martijn van der Ploeg <73637849+martijnvdp@users.noreply.github.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.

generateVap errors for rego-only constraint templates in audit/controller pod logs with 3.17
5 participants