Skip to content

SystemCheck library for executing checks from a rake task

Gabriel Mazetto requested to merge 28080-system-checks into master

What does this MR do?

Implements proposed library in: gitlab-ce#28080 to be used in the rake gitlab:*:check tasks. This MR doesn't migrate all check as this will be done in future MRs. This MR doesn't implement tests for migrated checks, this will be done in future MRs.

Are there points in the code the reviewer needs to double check?

Make sure API makes sense and / or suggest improvements.

Verify if all checks behaves as previously (I've splitted the upload directory check into 3 different checks, and some used unless else pattern, which had to have the logic inverted).

I've done few executions to make sure things are still working as expected (also forced the display of all error messages to be sure they are working)

Why was this MR needed?

It's hard to test rake tasks and even hard to unit/test each check in the way they are written, in the middle of the Rake DSL.

This proposal will isolate checks in it's own objects and will organize the output in a way that is easy to refactor / improve.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Implements partially #28080 (moved)

cc @DouweM @rspeicher @smcgivern

Edited by Gabriel Mazetto

Merge request reports