Skip to content

[ML] Skip invalid modules when data recognizer lists matches - #33703

Merged
peteharverson merged 2 commits into
elastic:masterfrom
peteharverson:ml-data-recognizer-skip-errors
Mar 22, 2019
Merged

peteharverson merged 2 commits into
elastic:masterfrom
peteharverson:ml-data-recognizer-skip-errors

Conversation

@peteharverson

@peteharverson peteharverson commented Mar 22, 2019 •

Copy link
Copy Markdown
Contributor

Summary

If the data recognizer encounters an error when checking each of the available modules under x-pack/plugins/ml/server/models/data_recognizer/modules, the folder is now ignored and processing moves to the next folder. Before the check would fail, with an HTTP 500 server error, and no matching modules would be displayed in the job wizard or data visualizer.

A warning message is now logged in the Kibana server console if an error is encountered, for example if:

  • there is no manifest.json file in the module folder
  • the manifest.json is not valid JSON
  • the elasticsearch query defined in the manifest.json file fails

In the second step of the wizard, after selecting the module to load, if an error occurs in any of the steps (loading jobs, loading datafeeds, loading saved objects), an error is logged on the server, and that specific configuration is ignored. Note a future enhancement would be to propagate details of the step that failed through to the client.

Also added error handling to the step which sets up the module in the Create Job wizard, so that a toast notification is displayed if an error occurs saving the jobs and saved objects defined in the file.

Checklist

For maintainers

Fixes #33665

@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui

id: `${prefix}${job.id}`,
config: JSON.parse(jobConfig)
});
} catch (error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be useful to log out the actual error being caught somewhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, good point. I'll append the error to these log messages.

@alvarezmelissa87 alvarezmelissa87 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM ⚡️
Just left a small comment.

@walterra walterra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@peteharverson
peteharverson merged commit 5ff422d into elastic:master Mar 22, 2019
@peteharverson
peteharverson deleted the ml-data-recognizer-skip-errors branch March 22, 2019 16:45
peteharverson added a commit to peteharverson/kibana that referenced this pull request Mar 22, 2019
…#33703)

* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
peteharverson added a commit to peteharverson/kibana that referenced this pull request Mar 22, 2019
…#33703)

* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
peteharverson added a commit that referenced this pull request Mar 22, 2019
…#33720)

* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
peteharverson added a commit that referenced this pull request Mar 22, 2019
…#33721)

* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
joelgriffith pushed a commit that referenced this pull request Mar 27, 2019
* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
…#33703)

* [ML] Skip invalid modules when data recognizer lists matches

* [ML] Append error to data recognizer module load console logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants