fix: improve logging for rules with missing profileDataRequired#803
Conversation
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
📝 WalkthroughWalkthroughThe rule manager's soft-launch validation behavior for rules with declared ChangesSoft-launch validation logging behavior
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/rulemanager/rule_manager.go (1)
138-141:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate the function doc comment to match current log level behavior.
Line 141 still says this path emits an
ERROR, but the implementation now emitsDEBUG(Line 154). Please align the comment to avoid drift.Suggested doc fix
-// soft-launch validation: rules with profileDependency>0 but no -// profileDataRequired emit an ERROR log (not rejected in default soft mode). +// soft-launch validation: rules with profileDependency>0 but no +// profileDataRequired emit a DEBUG log (not rejected in default soft mode).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/rulemanager/rule_manager.go` around lines 138 - 141, Update the doc comment for recompileProjectionSpec to reflect the current logging behavior: change the statement that says the path emits an ERROR to state it emits a DEBUG log (since the implementation logs at DEBUG when rules have profileDependency > 0 but no profileDataRequired); mention RuleProjectionSpec and ContainerProfileCache to locate the function and note the soft-launch validation behavior remains the same.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@pkg/rulemanager/rule_manager.go`:
- Around line 138-141: Update the doc comment for recompileProjectionSpec to
reflect the current logging behavior: change the statement that says the path
emits an ERROR to state it emits a DEBUG log (since the implementation logs at
DEBUG when rules have profileDependency > 0 but no profileDataRequired); mention
RuleProjectionSpec and ContainerProfileCache to locate the function and note the
soft-launch validation behavior remains the same.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a673c9c3-1248-4587-96e7-dd499f41e1f1
📒 Files selected for processing (1)
pkg/rulemanager/rule_manager.go
Performance Benchmark ResultsNode-Agent Resource Usage
Dedup Effectiveness (AFTER only)
Event Counters
|
Summary by CodeRabbit