-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
2
-
False
-
-
False
-
-
-
RHDH Plugins 3287, RHDH Plugins 3288
This task should implement the backend infrastructure needed to support file-level compliance checks in Scorecard. The goal is to allow platform engineers to configure a list of files (such as `CODEOWNERS`, `LICENSE`, or `Dockerfile`) and have Scorecard automatically verify whether those files exist in each repository it monitors.
The current Scorecard architecture supports single-metric providers, where each provider calculates exactly one metric per entity. However, for file checks, this approach would be inefficient, since checking 5 different files would require 5 separate API calls to GitHub per repository. To solve this, we need to introduce a "batch provider" pattern that allows a single provider to expose multiple metrics and calculate them all in one efficient API call.
This task involves extending the `MetricProvider` interface with three optional methods (`getMetricIds()`, `getMetrics()`, and `calculateMetrics()`) that enable batch behavior while maintaining backward compatibility with existing single-metric providers. The `MetricProvidersRegistry` must be updated to register one provider instance under multiple metric IDs and properly deduplicate when listing metrics. The `PullMetricsByProviderTask` scheduler must detect batch providers and handle their multi-value results appropriately.
On the GitHub module side, a new class will implement this batch pattern. It reads file paths from configuration, checks the file existence, and returns a map of results.
- incorporates
-
RHIDP-8667 File missing integration for the scorecard backend plugin
-
- Closed
-