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: make audit more fault tolerant, log error instead of skipping update #2162

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

ritazh
Copy link
Member

@ritazh ritazh commented Jul 13, 2022

Signed-off-by: Rita Zhang rita.z.zhang@gmail.com

What this PR does / why we need it:
make audit more fault tolerant, log error instead of skipping status update

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

Special notes for your reviewer:

…atus update

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
@ritazh ritazh changed the title fix: make audit more fault tolerant, log error instead of skipping st… fix: make audit more fault tolerant, log error instead of skipping update Jul 13, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2162 (3aa1b9d) into master (f5eacc7) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2162      +/-   ##
==========================================
- Coverage   54.41%   54.38%   -0.04%     
==========================================
  Files         111      111              
  Lines        9530     9529       -1     
==========================================
- Hits         5186     5182       -4     
- Misses       3946     3949       +3     
  Partials      398      398              
Flag Coverage Δ
unittests 54.38% <0.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
pkg/audit/manager.go 0.00% <0.00%> (ø)
...onstrainttemplate/constrainttemplate_controller.go 56.59% <0.00%> (-1.20%) ⬇️
pkg/readiness/object_tracker.go 82.91% <0.00%> (-1.07%) ⬇️
pkg/readiness/list.go 91.17% <0.00%> (+11.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5eacc7...3aa1b9d. Read the comment docs.

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

thanks for doing this!

@maxsmythe
Copy link
Contributor

I wonder if we should also be working to make it easier to verify that audit is healthy. Maybe Prometheus metrics listing # of audit errors for the last audit run? Could be separate work.

@ritazh
Copy link
Member Author

ritazh commented Jul 14, 2022

I wonder if we should also be working to make it easier to verify that audit is healthy. Maybe Prometheus metrics listing # of audit errors for the last audit run? Could be separate work.

I will open another issue/PR for this.

@ritazh ritazh merged commit 59e190f into open-policy-agent:master Jul 14, 2022
@ritazh ritazh deleted the fix-auditnserr branch July 14, 2022 00:26
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Jul 19, 2022
…date (open-policy-agent#2162)

fix: make audit more fault tolerant, log error instead of skipping status update

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
davis-haba pushed a commit to davis-haba/gatekeeper that referenced this pull request Jul 19, 2022
…date (open-policy-agent#2162)

fix: make audit more fault tolerant, log error instead of skipping status update

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
Signed-off-by: davis-haba <davishaba@google.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.

Audit Error & Missing Violations
4 participants