refactor: move validate_metrics_value to utilities/monitoring#4987
refactor: move validate_metrics_value to utilities/monitoring#4987hmeir wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 58 minutes. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR refactors ChangesMetrics Validation Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4987 +/- ##
==========================================
- Coverage 98.67% 98.66% -0.02%
==========================================
Files 25 25
Lines 2487 2463 -24
==========================================
- Hits 2454 2430 -24
Misses 33 33
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/lgtm |
be0e98d to
b1c300f
Compare
Store cpu_arch as list in py_config for multi-arch runs. Fix schedulable_nodes to normalize cpu_arch to list and use 'in' membership check. Update cluster info log to handle list cpu_arch display. Signed-off-by: Harel Meir <hmeir@redhat.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Move validate_metrics_value from tests/observability/utils.py to utilities/monitoring.py for cross-directory reuse. Accept str|int expected_value (int 0 for absent metrics). Add unit tests. Update all observability callers to import from new location. Signed-off-by: Harel Meir <hmeir@redhat.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
b1c300f to
6598193
Compare
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5012. Overlapping filestests/observability/metrics/test_general_metrics.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4934. Overlapping filestests/conftest.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4954. Overlapping filesconftest.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #4985. Overlapping filestests/conftest.py |
|
/retest all Auto-triggered: Files in this PR were modified by merged PR #5086. Overlapping filesconftest.py |
What this PR does / why we need it:
Move
validate_metrics_valuefromtests/observability/utils.pytoutilities/monitoring.pyfor cross-directory reuse.Now accepts
str | intexpected_value (int 0 for absent metrics).Add unit tests. Update all observability callers.
Which issue(s) this PR fixes:
Special notes for reviewer:
Depends on PR #4972 (infra changes) — merge that first.
get_metrics_valuereturns int 0 when metric is absent vs str "0"when emitted with value 0.
expected_value=0(int) matches absent only.jira-ticket:
NONE
Summary by CodeRabbit
Refactor
Tests