-
Notifications
You must be signed in to change notification settings - Fork 776
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
fix: fixing panic in debug log #3244
Conversation
Signed-off-by: Jaydip Gabani <[email protected]>
@maxsmythe @sozercan lets get this in before the actual release. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! LGTM
Signed-off-by: Jaydip Gabani <[email protected]> (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())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JaydipGabani Good catch!
Can you please scan this file for other occurrences of this?
https://github.com/open-policy-agent/gatekeeper/pull/3244/files#diff-2a233457fc5c89cf0dd91c044d7582aa1cc0c835feabf4638882ac54ba3ca63aR528
Signed-off-by: Jaydip Gabani <[email protected]>
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: