fix(scorecard): Handle custom thresholds from scorecard backend#3293
fix(scorecard): Handle custom thresholds from scorecard backend#3293dzemanov wants to merge 11 commits into
Conversation
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Changed Packages
|
Review Summary by QodoCentralize custom threshold handling in scorecard backend
WalkthroughsDescription• Centralize custom threshold handling in scorecard backend module • Remove threshold parameter from individual metric provider constructors • Implement ThresholdResolver to manage provider and entity-level thresholds • Reorder OpenSSF default thresholds to start with success status • Enable threshold configuration for filecheck, openssf, and dependabot providers Diagramflowchart LR
A["Metric Providers"] -->|"getMetricThresholds"| B["Provider Defaults"]
C["app-config.yaml"] -->|"scorecard.plugins.*.thresholds"| D["ThresholdResolver"]
E["Entity Annotations"] -->|"scorecard.io/*.thresholds"| D
D -->|"resolveProviderThresholds"| F["Configured Thresholds"]
D -->|"resolveEntityThresholds"| G["Merged Thresholds"]
F --> H["CatalogMetricService"]
G --> H
File Changes1. workspaces/scorecard/plugins/scorecard-backend/src/threshold/ThresholdResolver.ts
|
ReviewFindingsMedium
Low
Info
Previous runReviewFindingsMedium
Low
Info
Previous run (2)ReviewFindingsMedium
Low
Info
Previous run (3)ReviewFindingsLow
Info
Previous run (4)ReviewFindingsLow
Info
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3293 +/- ##
=======================================
Coverage 53.92% 53.92%
=======================================
Files 2379 2380 +1
Lines 86125 86134 +9
Branches 23915 23911 -4
=======================================
+ Hits 46441 46449 +8
- Misses 38175 38176 +1
Partials 1509 1509
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
| ], | ||
| }); | ||
| }); | ||
|
|
There was a problem hiding this comment.
[low] test-inadequate
Typo in test fixture: github.other_netric should be github.other_metric. Does not affect test correctness but could cause confusion.
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
Signed-off-by: Dominika Zemanovicova <dzemanov@redhat.com>
|



Hey, I just made a Pull Request!
Fixes
Fixes https://redhat.atlassian.net/browse/RHDHBUGS-3203
How to test
For example:
scorecard.io/jira.open_issues.thresholds.rules.success: '<<32'in jira card.app-config.yamlappear on startup.✔️ Checklist