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
[Security Solutions] Fix link to ML Job is wrong when searching within ML Job Settings UI #150881
Conversation
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
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.
@machadoum changes LGTM.
Interesting that this bug wasn't discovered earlier and useMLHref
didn't expose dependencies
array.
I found another occurrence as well which should be fixed most probably.
The only problem I see now is that linter doesn't help with dependencies so there is a chance that the problem will return in the new code. Maybe ML folks will be able to fix it somehow differently, for example use job id under the hood so we can be much more secure while using this hook.
1186767
to
ab0cfd1
Compare
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.
ML changes 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.
Looks good and the link works. I just left one minor comment.
) => { | ||
return ml && ml.locator | ||
? ml.locator!.useUrl(params) | ||
? ml.locator!.useUrl(params, undefined, dependencies) |
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.
We are already checking if ml.locator
isn't undefined
, the !
can be removed.
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @machadoum |
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.
LGMT!
…n ML Job Settings UI (elastic#150881) issue: elastic#150875 ## Summary Describe the bug: The link to an ML job is wrong when searching for a job. Steps to reproduce: 1. Open ML Job Settings UI 2. Type DNS in the search bar 3. Verify that the links have the wrong job Id. ### Before https://user-images.githubusercontent.com/1490444/218104808-94c93669-2de3-4fba-88c9-5f2b7ccaa391.mp4 ### After https://user-images.githubusercontent.com/1490444/218105267-b5aa118c-9d78-4648-9892-68afd5e2707f.mov (cherry picked from commit 2315285)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… within ML Job Settings UI (#150881) (#150999) # Backport This will backport the following commits from `main` to `8.7`: - [[Security Solutions] Fix link to ML Job is wrong when searching within ML Job Settings UI (#150881)](#150881) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Pablo Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2023-02-13T12:30:26Z","message":"[Security Solutions] Fix link to ML Job is wrong when searching within ML Job Settings UI (#150881)\n\nissue: #150875 Summary\r\nDescribe the bug:\r\nThe link to an ML job is wrong when searching for a job.\r\n\r\nSteps to reproduce:\r\n1. Open ML Job Settings UI\r\n2. Type DNS in the search bar\r\n3. Verify that the links have the wrong job Id.\r\n\r\n### Before\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218104808-94c93669-2de3-4fba-88c9-5f2b7ccaa391.mp4\r\n\r\n### After\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218105267-b5aa118c-9d78-4648-9892-68afd5e2707f.mov","sha":"2315285e37274d8aa724d517055a34272efbe3d7","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Threat Hunting","Team: SecuritySolution","Team:Threat Hunting:Explore","v8.7.0","v8.8.0"],"number":150881,"url":"#150881 Solutions] Fix link to ML Job is wrong when searching within ML Job Settings UI (#150881)\n\nissue: #150875 Summary\r\nDescribe the bug:\r\nThe link to an ML job is wrong when searching for a job.\r\n\r\nSteps to reproduce:\r\n1. Open ML Job Settings UI\r\n2. Type DNS in the search bar\r\n3. Verify that the links have the wrong job Id.\r\n\r\n### Before\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218104808-94c93669-2de3-4fba-88c9-5f2b7ccaa391.mp4\r\n\r\n### After\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218105267-b5aa118c-9d78-4648-9892-68afd5e2707f.mov","sha":"2315285e37274d8aa724d517055a34272efbe3d7"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"#150881 Solutions] Fix link to ML Job is wrong when searching within ML Job Settings UI (#150881)\n\nissue: #150875 Summary\r\nDescribe the bug:\r\nThe link to an ML job is wrong when searching for a job.\r\n\r\nSteps to reproduce:\r\n1. Open ML Job Settings UI\r\n2. Type DNS in the search bar\r\n3. Verify that the links have the wrong job Id.\r\n\r\n### Before\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218104808-94c93669-2de3-4fba-88c9-5f2b7ccaa391.mp4\r\n\r\n### After\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/1490444/218105267-b5aa118c-9d78-4648-9892-68afd5e2707f.mov","sha":"2315285e37274d8aa724d517055a34272efbe3d7"}}]}] BACKPORT--> Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
issue: #150875
Summary
Describe the bug:
The link to an ML job is wrong when searching for a job.
Steps to reproduce:
Before
Feb-10-2023.14-13-34.mp4
After
Feb-10-2023.14-34-56.mov