Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
63664f9
feat(scorecard): add the ability to drill down into aggregated scorec…
PatAKnight Feb 18, 2026
7a7ae74
feat(scorecard): add tests for drill down functionality
PatAKnight Feb 18, 2026
7901fae
feat(scorecard): add docs for drill down functionality
PatAKnight Feb 18, 2026
64020c4
feat(scorecard): normalize owners returned from catalog
PatAKnight Feb 18, 2026
ebfda2f
feat(scorecard): ensure kind and owner are case insensitive
PatAKnight Feb 18, 2026
69a44c9
feat(scorecard): add changeset
PatAKnight Feb 18, 2026
63820e2
feat(scorecard): remove indexes from migration
PatAKnight Feb 18, 2026
6ac7806
feat(scorecard): update report.api.md
PatAKnight Feb 18, 2026
d5c6ae7
feat(scorecard): ensure we do not bypass catalog conditional permissions
PatAKnight Feb 18, 2026
844c14f
feat(scorecard): ensure we utilize users credentials for batch catalo…
PatAKnight Feb 18, 2026
56a6474
feat(scorecard): add input validation to the new endpoint
PatAKnight Feb 18, 2026
d530fc4
feat(scorecard): remove getAuthorizedEntityRefs as we are utilizing u…
PatAKnight Feb 19, 2026
71ac5b0
feat(scorecard): remove ownedByMe in favor of passing owner array as …
PatAKnight Feb 19, 2026
8083f2f
feat(scorecard): move entityName filtering to the database
PatAKnight Feb 19, 2026
9d3523a
feat(scorecard): move sorting down to the database layer
PatAKnight Feb 19, 2026
eb209d9
feat(scorecard): address sonarqube findings
PatAKnight Feb 19, 2026
a14730f
feat(scorecard): logger full error but throw generic error
PatAKnight Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions workspaces/scorecard/.changeset/sour-coins-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@red-hat-developer-hub/backstage-plugin-scorecard-backend': minor
'@red-hat-developer-hub/backstage-plugin-scorecard-common': minor
---

Adds the ability to drill down from aggregated scorecard KPIs to view the individual entities that contribute to the overall score. This enables managers and platform engineers to identify specific services impacting metrics and troubleshoot issues at the entity level.
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ type BuildMockDatabaseMetricValuesParams = {
latestEntityMetric?: DbMetricValue[];
countOfExpiredMetrics?: number;
aggregatedMetric?: DbAggregatedMetric;
entityMetricsByStatus?: { rows: DbMetricValue[]; total: number };
};

export const mockDatabaseMetricValues = {
createMetricValues: jest.fn(),
readLatestEntityMetricValues: jest.fn(),
cleanupExpiredMetrics: jest.fn(),
readAggregatedMetricByEntityRefs: jest.fn(),
readEntityMetricsByStatus: jest.fn(),
} as unknown as jest.Mocked<DatabaseMetricValues>;

export const buildMockDatabaseMetricValues = ({
metricValues,
latestEntityMetric,
countOfExpiredMetrics,
aggregatedMetric,
entityMetricsByStatus,
}: BuildMockDatabaseMetricValuesParams) => {
const createMetricValues = metricValues
? jest.fn().mockResolvedValue(metricValues)
Expand All @@ -53,10 +56,15 @@ export const buildMockDatabaseMetricValues = ({
? jest.fn().mockResolvedValue(aggregatedMetric)
: mockDatabaseMetricValues.readAggregatedMetricByEntityRefs;

const readEntityMetricsByStatus = entityMetricsByStatus
? jest.fn().mockResolvedValue(entityMetricsByStatus)
: mockDatabaseMetricValues.readEntityMetricsByStatus;

return {
createMetricValues,
readLatestEntityMetricValues,
cleanupExpiredMetrics,
readAggregatedMetricByEntityRefs,
readEntityMetricsByStatus,
} as unknown as jest.Mocked<DatabaseMetricValues>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ export const buildMockMetricProvidersRegistry = ({
return metricsList;
})
: jest.fn();
const getMetric = provider
? jest.fn().mockImplementation((_metricId: string) => {
return provider.getMetric(); // Returns the metric from the provider
})
: jest.fn();

return {
...mockMetricProvidersRegistry,
getProvider,
listMetrics,
getMetric,
} as unknown as jest.Mocked<MetricProvidersRegistry>;
};
Loading