• Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • 1.10.0
    • None
    • Scorecard
    • None
    • 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.

              rh-ee-djanicko Diana Janickova
              rh-ee-djanicko Diana Janickova
              RHDH Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: