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: fixing panic in debug log #3244

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

JaydipGabani
Copy link
Contributor

@JaydipGabani JaydipGabani commented Jan 31, 2024

What this PR does / why we need it:
Debug log is causing panic due to odd number of key/value passed.

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 #

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 January 31, 2024 00:04
@JaydipGabani
Copy link
Contributor Author

@maxsmythe @sozercan lets get this in before the actual release.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef1ebff) 54.47% compared to head (ea7a9f9) 54.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3244      +/-   ##
==========================================
- Coverage   54.47%   54.45%   -0.02%     
==========================================
  Files         134      134              
  Lines       12329    12329              
==========================================
- Hits         6716     6714       -2     
- Misses       5119     5120       +1     
- Partials      494      495       +1     
Flag Coverage Δ
unittests 54.45% <100.00%> (-0.02%) ⬇️

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

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

Good catch! LGTM

@JaydipGabani JaydipGabani merged commit 88033b1 into open-policy-agent:master Jan 31, 2024
16 checks passed
@JaydipGabani JaydipGabani deleted the debug-panic branch January 31, 2024 04:52
JaydipGabani added a commit to JaydipGabani/gatekeeper that referenced this pull request Jan 31, 2024
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
(cherry picked from commit 88033b1)
@@ -515,7 +515,7 @@ func (am *Manager) auditFromCache(ctx context.Context) ([]Result, []error) {
}

if excluded {
am.log.V(logging.DebugLevel).Info("excluding object from audit from cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName())
am.log.V(logging.DebugLevel).Info(fmt.Sprintf("excluding object from audit from cache %v %s/%s", obj.GroupVersionKind().String(), obj.GetNamespace(), obj.GetName()))
Copy link
Member

Choose a reason for hiding this comment

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

leewoobin789 pushed a commit to softlee-io/gatekeeper that referenced this pull request Apr 1, 2024
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.

None yet

4 participants