Skip to content

Fix issues with logging flag validations #1556

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

Closed
joelanford opened this issue Jan 8, 2025 · 0 comments · Fixed by #1599 or #1779
Closed

Fix issues with logging flag validations #1556

joelanford opened this issue Jan 8, 2025 · 0 comments · Fixed by #1599 or #1779
Assignees

Comments

@joelanford
Copy link
Member

Based on what I found trying to debug the previous sync failures, we need to search for setupLog.Error(nil, <errorString>) and make sure we instead use setupLog.Error(errors.New()). Using nil for the error results in no log line being written. In my case, it meant completely empty pod logs.

See https://github.com/search?q=repo%3Aoperator-framework%2Foperator-controller%20setupLog.Error(nil&type=code

@camilamacedo86 camilamacedo86 self-assigned this Jan 8, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Jan 10, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Jan 12, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 4, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 5, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 8, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 10, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 10, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 11, 2025
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 11, 2025
….) calls and fix found linter issues.

Fix: Prevent nil errors in setupLog.Error to ensure proper logging

Closes; operator-framework#1566
Closes: operator-framework#1556

Furthermore, it solves a similar scenario in the EventHandler code implementation found with the new custom linter check.
camilamacedo86 added a commit to camilamacedo86/operator-controller that referenced this issue Feb 11, 2025
….) calls and fix found linter issues.

Fix: Prevent nil errors in setupLog.Error to ensure proper logging

Closes; operator-framework#1566
Closes: operator-framework#1556

Furthermore, it solves a similar scenario in the EventHandler code implementation found with the new custom linter check.
github-merge-queue bot pushed a commit that referenced this issue Feb 11, 2025
….) calls and fix found linter issues. (#1599)

Fix: Prevent nil errors in setupLog.Error to ensure proper logging

Closes; #1566
Closes: #1556

Furthermore, it solves a similar scenario in the EventHandler code implementation found with the new custom linter check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment