Skip to content

[ML] Fix Anomaly Detection wizard full time range chart blank with saved search containing runtime fields#95700

Merged
qn895 merged 4 commits intoelastic:masterfrom
qn895:fix-anomaly-wizard-runtime-saved-search
Mar 30, 2021
Merged

[ML] Fix Anomaly Detection wizard full time range chart blank with saved search containing runtime fields#95700
qn895 merged 4 commits intoelastic:masterfrom
qn895:fix-anomaly-wizard-runtime-saved-search

Conversation

@qn895
Copy link
Copy Markdown
Member

@qn895 qn895 commented Mar 29, 2021

Summary

Part of #77462. This PR fixes an issue with the Anomaly Detection wizard chart not showing correctly when picking a saved search that uses runtime fields. Steps to reproduce:

  1. Using Index Patterns editor, create a new runtime field
  2. Using Discover, create a new saved search that uses the runtime field in the query
  3. Create a new Anomaly Detection job using the saved search

Before
Screen Shot 2021-03-25 at 15 06 47

After
Screen Shot 2021-03-29 at 14 48 09

@qn895 qn895 mentioned this pull request Mar 29, 2021
12 tasks
@qn895 qn895 self-assigned this Mar 29, 2021
@qn895 qn895 marked this pull request as ready for review March 29, 2021 22:13
@qn895 qn895 requested a review from a team as a code owner March 29, 2021 22:13
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Copy Markdown
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

job.data_counts.earliest_record_timestamp,
job.data_counts.latest_record_timestamp,
intervalMs,
job.datafeed_config.runtime_mappings ?? undefined,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need for the ?? undefined check here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated here ec81073 (#95700)

Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 30, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 6.1MB 6.1MB +605.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @qn895

@qn895 qn895 merged commit a1bc9a5 into elastic:master Mar 30, 2021
@qn895 qn895 deleted the fix-anomaly-wizard-runtime-saved-search branch March 30, 2021 19:35
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 30, 2021
…ved search containing runtime fields (elastic#95700)

* [ML] Fix AD wizard full time range chart broken with saved search

* [ML] Update runtimeMappingsSchema to be its own thing for better reuse

* [ML] Remove undefined check
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

7.x / #95838

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Mar 30, 2021
…ved search containing runtime fields (#95700) (#95838)

* [ML] Fix AD wizard full time range chart broken with saved search

* [ML] Update runtimeMappingsSchema to be its own thing for better reuse

* [ML] Remove undefined check

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection :ml release_note:fix v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants