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

[FIX] [HEALTH CHECK] Run template and fields checks depends on the app configuration #3783

Merged
merged 3 commits into from
Jan 11, 2022

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Jan 4, 2022

Description

This PR runs the checks related to the alerts index pattern if these are enabled in the app configuration. Add some messages to display when the check is disabled to be skipped or perform some tasks.

The checks when are disabled (value: false in the app configuration):

  • checks.pattern: Some actions run.
  • checks.template: it is skipped
  • checks.fields: it is skipped

When the checks are disabled, it appears a message for each one of them.
image

Changes

  • The check of template and index pattern known fields now depends on the app configuration (checks.template and checks.fields).
  • Added messages for when the checks.pattern, checks.template and checks.fields are disabled.
  • Fixed typo related to the know fields
  • Added checks.fields to the default app configuration file

Tests

  • Tests with the next cases deleting all cookies and localstorage data. When a check is disabled, it should display some message about this to skip the check or run some tasks.
    • All checks related to the alerts index pattern enabled:
      checks.pattern: true
      checks.template: true
      checks.fields: true
      
    • Disabled template check:
      checks.pattern: true
      checks.template: false
      checks.fields: true
      
    • Disabled fields check:
      checks.pattern: true
      checks.template: true
      checks.fields: false
      
    • Disabled template and fields checks:
      checks.pattern: true
      checks.template: false
      checks.fields: false
      
    • Disabled all checks:
      checks.pattern: false
      checks.template: false
      checks.fields: false
      

Closes #3765

…when these are enabled in the app configuration

  - Created a decorator to wrpas the same logic to apply to the `tempalte` and `fields` checks
  - Fixed a bug comparing the `checks.patterns` value to run some actions
  - Added message to display the `template` and `fields` chacks are skipped when are disabled
  - Added message to display that some minimal tasks will be done when the `checks.patterns` is disabled
@Desvelao Desvelao added type/bug Bug issue 4.3 labels Jan 4, 2022
@Desvelao Desvelao requested a review from a team January 4, 2022 17:16
@Desvelao Desvelao self-assigned this Jan 4, 2022
Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test: ✔️
CR: ✔️
LGTM

image

@Desvelao Desvelao merged commit 84a1cd3 into 4.3-7.10-RC2 Jan 11, 2022
@Desvelao Desvelao deleted the fix/3765-run-check-template-fields branch January 11, 2022 16:38
@AlexRuiz7 AlexRuiz7 linked an issue Mar 2, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
2 participants