Add support for iterating all projects in gitlab:praefect:replicas task

What does this MR do and why?

This change enhances the gitlab:praefect:replicas Rake task to iterate over all projects when no project ID is provided, similar to the pattern used in the gitlab:git:fsck task.

Previously, the task required a project_id argument and would only check that specific project. Now:

  • When a project_id argument is provided, the task behaves as before, checking only that specific project
  • When no project_id argument is provided, the task iterates through all projects and displays replica checksums for each

This allows administrators to check replicas for all projects without having to run the task individually for each project.

How to set up and validate locally

  1. Check replicas for a specific project:

    gitlab-rake "gitlab:praefect:replicas[1]"

    Expectation: Only project 1's replicas will be checked.

  2. Check replicas for all projects:

    gitlab-rake gitlab:praefect:replicas

    Expectation: All projects' replicas will be checked and displayed.

Merge request reports

Loading