Refactor Base Probe and introduce healh_check rake task
What does this MR do and why?
In this MR, we are introducing the cloud_connector:health_check Rake task that will reuse existing StatusCheck probes. We are going to extend existing probes, so they could collect additional information details that could be useful for debugging.
Also, this MR adds support for the probes to return multiple errors, and to use ActiveModel::Validations and callbacks
The Rake task executes all health check probes.
Usage
bundle exec rake 'cloud_connector:health_check[root,report.json]'
Report
[
{
"name": "license_probe",
"success": true,
"message": "Subscription can be synchronized.",
"details": [
],
"errors": [
]
},
{
"name": "host_probe",
"success": true,
"message": "localhost reachable.",
"details": [
],
"errors": [
]
},
{
"name": "host_probe",
"success": true,
"message": "cloud.gitlab.com reachable.",
"details": [
],
"errors": [
]
},
{
"name": "access_probe",
"success": true,
"message": "Subscription synchronized successfully.",
"details": [
],
"errors": [
]
},
{
"name": "end_to_end_probe",
"success": false,
"message": "Authentication with GitLab Cloud services failed: Failed to open TCP connection to ::1:5052 (Connection refused - connect(2) for \"::1\" port 5052)",
"details": [
],
"errors": [
]
}
]
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
