Skip to content

[Security Solution] Fix PATCH rule API test failure in Serverless#202885

Merged
nikitaindik merged 1 commit intoelastic:mainfrom
nikitaindik:fix-patch-api-serverless-test
Dec 4, 2024
Merged

[Security Solution] Fix PATCH rule API test failure in Serverless#202885
nikitaindik merged 1 commit intoelastic:mainfrom
nikitaindik:fix-patch-api-serverless-test

Conversation

@nikitaindik
Copy link
Copy Markdown
Contributor

@nikitaindik nikitaindik commented Dec 4, 2024

Resolves: #202812

Summary

This PR fixes a problem in the MKI Serverless periodic pipeline that was introduced in #201825. The issue happened because the test tried to delete prebuilt rule assets stored in .kibana_security_solution, but you can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI environments.

@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 backport:version Backport to applied version labels v8.17.0 v8.18.0 v8.16.2 labels Dec 4, 2024
@nikitaindik nikitaindik requested a review from xcrzx December 4, 2024 10:05
@nikitaindik nikitaindik self-assigned this Dec 4, 2024
@nikitaindik nikitaindik requested a review from a team as a code owner December 4, 2024 10:05
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@xcrzx xcrzx left a comment

Choose a reason for hiding this comment

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

We've already discussed this change over Zoom, LGTM 👍

@xcrzx
Copy link
Copy Markdown
Contributor

xcrzx commented Dec 4, 2024

It should go in 8.16 after this backport is merged: #202751

@nikitaindik nikitaindik enabled auto-merge (squash) December 4, 2024 11:14
@nikitaindik nikitaindik merged commit 0e10dbf into elastic:main Dec 4, 2024
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

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

@elasticmachine
Copy link
Copy Markdown
Contributor

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.16 Backport failed because of merge conflicts
8.17 Backport failed because of merge conflicts
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 202885

Questions ?

Please refer to the Backport tool documentation

nikitaindik added a commit to nikitaindik/kibana that referenced this pull request Dec 4, 2024
…astic#202885)

**Resolves: elastic#202812

## Summary
This PR fixes a problem in the MKI Serverless periodic pipeline that was
introduced in elastic#201825. The issue happened because the test tried to
delete prebuilt rule assets stored in .kibana_security_solution, but you
can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI
environments.
nikitaindik added a commit to nikitaindik/kibana that referenced this pull request Dec 4, 2024
…astic#202885)

**Resolves: elastic#202812

## Summary
This PR fixes a problem in the MKI Serverless periodic pipeline that was
introduced in elastic#201825. The issue happened because the test tried to
delete prebuilt rule assets stored in .kibana_security_solution, but you
can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI
environments.
@nikitaindik
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
8.17
8.16

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

Questions ?

Please refer to the Backport tool documentation

nikitaindik added a commit to nikitaindik/kibana that referenced this pull request Dec 4, 2024
…astic#202885)

**Resolves: elastic#202812

## Summary
This PR fixes a problem in the MKI Serverless periodic pipeline that was
introduced in elastic#201825. The issue happened because the test tried to
delete prebuilt rule assets stored in .kibana_security_solution, but you
can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI
environments.

(cherry picked from commit 0e10dbf)

# Conflicts:
#	x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts
nikitaindik added a commit that referenced this pull request Dec 4, 2024
…ss (#202885) (#202939)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Fix PATCH rule API test failure in Serverless
(#202885)](#202885)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2024-12-04T13:53:41Z","message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea","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","backport:version","v8.17.0","v8.18.0","v8.16.2"],"number":202885,"url":"https://github.com/elastic/kibana/pull/202885","mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202885","number":202885,"mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},{"branch":"8.17","label":"v8.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
nikitaindik added a commit that referenced this pull request Dec 4, 2024
…ess (#202885) (#202941)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Security Solution] Fix PATCH rule API test failure in Serverless
(#202885)](#202885)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2024-12-04T13:53:41Z","message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea","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","backport:version","v8.17.0","v8.18.0","v8.16.2"],"number":202885,"url":"https://github.com/elastic/kibana/pull/202885","mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202885","number":202885,"mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},{"branch":"8.17","label":"v8.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
nikitaindik added a commit that referenced this pull request Dec 4, 2024
…ess (#202885) (#202942)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] Fix PATCH rule API test failure in Serverless
(#202885)](#202885)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2024-12-04T13:53:41Z","message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea","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","backport:version","v8.17.0","v8.18.0","v8.16.2"],"number":202885,"url":"https://github.com/elastic/kibana/pull/202885","mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202885","number":202885,"mergeCommit":{"message":"[Security
Solution] Fix PATCH rule API test failure in Serverless
(#202885)\n\n**Resolves:
https://github.com/elastic/kibana/issues/202812**\r\n\r\n##
Summary\r\nThis PR fixes a problem in the MKI Serverless periodic
pipeline that was\r\nintroduced in #201825. The issue happened because
the test tried to\r\ndelete prebuilt rule assets stored in
.kibana_security_solution, but you\r\ncan’t access this index in
Serverless MKI.\r\n\r\nThe fix makes sure this call only runs in
non-Serverless
MKI\r\nenvironments.","sha":"0e10dbfc8190c77ed684284a4b2dc53eada437ea"}},{"branch":"8.17","label":"v8.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
…astic#202885)

**Resolves: elastic#202812

## Summary
This PR fixes a problem in the MKI Serverless periodic pipeline that was
introduced in elastic#201825. The issue happened because the test tried to
delete prebuilt rule assets stored in .kibana_security_solution, but you
can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI
environments.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…astic#202885)

**Resolves: elastic#202812

## Summary
This PR fixes a problem in the MKI Serverless periodic pipeline that was
introduced in elastic#201825. The issue happened because the test tried to
delete prebuilt rule assets stored in .kibana_security_solution, but you
can’t access this index in Serverless MKI.

The fix makes sure this call only runs in non-Serverless MKI
environments.
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 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.16.2 v8.17.0 v8.18.0 v9.0.0

Projects

None yet

4 participants