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

refactor: loggers in webhook handlers #2786

Merged
merged 4 commits into from
May 30, 2023

Conversation

acpana
Copy link
Contributor

@acpana acpana commented May 22, 2023

Per a comment made on the stats PR:

#2686 (comment)

this patch primarily adds log objects on the webhook handlers.

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana requested a review from maxsmythe May 22, 2023 20:54
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.

Variable renaming makes this PR too verbose to review as-is.

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana requested a review from maxsmythe May 24, 2023 18:37
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, assuming the comment about needing to clobber am.log() in the audit manager gets addressed.

Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
@acpana acpana requested review from ritazh and sozercan May 30, 2023 21:06
@acpana
Copy link
Contributor Author

acpana commented May 30, 2023

hey @ritazh @sozercan this is just a couple of lines to add loggers as member fields for the webhooks; lmk what you think 🙏🏼

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.

Few nits, otherwise LGTM

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 4.76% and project coverage change: -0.08 ⚠️

Comparison is base (f198738) 52.90% compared to head (8a43cea) 52.82%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2786      +/-   ##
==========================================
- Coverage   52.90%   52.82%   -0.08%     
==========================================
  Files         132      132              
  Lines       11629    11631       +2     
==========================================
- Hits         6152     6144       -8     
- Misses       4999     5008       +9     
- Partials      478      479       +1     
Flag Coverage Δ
unittests 52.82% <4.76%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
pkg/webhook/mutation.go 24.65% <0.00%> (-0.86%) ⬇️
pkg/webhook/policy.go 36.04% <8.33%> (-0.49%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@acpana acpana merged commit b7230e0 into open-policy-agent:master May 30, 2023
Hy3n4 pushed a commit to Hy3n4/gatekeeper that referenced this pull request Jun 30, 2023
Signed-off-by: Alex Pana <8968914+acpana@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.

5 participants