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] Migration of Alert Page controls for non-default Spaces. #200058

Merged

Conversation

logeekal
Copy link
Contributor

@logeekal logeekal commented Nov 13, 2024

Summary

Issue and workaround explain here : https://support.elastic.dev/knowledge/view/911a31c1

Recently, we created a PR to migrate the alert page filters controls to 8.16. Unfortunately, it does not do migration for non-default spaces so any users upgrading to 8.16 will face the issue where Alert page errors out as shown in below screenshot.

grafik

Desk Testing

  1. Checkout to v8.15 branch by running git checkout 8.15.
  2. Create a new space and go to that space.
  3. Go to the alert page and do some modifications to the page controls. This store v8.15 page controls in local storage.
    • You can, for example, delete one page control.
    • Change selected value for one page control.
    • Additionally, you can also add a custom control.
  4. Checkout main now and repeat the above steps.
  5. Your changes should be retained on the alert page and there should not be any error.

@logeekal logeekal requested review from a team as code owners November 13, 2024 17:20
@logeekal logeekal marked this pull request as draft November 13, 2024 17:25
@logeekal logeekal added Team:Threat Hunting:Investigations Security Solution Investigations Team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Nov 13, 2024
@logeekal logeekal marked this pull request as ready for review November 13, 2024 17:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@logeekal logeekal added the release_note:skip Skip the PR/issue when compiling release notes label Nov 13, 2024
Copy link
Contributor

@PhilippeOberti PhilippeOberti left a comment

Choose a reason for hiding this comment

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

tested following the steps in the description and I confirm while main has the alerts page broken, this branch works correctly! Awesome job @logeekal

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

@logeekal logeekal enabled auto-merge (squash) November 13, 2024 20:22
@logeekal logeekal merged commit b7ca722 into elastic:main Nov 13, 2024
51 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 13.4MB 13.4MB +211.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 86.2KB 86.2KB +8.0B

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
…Spaces. (elastic#200058)

## Summary

Recently, we created a PR to migrate the alert page filters controls to
`8.16`. Unfortunately, it does not do migration for non-default spaces
so any users upgrading to `8.16` will face the issue where Alert page
errors out as shown in below screenshot.

![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)

## Desk Testing

1. Checkout to `v8.15` branch by running `git checkout 8.15`.
2. Create a new space and go to that space.
3. Go to the alert page and do some modifications to the page controls.
This store `v8.15` page controls in local storage.
    - You can, for example, delete one page control.
    - Change selected value for one page control.
    - Additionally, you can also add a custom control.
4. Checkout `main` now and repeat the above steps.
5. Your changes should be retained on the alert page and there should
not be any error.

(cherry picked from commit b7ca722)
@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 Nov 13, 2024
…fault Spaces. (#200058) (#200093)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Migration of Alert Page controls for non-default
Spaces. (#200058)](#200058)

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

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

<!--BACKPORT [{"author":{"name":"Jatin
Kathuria","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T20:52:00Z","message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","backport:prev-minor"],"title":"[Security
Solution] Migration of Alert Page controls for non-default
Spaces.","number":200058,"url":"https://github.com/elastic/kibana/pull/200058","mergeCommit":{"message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200058","number":200058,"mergeCommit":{"message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90"}}]}]
BACKPORT-->

Co-authored-by: Jatin Kathuria <[email protected]>
@logeekal
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

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

Questions ?

Please refer to the Backport tool documentation

logeekal added a commit to logeekal/kibana that referenced this pull request Nov 13, 2024
…Spaces. (elastic#200058)

## Summary

Recently, we created a PR to migrate the alert page filters controls to
`8.16`. Unfortunately, it does not do migration for non-default spaces
so any users upgrading to `8.16` will face the issue where Alert page
errors out as shown in below screenshot.

![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)

## Desk Testing

1. Checkout to `v8.15` branch by running `git checkout 8.15`.
2. Create a new space and go to that space.
3. Go to the alert page and do some modifications to the page controls.
This store `v8.15` page controls in local storage.
    - You can, for example, delete one page control.
    - Change selected value for one page control.
    - Additionally, you can also add a custom control.
4. Checkout `main` now and repeat the above steps.
5. Your changes should be retained on the alert page and there should
not be any error.

(cherry picked from commit b7ca722)
logeekal added a commit that referenced this pull request Nov 14, 2024
…efault Spaces. (#200058) (#200104)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] Migration of Alert Page controls for non-default
Spaces. (#200058)](#200058)

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

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

<!--BACKPORT [{"author":{"name":"Jatin
Kathuria","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T20:52:00Z","message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat
Hunting:Investigations","backport:prev-minor","v8.17.0","v8.16.1"],"number":200058,"url":"https://github.com/elastic/kibana/pull/200058","mergeCommit":{"message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200058","number":200058,"mergeCommit":{"message":"[Security
Solution] Migration of Alert Page controls for non-default Spaces.
(#200058)\n\n## Summary\r\n\r\nRecently, we created a PR to migrate the
alert page filters controls to\r\n`8.16`. Unfortunately, it does not do
migration for non-default spaces\r\nso any users upgrading to `8.16`
will face the issue where Alert page\r\nerrors out as shown in below
screenshot.\r\n\r\n\r\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\r\n\r\n\r\n##
Desk Testing\r\n\r\n1. Checkout to `v8.15` branch by running `git
checkout 8.15`. \r\n2. Create a new space and go to that space.\r\n3. Go
to the alert page and do some modifications to the page
controls.\r\nThis store `v8.15` page controls in local storage.\r\n -
You can, for example, delete one page control.\r\n - Change selected
value for one page control.\r\n - Additionally, you can also add a
custom control.\r\n4. Checkout `main` now and repeat the above
steps.\r\n5. Your changes should be retained on the alert page and there
should\r\nnot be any
error.","sha":"b7ca7228315393c6672f638982dbac5196c9ad90"}},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/200093","number":200093,"state":"MERGED","mergeCommit":{"sha":"255086dc66b19be0f879f5797660f3ddf1339d93","message":"[8.x]
[Security Solution] Migration of Alert Page controls for non-default
Spaces. (#200058) (#200093)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.x`:\n- [[Security Solution]
Migration of Alert Page controls for non-default\nSpaces.
(#200058)](https://github.com/elastic/kibana/pull/200058)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Jatin\nKathuria\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-13T20:52:00Z\",\"message\":\"[Security\nSolution]
Migration of Alert Page controls for non-default
Spaces.\n(#200058)\\n\\n## Summary\\r\\n\\r\\nRecently, we created a PR
to migrate the\nalert page filters controls to\\r\\n`8.16`.
Unfortunately, it does not do\nmigration for non-default spaces\\r\\nso
any users upgrading to `8.16`\nwill face the issue where Alert
page\\r\\nerrors out as shown in
below\nscreenshot.\\r\\n\\r\\n\\r\\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\\r\\n\\r\\n\\r\\n##\nDesk
Testing\\r\\n\\r\\n1. Checkout to `v8.15` branch by running
`git\ncheckout 8.15`. \\r\\n2. Create a new space and go to that
space.\\r\\n3. Go\nto the alert page and do some modifications to the
page\ncontrols.\\r\\nThis store `v8.15` page controls in local
storage.\\r\\n -\nYou can, for example, delete one page control.\\r\\n -
Change selected\nvalue for one page control.\\r\\n - Additionally, you
can also add a\ncustom control.\\r\\n4. Checkout `main` now and repeat
the above\nsteps.\\r\\n5. Your changes should be retained on the alert
page and there\nshould\\r\\nnot be
any\nerror.\",\"sha\":\"b7ca7228315393c6672f638982dbac5196c9ad90\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:Threat\nHunting:Investigations\",\"backport:prev-minor\"],\"title\":\"[Security\nSolution]
Migration of Alert Page controls for
non-default\nSpaces.\",\"number\":200058,\"url\":\"https://github.com/elastic/kibana/pull/200058\",\"mergeCommit\":{\"message\":\"[Security\nSolution]
Migration of Alert Page controls for non-default
Spaces.\n(#200058)\\n\\n## Summary\\r\\n\\r\\nRecently, we created a PR
to migrate the\nalert page filters controls to\\r\\n`8.16`.
Unfortunately, it does not do\nmigration for non-default spaces\\r\\nso
any users upgrading to `8.16`\nwill face the issue where Alert
page\\r\\nerrors out as shown in
below\nscreenshot.\\r\\n\\r\\n\\r\\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\\r\\n\\r\\n\\r\\n##\nDesk
Testing\\r\\n\\r\\n1. Checkout to `v8.15` branch by running
`git\ncheckout 8.15`. \\r\\n2. Create a new space and go to that
space.\\r\\n3. Go\nto the alert page and do some modifications to the
page\ncontrols.\\r\\nThis store `v8.15` page controls in local
storage.\\r\\n -\nYou can, for example, delete one page control.\\r\\n -
Change selected\nvalue for one page control.\\r\\n - Additionally, you
can also add a\ncustom control.\\r\\n4. Checkout `main` now and repeat
the above\nsteps.\\r\\n5. Your changes should be retained on the alert
page and there\nshould\\r\\nnot be
any\nerror.\",\"sha\":\"b7ca7228315393c6672f638982dbac5196c9ad90\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/200058\",\"number\":200058,\"mergeCommit\":{\"message\":\"[Security\nSolution]
Migration of Alert Page controls for non-default
Spaces.\n(#200058)\\n\\n## Summary\\r\\n\\r\\nRecently, we created a PR
to migrate the\nalert page filters controls to\\r\\n`8.16`.
Unfortunately, it does not do\nmigration for non-default spaces\\r\\nso
any users upgrading to `8.16`\nwill face the issue where Alert
page\\r\\nerrors out as shown in
below\nscreenshot.\\r\\n\\r\\n\\r\\n![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)\\r\\n\\r\\n\\r\\n##\nDesk
Testing\\r\\n\\r\\n1. Checkout to `v8.15` branch by running
`git\ncheckout 8.15`. \\r\\n2. Create a new space and go to that
space.\\r\\n3. Go\nto the alert page and do some modifications to the
page\ncontrols.\\r\\nThis store `v8.15` page controls in local
storage.\\r\\n -\nYou can, for example, delete one page control.\\r\\n -
Change selected\nvalue for one page control.\\r\\n - Additionally, you
can also add a\ncustom control.\\r\\n4. Checkout `main` now and repeat
the above\nsteps.\\r\\n5. Your changes should be retained on the alert
page and there\nshould\\r\\nnot be
any\nerror.\",\"sha\":\"b7ca7228315393c6672f638982dbac5196c9ad90\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Jatin Kathuria
<[email protected]>"}},{"branch":"8.16","label":"v8.16.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…Spaces. (elastic#200058)

## Summary

Recently, we created a PR to migrate the alert page filters controls to
`8.16`. Unfortunately, it does not do migration for non-default spaces
so any users upgrading to `8.16` will face the issue where Alert page
errors out as shown in below screenshot.


![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)


## Desk Testing

1. Checkout to `v8.15` branch by running `git checkout 8.15`. 
2. Create a new space and go to that space.
3. Go to the alert page and do some modifications to the page controls.
This store `v8.15` page controls in local storage.
    - You can, for example, delete one page control.
    - Change selected value for one page control.
    - Additionally, you can also add a custom control.
4. Checkout `main` now and repeat the above steps.
5. Your changes should be retained on the alert page and there should
not be any error.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…Spaces. (elastic#200058)

## Summary

Recently, we created a PR to migrate the alert page filters controls to
`8.16`. Unfortunately, it does not do migration for non-default spaces
so any users upgrading to `8.16` will face the issue where Alert page
errors out as shown in below screenshot.


![grafik](https://github.com/user-attachments/assets/ffee1c2d-4aa2-44a4-96c9-68053fb1cf63)


## Desk Testing

1. Checkout to `v8.15` branch by running `git checkout 8.15`. 
2. Create a new space and go to that space.
3. Go to the alert page and do some modifications to the page controls.
This store `v8.15` page controls in local storage.
    - You can, for example, delete one page control.
    - Change selected value for one page control.
    - Additionally, you can also add a custom control.
4. Checkout `main` now and repeat the above steps.
5. Your changes should be retained on the alert page and there should
not be any error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants