Change the log message "Skipping cache lookup" from Ansible operator to debug level#4511
Conversation
| } | ||
|
|
||
| if c.skipCacheLookup(r, k, req) { | ||
| log.Info("Skipping cache lookup", "resource", r) |
There was a problem hiding this comment.
imo we should not remove the log. We need to change its level.
There was a problem hiding this comment.
I tried but seems log does not support debug level. Only Info and Error
There was a problem hiding this comment.
You can add debug logging like
log.V(1).Info("Skipping cache lookup", "resource", r)That 1 indicates a log message that only gets logged when a development logger is used.
There was a problem hiding this comment.
Thanks. I have put to V(2) to align with other lines in the same function. If 1 is really you want. I can make the change again.
There was a problem hiding this comment.
I think 2 is ok, although there is a mix of 1's and 2's that should probably be made 1's (helm-operator only uses 1's).
|
/ok-to-test |
|
@estroz thanks for getting this approved promptly |
|
/retest |
|
@kandaaaaa these lines are failing in ansible e2e. Debug logging needs to be enabled by passing var _ = BeforeSuite(func() {
...
By("copying sample to a temporary e2e directory")
Expect(exec.Command("cp", "-r", "../../../testdata/ansible/memcached-operator", tc.Dir).Run()).To(Succeed())
By("enabling debug logging in the manager")
err = testutils.ReplaceInFile(filepath.Join(tc.Dir, "config", "manager", "manager.yaml"),
`- "--leader-election-id=memcached-operator"`,
"- --leader-election-id=memcached-operator\n - --zap-devel")
Expect(err).NotTo(HaveOccurred())
...
} |
|
New changes are detected. LGTM label has been removed. |
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
|
@estroz @camilamacedo86 Fixed the failed test case and update the changelog. Please review again. Thanks |
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
Signed-off-by: Kanda Zhang <kanda.zhang@ibm.com>
|
@kandaaaaa there's a broken link that is not the result of your changes. I'll fix it in a separate PR then merge this one. |
|
@estroz thanks |
|
/retest |
Description of the change:
When we have too many resources to watch, this log message flushing the log and provides no value to us. We lower the log level
If you disagree, please suggest a different way to change
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs