Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Healthcheck] Introduce the notion of Severity for checks #3536

Open
rbayet opened this issue Feb 19, 2025 · 1 comment
Open

[Healthcheck] Introduce the notion of Severity for checks #3536

rbayet opened this issue Feb 19, 2025 · 1 comment
Assignees
Labels

Comments

@rbayet
Copy link
Collaborator

rbayet commented Feb 19, 2025

The idea is to introduce the notion of severity for checks, going from lowest to highest :

  • notice (that will be used in the future for functional checks, like "you have not declared any optimizers")
  • minor / warning (for instance using extra primary shards when it's not needed)
  • major / error (for instance when an Hÿva compatibility module is not installed)
  • critical (replicas enabled when there is a single node in the Elasticsearch / OpenSearch Cluster)

The idea is to inject the severity in the constructor of the checks and passed on to the AbstractCheck class constructor where it will be store in a protected class variable.
If you want to rely on the existing \Magento\Framework\Notification\MessageInterface constants (SEVERITY_CRITICAL, SEVERITY_MAJOR, ...) which are int, the \Smile\ElasticsuiteCore\Api\Healthcheck\CheckInterface should then have two methods implemented in AbstractCheck :

  • getSeverity
  • getSeverityLabel (which will map the constant int to translated strings)

The severity label should be displayed in the grid after the status column when the check is in status "failed".
Keep the severity column empty for a check that is in status "passed".

The design of the labels should be similar to the status label but with the following color coding

  • notice : yellow or light blue color scheme
  • minor / warning : orange color scheme (sufficiently distinct from the notice if you're using yellow)
  • major : similar to the actual "grid-severity-major" for the time being
  • critical : similar to the actual "grid-severity-critical" for the time being

Feel free to hijack and contextualize those grid-severity-* pre-existing classes to the context of the healthcheck page (to avoid making side effects on other pages using those classes).

Also, please create two new classes named "grid-status-passed" and "grid-status-failed" for the status column (which is currently using grid-severity-major and grid-severity-notice)

  • grid-status-passed: identical green color scheme to the current grid-severity-notice
  • grid-status-failed: please re-use the white and black color scheme that we used for external indices on the indices list screen

Regards,

@rbayet
Copy link
Collaborator Author

rbayet commented Feb 19, 2025

Default injected severity for existing checks :

  • GhostIndicesCheck : minor / warning
  • HyvaCompatibilityCheck : major / error
  • PackageVersionsMismatchCheck : critical
  • PrimaryShardsConfigCheck : minor / warning
  • ReplicasConfigCheck : critical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants