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] Fix PATCH rule API test failure in Serverless #202885

Merged

Conversation

nikitaindik
Copy link
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
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

Copy link
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
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
27 checks passed
@kibanamachine
Copy link
Contributor

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

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

@elasticmachine
Copy link
Contributor

@kibanamachine
Copy link
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
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":"[email protected]"},"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":"[email protected]"},"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":"[email protected]"},"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.
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 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