Add PROJECT_IDS to gitlab:git:fsck
What does this MR do and why?
This change modifies a GitLab maintenance task that checks the health of code repositories. Previously, the task would always check all repositories in the system. Now it has been enhanced to optionally check only specific repositories by providing a list of project IDs through an environment variable called PROJECT_IDS
.
If no specific projects are specified, it still checks all repositories as before. The task description was also updated to reflect that it can now check individual repositories rather than always checking all of them.
This should eliminate the need for manually running git fsck
(and identifying the on-disk directory for a project repository) obsolete in most cases.
References
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
-
Start the Rake task with the
FSCK_PROJECT_IDS
environment variable present:FSCK_PROJECT_IDS=1,3,7 gitlab-rake gitlab:git:fsck
Expectation: Only projects 1, 3, and 7s repositories will be checked.
-
Start the Rake task without the environment variable present:
gitlab-rake gitlab:git:fsck
Expectation: All repositories will be checked.
-
Start the Rake task with an empty
FSCK_PROJECT_IDS
environment variable present:FSCK_PROJECT_IDS= gitlab-rake gitlab:git:fsck
Expectation: All repositories will be checked.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.