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

[Logs UI] Interpret finished analysis jobs as healthy #45268

Conversation

weltenwort
Copy link
Member

Summary

This changes the job health check of the log analysis page to consider finished jobs as healthy. This situation is relevant when the job is non-continuous, i.e. created with a definite end date.

At the same time it ensures that datafeeds that failed to be started due to empty indices lead to the jobs being considered unhealthy.

fixes #45180

Testing

Scenario for a non-continuous job

  1. Navigate to the Analysis tab of the Logs UI.
  2. Create a job with a non-"indefinite" end date.
  3. Wait until the job has stopped normally due to having processes all data. This can be checked in the ML UI.
  4. Reload the Analysis page in the Logs UI.
  5. Check that the result screen is shown.

Scenario for failed datafeed start

  1. Create an index with a correct filebeat mapping, but that is empty (e.g. filebeat-8.0.0-empty with standard index templates).
  2. Configure a source such that it only uses that index.
  3. Attempt to set up the analysis jobs for the "empty" source via the Analysis tab.
  4. Check that the setup fails.
  5. Reload the Analysis page in the Logs UI.
  6. Check that the setup screen is shown.

Checklist

@weltenwort weltenwort added bug Fixes for quality problems that affect the customer experience v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0 v7.5.0 labels Sep 10, 2019
@weltenwort weltenwort self-assigned this Sep 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui

@Kerry350 Kerry350 self-requested a review September 10, 2019 16:23
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@weltenwort weltenwort marked this pull request as ready for review September 10, 2019 18:17
@weltenwort weltenwort requested a review from a team as a code owner September 10, 2019 18:17
Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Looks good, nice work 👍 This fixes the scenarios listed. I've left a comment regarding one of the states, but it's not critical.

setJobStatus(getInitialJobStatuses());
setJobStatus(currentJobStatus => ({
...currentJobStatus,
'log-entry-rate': 'initializing',
Copy link
Contributor

Choose a reason for hiding this comment

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

The only part I'm not sure about is this, and it's maybe not a big problem overall. We use jobSummary.jobState === 'opening' to determine a jobStatus state of initializing, my understanding is this would be when everything has been created successfully my ML, but is still opening up. But here we're setting that in the createPromise of setupMlModule when things haven't been created yet. Maybe unknown would be a better state at this point?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we look at the JobStatus as an indicator of the current stage of the (abstract) job/datafeed lifecycle, wouldn't unknown be incorrect? We know the state of the job, which is that it's being created but not running yet. Do you think we need to differentiate that more or that there is a risk in decoupling our abstract job state too much from the technical ML job state?

Copy link
Contributor

Choose a reason for hiding this comment

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

We know the state of the job, which is that it's being created but not running yet.

Okay, put like that it makes sense 👍 No, lets not add another state if it's not needed. Thanks for the explanation.

@weltenwort weltenwort added the release_note:skip Skip the PR/issue when compiling release notes label Sep 11, 2019
@weltenwort weltenwort merged commit 7202f51 into elastic:master Sep 11, 2019
@weltenwort weltenwort deleted the logs-ui-analysis-detect-finished-jobs-as-healthy branch September 11, 2019 11:13
weltenwort added a commit to weltenwort/kibana that referenced this pull request Sep 11, 2019
This changes the job health check of the log analysis page to consider finished jobs as healthy. This situation is relevant when the job is non-continuous, i.e. created with a definite end date.

At the same time it ensures that datafeeds that failed to be started due to empty indices lead to the jobs being considered unhealthy.

fixes elastic#45180
weltenwort added a commit to weltenwort/kibana that referenced this pull request Sep 11, 2019
This changes the job health check of the log analysis page to consider finished jobs as healthy. This situation is relevant when the job is non-continuous, i.e. created with a definite end date.

At the same time it ensures that datafeeds that failed to be started due to empty indices lead to the jobs being considered unhealthy.

fixes elastic#45180
weltenwort added a commit that referenced this pull request Sep 11, 2019
Backports the following commits to 7.x:
 - [Logs UI] Interpret finished analysis jobs as healthy (#45268)
weltenwort added a commit that referenced this pull request Sep 11, 2019
Backports the following commits to 7.4:
 - [Logs UI] Interpret finished analysis jobs as healthy (#45268)
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 11, 2019
…-to-np-ready

* 'master' of github.com:elastic/kibana: (25 commits)
  [ML] Fixes display of matching modules in index data visualizer (elastic#45261)
  [Console] Update indentation behaviour (elastic#45249)
  Convert value provided to PhraseValueInput to string to catch Exception (elastic#45259)
  [Region Map] Fix loading default vector map and base layer setting (elastic#43858)
  [ML] Fixing empty time range when cloning jobs (elastic#45286)
  [ML] Fixing wizard validation delay (elastic#45265)
  [Logs UI] Interpret finished analysis jobs as healthy (elastic#45268)
  [Console] SQL template with triple quote in completion (elastic#45248)
  [ML] Data Frames: Cards as links (elastic#45254)
  fix(code/frontend): should show updating instead of cloning when updating (elastic#45238)
  fix(code/frontend): fix document search result from (elastic#45236)
  disable another flaky suite (elastic#45323) (elastic#45330)
  disable flaky suite (elastic#45105)
  skip flaky suite (elastic#43069)
  skip flaky suite (elastic#45089)
  disable jest suite that has no enabled tests (elastic#44250)
  disable flaky test (elastic#45317)
  disable flaky test (elastic#45315)
  [DOCS] Creates developer folder (elastic#45280)
  [SIEM] Changes ML conditional links to use tabs, fixes a small bug with null filterQuery   (elastic#45218)
  ...
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 11, 2019
…ditor

* 'master' of github.com:elastic/kibana: (76 commits)
  Upgrade EUI to 13.8.1 (elastic#45052)
  [ML] Add multi metric job wizard test (elastic#45279)
  [SIEM] Inject/apply KQL changed in refresh button (elastic#45065)
  [Graph] Type persistence (elastic#44985)
  Functional tests: convert more test/services to TS (elastic#45176)
  [ML] Fixes display of matching modules in index data visualizer (elastic#45261)
  [Console] Update indentation behaviour (elastic#45249)
  Convert value provided to PhraseValueInput to string to catch Exception (elastic#45259)
  [Region Map] Fix loading default vector map and base layer setting (elastic#43858)
  [ML] Fixing empty time range when cloning jobs (elastic#45286)
  [ML] Fixing wizard validation delay (elastic#45265)
  [Logs UI] Interpret finished analysis jobs as healthy (elastic#45268)
  [Console] SQL template with triple quote in completion (elastic#45248)
  [ML] Data Frames: Cards as links (elastic#45254)
  fix(code/frontend): should show updating instead of cloning when updating (elastic#45238)
  fix(code/frontend): fix document search result from (elastic#45236)
  disable another flaky suite (elastic#45323) (elastic#45330)
  disable flaky suite (elastic#45105)
  skip flaky suite (elastic#43069)
  skip flaky suite (elastic#45089)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Logs UI Logs UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0 v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs UI] finished log analysis ML jobs are detected as unhealthy
3 participants