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

[Security Solution] Display unavailable ML jobs #205483

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

nikitaindik
Copy link
Contributor

@nikitaindik nikitaindik commented Jan 3, 2025

Resolves: #202700

Summary

This PR resolves an issue where an ML job referenced by a rule does not appear in the Rule Details, Upgrade flyout, or Rule Editing pages if the job is missing or not yet created.

For example, if you had an ML rule with a single selected job and this job was not available, you would see a blank space instead of job name.

Screenshots

Rule Details: Before
Scherm­afbeelding 2025-01-03 om 13 20 32

Rule Details: After
Scherm­afbeelding 2025-01-03 om 13 20 05

Rule Edit: Before
Scherm­afbeelding 2025-01-03 om 13 21 21

Rule Edit: After
Scherm­afbeelding 2025-01-03 om 13 21 09

Upgrade flyout: Before
Scherm­afbeelding 2025-01-03 om 13 22 30

Upgrade flyout: After
Scherm­afbeelding 2025-01-03 om 13 21 55

Testing

You can test by removing an ML job referenced by a rule in http://localhost:<port>/kbn/app/ml/jobs.

@nikitaindik nikitaindik added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Details Security Solution Detection Rule Details page Feature:Rule Edit Security Solution Detection Rule Editing workflow backport:version Backport to applied version labels v8.18.0 labels Jan 3, 2025
@nikitaindik nikitaindik self-assigned this Jan 3, 2025
@nikitaindik nikitaindik marked this pull request as ready for review January 3, 2025 12:30
@nikitaindik nikitaindik requested review from a team as code owners January 3, 2025 12:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

LGTM @nikitaindik!

Pulled down and tested locally by removing some and all jobs from an ML rule and then updating both of them

@nikitaindik nikitaindik enabled auto-merge (squash) January 5, 2025 16:37
@banderror
Copy link
Contributor

@nikitaindik Please fill in custom fields

@banderror banderror removed the release_note:skip Skip the PR/issue when compiling release notes label Jan 6, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #107 / serverless observability UI Dataset Quality Dataset quality summary shows poor, degraded and good count as 0 and all dataset as healthy

The CI Stats report is too large to be displayed here, check out the CI build annotation for this information.

History

cc @nikitaindik

@nikitaindik nikitaindik added the release_note:skip Skip the PR/issue when compiling release notes label Jan 6, 2025
@nikitaindik nikitaindik merged commit e04b200 into elastic:main Jan 6, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12632565829

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 6, 2025
**Resolves: elastic#202700

## Summary
This PR resolves an issue where an ML job referenced by a rule does not
appear in the Rule Details, Upgrade flyout, or Rule Editing pages if the
job is missing or not yet created.

For example, if you had an ML rule with a single selected job and this
job was not available, you would see a blank space instead of job name.

## Screenshots
**Rule Details: Before**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 32"
src="https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682"
/>

**Rule Details: After**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 05"
src="https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b"
/>

**Rule Edit: Before**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 21"
src="https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4"
/>

**Rule Edit: After**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 09"
src="https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08"
/>

**Upgrade flyout: Before**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 22 30"
src="https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505"
/>

**Upgrade flyout: After**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 21 55"
src="https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70"
/>

## Testing
You can test by removing an ML job referenced by a rule in
`http://localhost:<port>/kbn/app/ml/jobs`.

(cherry picked from commit e04b200)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 6, 2025
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Display unavailable ML jobs
(#205483)](#205483)

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

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

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-06T12:33:10Z","message":"[Security
Solution] Display unavailable ML jobs (#205483)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202700**\n\n## Summary\nThis PR
resolves an issue where an ML job referenced by a rule does not\nappear
in the Rule Details, Upgrade flyout, or Rule Editing pages if the\njob
is missing or not yet created.\n\nFor example, if you had an ML rule
with a single selected job and this\njob was not available, you would
see a blank space instead of job name.\n\n## Screenshots\n**Rule
Details: Before**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
32\"\nsrc=\"https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682\"\n/>\n\n**Rule
Details: After**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
05\"\nsrc=\"https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b\"\n/>\n\n**Rule
Edit: Before**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
21\"\nsrc=\"https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4\"\n/>\n\n**Rule
Edit: After**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
09\"\nsrc=\"https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08\"\n/>\n\n**Upgrade
flyout: Before**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 22
30\"\nsrc=\"https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505\"\n/>\n\n**Upgrade
flyout: After**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 21
55\"\nsrc=\"https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70\"\n/>\n\n##
Testing\nYou can test by removing an ML job referenced by a rule
in\n`http://localhost:<port>/kbn/app/ml/jobs`.","sha":"e04b20018a441e679848e114df68ba688976c83c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection Rules","Feature:Rule
Creation","Feature:Rule Details","Feature:Rule
Edit","backport:version","v8.18.0"],"title":"[Security Solution] Display
unavailable ML
jobs","number":205483,"url":"https://github.com/elastic/kibana/pull/205483","mergeCommit":{"message":"[Security
Solution] Display unavailable ML jobs (#205483)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202700**\n\n## Summary\nThis PR
resolves an issue where an ML job referenced by a rule does not\nappear
in the Rule Details, Upgrade flyout, or Rule Editing pages if the\njob
is missing or not yet created.\n\nFor example, if you had an ML rule
with a single selected job and this\njob was not available, you would
see a blank space instead of job name.\n\n## Screenshots\n**Rule
Details: Before**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
32\"\nsrc=\"https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682\"\n/>\n\n**Rule
Details: After**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
05\"\nsrc=\"https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b\"\n/>\n\n**Rule
Edit: Before**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
21\"\nsrc=\"https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4\"\n/>\n\n**Rule
Edit: After**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
09\"\nsrc=\"https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08\"\n/>\n\n**Upgrade
flyout: Before**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 22
30\"\nsrc=\"https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505\"\n/>\n\n**Upgrade
flyout: After**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 21
55\"\nsrc=\"https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70\"\n/>\n\n##
Testing\nYou can test by removing an ML job referenced by a rule
in\n`http://localhost:<port>/kbn/app/ml/jobs`.","sha":"e04b20018a441e679848e114df68ba688976c83c"}},"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/205483","number":205483,"mergeCommit":{"message":"[Security
Solution] Display unavailable ML jobs (#205483)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202700**\n\n## Summary\nThis PR
resolves an issue where an ML job referenced by a rule does not\nappear
in the Rule Details, Upgrade flyout, or Rule Editing pages if the\njob
is missing or not yet created.\n\nFor example, if you had an ML rule
with a single selected job and this\njob was not available, you would
see a blank space instead of job name.\n\n## Screenshots\n**Rule
Details: Before**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
32\"\nsrc=\"https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682\"\n/>\n\n**Rule
Details: After**\n<img width=\"578\" alt=\"Scherm­afbeelding 2025-01-03
om 13 20
05\"\nsrc=\"https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b\"\n/>\n\n**Rule
Edit: Before**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
21\"\nsrc=\"https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4\"\n/>\n\n**Rule
Edit: After**\n<img width=\"427\" alt=\"Scherm­afbeelding 2025-01-03 om
13 21
09\"\nsrc=\"https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08\"\n/>\n\n**Upgrade
flyout: Before**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 22
30\"\nsrc=\"https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505\"\n/>\n\n**Upgrade
flyout: After**\n<img width=\"1066\" alt=\"Scherm­afbeelding 2025-01-03
om 13 21
55\"\nsrc=\"https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70\"\n/>\n\n##
Testing\nYou can test by removing an ML job referenced by a rule
in\n`http://localhost:<port>/kbn/app/ml/jobs`.","sha":"e04b20018a441e679848e114df68ba688976c83c"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Nikita Indik <[email protected]>
kowalczyk-krzysztof pushed a commit to kowalczyk-krzysztof/kibana that referenced this pull request Jan 7, 2025
**Resolves: elastic#202700

## Summary
This PR resolves an issue where an ML job referenced by a rule does not
appear in the Rule Details, Upgrade flyout, or Rule Editing pages if the
job is missing or not yet created.

For example, if you had an ML rule with a single selected job and this
job was not available, you would see a blank space instead of job name.

## Screenshots
**Rule Details: Before**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 32"
src="https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682"
/>

**Rule Details: After**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 05"
src="https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b"
/>

**Rule Edit: Before**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 21"
src="https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4"
/>

**Rule Edit: After**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 09"
src="https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08"
/>

**Upgrade flyout: Before**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 22 30"
src="https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505"
/>

**Upgrade flyout: After**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 21 55"
src="https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70"
/>

## Testing
You can test by removing an ML job referenced by a rule in
`http://localhost:<port>/kbn/app/ml/jobs`.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
**Resolves: elastic#202700

## Summary
This PR resolves an issue where an ML job referenced by a rule does not
appear in the Rule Details, Upgrade flyout, or Rule Editing pages if the
job is missing or not yet created.

For example, if you had an ML rule with a single selected job and this
job was not available, you would see a blank space instead of job name.

## Screenshots
**Rule Details: Before**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 32"
src="https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682"
/>

**Rule Details: After**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 05"
src="https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b"
/>

**Rule Edit: Before**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 21"
src="https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4"
/>

**Rule Edit: After**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 09"
src="https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08"
/>

**Upgrade flyout: Before**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 22 30"
src="https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505"
/>

**Upgrade flyout: After**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 21 55"
src="https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70"
/>

## Testing
You can test by removing an ML job referenced by a rule in
`http://localhost:<port>/kbn/app/ml/jobs`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Details Security Solution Detection Rule Details page Feature:Rule Edit Security Solution Detection Rule Editing workflow release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] ML jobs are missing on rule details/editing/update pages
6 participants