Add rake gitlab:git:checksum_projects
What does this MR do?
Adds rake gitlab:git:checksum_projects
. A customer used something like this to verify Geo's repository replication.
Further info
One Git repository can be compared to another by checksumming all refs of each repository. If both repositories have the same refs, and if both repositories pass an integrity check, then we can be confident that both repositories are the same.
For example, this can be used to compare a backup of a repository against the source repository.
Examples
For all projects, where:
- Project with ID#2 doesn't exist
- Project with ID#4 does not have a repository
- Project with ID#5 has an empty repository
$ bin/rake gitlab:git:checksum_projects
1,cfa3f06ba235c13df0bb28e079bcea62c5848af2
3,3f3fb58a8106230e3a6c6b48adc2712fb3b6ef87
4,
5,0000000000000000000000000000000000000000
6,6c6b48adc2712fb3b6ef87cfa3f06ba235c13df0
For specific projects, where:
- Project with ID#2 doesn't exist
- Project with ID#4 does not have a repository
- Project with ID#5 has an empty repository
$ CHECKSUM_PROJECT_IDS="1,2,3,4,5" bin/rake gitlab:git:checksum_projects
1,cfa3f06ba235c13df0bb28e079bcea62c5848af2
3,3f3fb58a8106230e3a6c6b48adc2712fb3b6ef87
4,
5,0000000000000000000000000000000000000000
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Closes #297548 (closed)
Edited by Fabian Zimmer