-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Anomaly Explorer: Hide top influencers panel for jobs without influencers #192987
Conversation
/ci |
Pinging @elastic/ml-ui (:ml) |
|
||
// Creates index pattern in the format expected by the kuery bar/kuery autocomplete provider | ||
// Field objects required fields: name, type, aggregatable, searchable | ||
export function getIndexPattern(influencers: string[]) { | ||
export function getIndexPattern(influencers: ExplorerJob[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was typed incorrectly, the arg passed here was always of type 'ExplorerJob[]' instead of just 'string[]'.
The IndexPattern
in ExplorerState
type expects a name as a string, but after mapping, it was always an object of type ExplorerJob
. I didn't notice any regressions after this change, but I would appreciate testing to ensure everything works correctly.
/ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM. Great to have the new functional test for this use case!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, just added a comment about a logging test in the functional tests.
await ml.anomaliesTable.assertAnomalyActionDiscoverButtonExists(0); | ||
await ml.anomaliesTable.ensureAnomalyActionDiscoverButtonClicked(0); | ||
}); | ||
await ml.testExecution.logTestStep('displays the influencers list'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should this say does not display the influencers list
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
updated
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @rbrtj |
@rbrtj - the PR has the v.8.16 label, yet it wasn't backported to 8.16 ( |
…fluencers (elastic#192987) # Summary Fix for [elastic#192679](elastic#192679) Hiding the top influencers panel when there are no influencers for the selected job. Added a functional test to ensure the panel is hidden. Expanded a few types to improve type safety. (cherry picked from commit 23b2595)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…out influencers (#192987) (#193568) # Backport This will backport the following commits from `main` to `8.x`: - [[ML] Anomaly Explorer: Hide top influencers panel for jobs without influencers (#192987)](#192987) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Robert Jaszczurek","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T12:06:29Z","message":"[ML] Anomaly Explorer: Hide top influencers panel for jobs without influencers (#192987)\n\n# Summary\r\n\r\nFix for [#192679](https://github.com/elastic/kibana/issues/192679)\r\nHiding the top influencers panel when there are no influencers for the\r\nselected job.\r\nAdded a functional test to ensure the panel is hidden.\r\nExpanded a few types to improve type safety.","sha":"23b2595be39401214a1ef9e39b684f917020b9ad","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","v9.0.0","Team:ML","backport:prev-minor","v8.16.0"],"title":"[ML] Anomaly Explorer: Hide top influencers panel for jobs without influencers","number":192987,"url":"https://github.com/elastic/kibana/pull/192987","mergeCommit":{"message":"[ML] Anomaly Explorer: Hide top influencers panel for jobs without influencers (#192987)\n\n# Summary\r\n\r\nFix for [#192679](https://github.com/elastic/kibana/issues/192679)\r\nHiding the top influencers panel when there are no influencers for the\r\nselected job.\r\nAdded a functional test to ensure the panel is hidden.\r\nExpanded a few types to improve type safety.","sha":"23b2595be39401214a1ef9e39b684f917020b9ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192987","number":192987,"mergeCommit":{"message":"[ML] Anomaly Explorer: Hide top influencers panel for jobs without influencers (#192987)\n\n# Summary\r\n\r\nFix for [#192679](https://github.com/elastic/kibana/issues/192679)\r\nHiding the top influencers panel when there are no influencers for the\r\nselected job.\r\nAdded a functional test to ensure the panel is hidden.\r\nExpanded a few types to improve type safety.","sha":"23b2595be39401214a1ef9e39b684f917020b9ad"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Robert Jaszczurek <[email protected]>
Summary
Fix for #192679
Hiding the top influencers panel when there are no influencers for the selected job.
Added a functional test to ensure the panel is hidden.
Expanded a few types to improve type safety.