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

[ML] Error when trying to start ML job with bucket span 1w #68533

Closed
bwesely opened this issue Jun 8, 2020 · 2 comments · Fixed by #69671
Closed

[ML] Error when trying to start ML job with bucket span 1w #68533

bwesely opened this issue Jun 8, 2020 · 2 comments · Fixed by #69671
Assignees
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml v7.9.0

Comments

@bwesely
Copy link

bwesely commented Jun 8, 2020

Kibana version:
7.7.0

Elasticsearch version:
7.7.0

Server OS version:
Docker Desktop on macOS

Browser version:
Chrome Version 80.0.3987.163 (Official Build) (64-bit)

Browser OS version:
Version 80.0.3987.163 (Official Build) (64-bit)

Original install method (e.g. download page, yum, from source, etc.):
Official Docker image

Description of the problem including expected versus actual behavior:
Creating a Machine Learning job with Bucket Span: 1w fails with an error
When entering 1d, 2d,... 7d is working as expected.

Steps to reproduce:

  1. Create Anomaly Job with sum(field) over a couple of years
  2. Set Bucket Span to 1w
  3. Continue to Validation Step
  4. Error is shown

Errors in browser console (if relevant):

Error: Job Validation Error: Bad Request
    at Object.errorNotify [as error] (http://localhost:5601/bundles/plugin/ml/1.plugin.js:1:1602697)
    at http://localhost:5601/bundles/plugin/ml/1.plugin.js:1:33434

Provide logs and/or server output (if relevant):

@peteharverson peteharverson changed the title Error when trying to start ML job with bucket span 1w [ML] Error when trying to start ML job with bucket span 1w Jun 8, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson peteharverson added bug Fixes for quality problems that affect the customer experience enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Jun 8, 2020
@peteharverson
Copy link
Contributor

Week units w are not valid for bucket spans - we only support s, m, h and d, plus ms if it is an exact multiple of 1000. This is core Elasticsearch functionality for time durations - see https://github.com/elastic/elasticsearch/blob/e9bc3e8234b4f1a3785101481a46e01541f8fdaf/libs/core/src/main/java/org/elasticsearch/common/unit/TimeValue.java#L357-L387.

However the validation used in the job wizards is currently allowing w, M and y to be used in the bucket span input. This should be changed to prevent units other than s, m, h and d (plus ms if a multiple of 1000).

image

Note on master the following error is displayed if entering 1w for the bucket span. But the user is allowed to continue to the next step of the wizard, with the error shown in the toast notification not making it clear that w is not a valid time interval unit.

image

The solution here should be to fix the client-side validation to prevent w, M and y as bucket span units.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml v7.9.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants