-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(hosterrorscache): dup log spam for permanent errs #6697
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(hosterrorscache): dup log spam for permanent errs #6697
Conversation
The "Skipped X from target list as found unresponsive permanently" message was logged on every `(*Cache).Check()` call for hosts with permanent errors, resulting in thousands of duplicate log entries in verbose mode. Wrap the log statement in `sync.Once` to match the behavior already used for non-permanent error logging. Signed-off-by: Dwi Siswanto <[email protected]>
Signed-off-by: Dwi Siswanto <[email protected]>
WalkthroughThe changes fix excessive logging on unresponsive hosts in verbose mode by introducing a new IsPermanentErr method to the host errors cache interface and updating logging behavior to report permanent errors only once at Info level. Additionally, colorization is removed from execution error logs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (3)**/*.go📄 CodeRabbit inference engine (CLAUDE.md)
Files:
pkg/protocols/**/*.go📄 CodeRabbit inference engine (CLAUDE.md)
Files:
pkg/core/**/*.go📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)pkg/protocols/common/hosterrorscache/hosterrorscache.go (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
Comment |
Proposed changes
fix(hosterrorscache): dup log spam for permanent errs
The "Skipped X from target list as found
unresponsive permanently" message was logged on
every
(*Cache).Check()call for hosts withpermanent errors, resulting in thousands of
duplicate log entries in verbose mode.
Wrap the log statement in
sync.Onceto match thebehavior already used for non-permanent error
logging.
Fixes #6416.
Checklist
Summary by CodeRabbit
Bug Fixes
New Features
✏️ Tip: You can customize this high-level summary in your review settings.