fix(scorecard): entity calculation health on aggregation and drill-down APIs#2865
Conversation
Code Review by Qodo
1. Unvalidated health fields
|
Changed Packages
|
7a14682 to
fc38579
Compare
Review Summary by QodoExpose entity calculation health on aggregation and drill-down APIs
WalkthroughsDescription• Extended scorecard JSON contracts with entityHealth (drill-down) and entitiesConsidered / calculationErrorCount (aggregation) fields • Updated database layer to track metric calculation failures and entity counts separately from threshold status • Aligned homepage KPI subheader and drill-down warning icon with actual calculation health metrics • Improved E2E test reliability by using direct component navigation and entity slug-based lookups Diagramflowchart LR
DB["Database Layer<br/>calculation_error_count<br/>latest_entity_count"]
MAPPER["AggregatedMetricMapper<br/>entitiesConsidered<br/>calculationErrorCount"]
AGG["Aggregation API<br/>GET /aggregations/:id"]
DRILL["Drill-down API<br/>GET /entities"]
UI["UI Components<br/>Homepage Subheader<br/>Entities Table Warning"]
DB -->|DbAggregatedMetric| MAPPER
MAPPER -->|AggregatedMetric| AGG
MAPPER -->|AggregatedMetric| DRILL
AGG -->|result fields| UI
DRILL -->|entityHealth| UI
File Changes1. workspaces/scorecard/plugins/scorecard-backend/src/database/DatabaseMetricValues.ts
|
d828f3e to
5e8c8bc
Compare
69666b0 to
21e7a49
Compare
Eswaraiahsapram
left a comment
There was a problem hiding this comment.
Thanks @PatAKnight, Reviewed the frontend changes and tested locally. Looks good to me 🎉
Screen.Recording.2026-04-27.at.9.34.15.PM.mov
|
I have tested this locally. All primary logic functions as expected. Screen.Recording.2026-04-28.at.14.03.27.movHowever when all entities return a failed metric load the card didn't display a chart. We can address this issue within this PR, or we can create a separate bug ticket if that is preferred. Screen.Recording.2026-04-28.at.14.19.40.mov |
…wn APIs Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
…semantics Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
4dec0b4 to
db857a9
Compare
|
|
Tested locally, it works as it did before the conflict resolution. Thanks! |




Hey, I just made a Pull Request!
Problem: Drill-down always showed a warning; homepage totals did not reflect metric calculation failures vs entities in scope.
Approach: Extended existing scorecard JSON contracts with
entityHealth(drill-down) andentitiesConsidered/calculationErrorCount(aggregation); UI keys warning and subheader off those fields; sharedisMetricCalculationErrorhelper.Fixes: https://redhat.atlassian.net/browse/RHIDP-13128
Screenshots
✔️ Checklist