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

[Rules] Check interval input box on Create ML anomaly detection errors out if user deletes interval input to enter a manual interval #190732

Closed
bhavyarm opened this issue Aug 19, 2024 · 2 comments · Fixed by #193420
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting/RulesManagement Issues related to the Rules Management UX good first issue low hanging fruit :ml Team:ML Team label for ML (also use :ml) v8.16.0

Comments

@bhavyarm
Copy link
Contributor

Kibana version: 8.15.0

Browser version: chrome latest

Original install method (e.g. download page, yum, from source, etc.): from elastic.co on cloud

Describe the bug: If user deletes the interval in "Check every" input box to manually enter the input on "Create ML anomaly detection" Kibana errors out on the panel with Error: Cannot read properties of null (reading 'asSeconds')

Steps to reproduce:

  1. Click on rule management->create->pick anomaly detection->select a pre-existing ML job
  2. In this panel, delete 1 in "Check every"
  3. Kibana displays error in the panel
Error

Error: Cannot read properties of null (reading 'asSeconds')
    at https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/plugin/ml/1.0.0/ml.chunk.14.js:3:17495
    at la (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:59279)
    at Za (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:69022)
    at Xa (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:68341)
    at ec (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:118584)
    at Pc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99978)
    at Nc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99800)
    at Dc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:99633)
    at wc (https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:96466)
    at https://ml.kb.us-west2.gcp.elastic-cloud.com/f5dc24d1969f/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:425:45201
Screenshot 2024-08-19 at 2 41 11 PM

Browser error:

core.entry.js:1 TypeError: Cannot read properties of null (reading 'asSeconds')
    at ml.chunk.14.js:3:17495
    at la (kbn-ui-shared-deps-npm.dll.js:425:59279)
    at Za (kbn-ui-shared-deps-npm.dll.js:425:69022)
    at Xa (kbn-ui-shared-deps-npm.dll.js:425:68341)
    at ec (kbn-ui-shared-deps-npm.dll.js:425:118584)
    at Pc (kbn-ui-shared-deps-npm.dll.js:425:99978)
    at Nc (kbn-ui-shared-deps-npm.dll.js:425:99800)
    at Dc (kbn-ui-shared-deps-npm.dll.js:425:99633)
    at wc (kbn-ui-shared-deps-npm.dll.js:425:96466)
    at kbn-ui-shared-deps-npm.dll.js:425:45201
Et @ core.entry.js:1Understand this error
@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesManagement Issues related to the Rules Management UX labels Aug 19, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@doakalexi doakalexi added :ml Team:ML Team label for ML (also use :ml) and removed Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Aug 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@peteharverson peteharverson added the good first issue low hanging fruit label Sep 19, 2024
rbrtj added a commit that referenced this issue Sep 23, 2024
…ion rule (#193420)

## Summary

It was trying to parse `null` values.
After:

![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)

Fixes [#190732](#190732)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 23, 2024
…ion rule (elastic#193420)

## Summary

It was trying to parse `null` values.
After:

![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)

Fixes [elastic#190732](elastic#190732)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 65b7bf9)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 23, 2024
…ion rule (elastic#193420)

## Summary

It was trying to parse `null` values.
After:

![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)

Fixes [elastic#190732](elastic#190732)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 65b7bf9)
kibanamachine added a commit that referenced this issue Sep 23, 2024
…detection rule (#193420) (#193731)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML][Rules] Fixes deletion in Check interval input for anomaly
detection rule (#193420)](#193420)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-23T14:27:01Z","message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Team:ML","backport:prev-major"],"title":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection
rule","number":193420,"url":"https://github.com/elastic/kibana/pull/193420","mergeCommit":{"message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193420","number":193420,"mergeCommit":{"message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed"}}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
kibanamachine added a commit that referenced this issue Sep 23, 2024
… detection rule (#193420) (#193730)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[ML][Rules] Fixes deletion in Check interval input for anomaly
detection rule (#193420)](#193420)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-23T14:27:01Z","message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","v9.0.0","Team:ML","backport:prev-major"],"title":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection
rule","number":193420,"url":"https://github.com/elastic/kibana/pull/193420","mergeCommit":{"message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193420","number":193420,"mergeCommit":{"message":"[ML][Rules]
Fixes deletion in Check interval input for anomaly detection rule
(#193420)\n\n## Summary\r\n\r\nIt was trying to parse `null`
values.\r\nAfter:\r\n\r\n![image](https://github.com/user-attachments/assets/82d24663-a895-4ad4-bc01-fb76b883bc66)\r\n\r\nFixes
[#190732](https://github.com/elastic/kibana/issues/190732)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"65b7bf9586480b522393905ff21324f473ee90ed"}}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
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:Alerting/RulesManagement Issues related to the Rules Management UX good first issue low hanging fruit :ml Team:ML Team label for ML (also use :ml) v8.16.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants