-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Index Management] Add bulk edit data retention #203083
[Index Management] Add bulk edit data retention #203083
Conversation
Pinging @elastic/kibana-management (Team:Kibana Management) |
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.
Thank you for working on this @ElenaStoeva! I tested it locally and in general looks good, but I've seen some things that I think it can be improved:
General
The changes in the flyout have provoked that the modal width changes when modifying the retention for a single data stream:
When you edit the data retention for a few data streams and you first introduce a value but then select the maximum/infinite period, the data deletion warning is still there, which I believe may be confusing for users as it may seem that some data will be deleted
In the same line but not that serious, if I have a validation error and then I toggle the max retention button, the validation error is still there:
Super nit pick. In the mocks the Delete data streams icon and text is red but here is all black:
In the flyout the icon is red but the text is black, which I don't know if it's the expected look.
Security serverless
In serverless security I saw a few weird behaviors (it happens in both single edit and bulk):
- If a have some data stream set to max retention(toggle on) and then manually change the retention to the same value it says I will lose data, even thought the retention period is the same. It happens both in bulk and flyout.
- If I select a data stream and edit the retention to max (toggle on) and save, I have a toaster saying that retention is mandatory and it has been set to the maximun.
@jovana-andjelkovic would you like to review this one? |
fe45e03
to
f95bbd7
Compare
Hi @SoniaSanzV, thanks for re-reviewing and sorry for missing to address this point! This warning message actually comes from Elasticsearch and I believe that this behavior exists from before this PR. Our current logic is that if the response comes back with a warning from Es, we should display it in a toast message. |
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.
Hi @SoniaSanzV, thanks for re-reviewing and sorry for missing to address this point! This warning message actually comes from Elasticsearch and I believe that this behavior exists from before this PR. Our current logic is that if the response comes back with a warning from Es, we should display it in a toast message.
Fair enough! It's not the best experience but since is not in our side, approving!
@ElenaStoeva for some reason when testing the latest build, I get some of the same issues @SoniaSanzV noted above:
Other issue:
|
Thanks for the review @jovana-andjelkovic!
Hmm I thought this was fixed, not sure what happened with these changes - should be fixed now with 4ebb176.
I actually already addressed this in my previous comment:
This is because for 20 days, there are 12 affected data streams and we decided that we only display the names for <= 10 data streams, right? For 200 days, there are 10 affected data streams, which is why they are displayed. |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @ElenaStoeva |
@ElenaStoeva thank you!
It doesn't display anymore on single edit ✔️ I do think we should have it there, as well. But as it wasn't originally specified and it's not planned part of this PR – maybe we can add an issue to backlog to add it in single edit as well?
Ah okay! In my head that limit was set on number of selected data streams rather than number of affected – but this works, maybe even better! I think we can merge this PR! 🟢 |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12413377278 |
Closes elastic#165142 ## Summary This PR adds bulk edit data retention to Data streams table. On all offerings apart from serverless security project: https://github.com/user-attachments/assets/aa091fc1-5029-4542-b76b-8045c65dda27 On serverless security project: https://github.com/user-attachments/assets/cbccc8bd-d3f1-4511-8134-bfb0a9e8587f ### How to test: Testing in serverless security project: 1. Start ES with `yarn es serverless --projectType security -E data_streams.lifecycle.retention.max=200d` and Kibana with `yarn serverless-security` 2. Navigate to console and create a few data streams following [these instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates) 3. Navigate to Index Management -> Data streams 4. Select multiple data streams and click on bulk edit data retention button 5. Verify that: - The help text displays the set max data retention with a link to cloud. - The form doesn't allow setting a data retention higher than the max data retention. - If any of the data streams has a reduced data retention period, an error banner is shown, displaying the affected data streams. Testing in stateful and searc/oblt serverless project: 1. Start ES with `yarn es serverless` and Kibana with `yarn serverless-security` 2. Navigate to console and create a few data streams following [this instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates) 3. Navigate to Index Management -> Data streams 4. Select multiple data streams and click on bulk edit data retention button 5. Verify that: - There is no help text displaying the max data retention and no validation for the data retention period. - If any of the data streams has a reduced data retention period, an error banner is shown, displaying the affected data streams. Configure cloud locally by adding the following to `config/kibana.dev.yml` and restarting Kibana: ``` xpack.cloud.id: 'test' xpack.cloud.base_url: "https://cloud.elastic.co" xpack.cloud.deployment_url: "/deployments/deploymentId" ``` ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7619 --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit f72b63f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7619[✅] x-pack/test/functional/apps/index_management/config.ts: 200/200 tests passed. |
Closes elastic#165142 ## Summary This PR adds bulk edit data retention to Data streams table. On all offerings apart from serverless security project: https://github.com/user-attachments/assets/aa091fc1-5029-4542-b76b-8045c65dda27 On serverless security project: https://github.com/user-attachments/assets/cbccc8bd-d3f1-4511-8134-bfb0a9e8587f ### How to test: Testing in serverless security project: 1. Start ES with `yarn es serverless --projectType security -E data_streams.lifecycle.retention.max=200d` and Kibana with `yarn serverless-security` 2. Navigate to console and create a few data streams following [these instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates) 3. Navigate to Index Management -> Data streams 4. Select multiple data streams and click on bulk edit data retention button 5. Verify that: - The help text displays the set max data retention with a link to cloud. - The form doesn't allow setting a data retention higher than the max data retention. - If any of the data streams has a reduced data retention period, an error banner is shown, displaying the affected data streams. Testing in stateful and searc/oblt serverless project: 1. Start ES with `yarn es serverless` and Kibana with `yarn serverless-security` 2. Navigate to console and create a few data streams following [this instructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates) 3. Navigate to Index Management -> Data streams 4. Select multiple data streams and click on bulk edit data retention button 5. Verify that: - There is no help text displaying the max data retention and no validation for the data retention period. - If any of the data streams has a reduced data retention period, an error banner is shown, displaying the affected data streams. Configure cloud locally by adding the following to `config/kibana.dev.yml` and restarting Kibana: ``` xpack.cloud.id: 'test' xpack.cloud.base_url: "https://cloud.elastic.co" xpack.cloud.deployment_url: "/deployments/deploymentId" ``` ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7619 --------- Co-authored-by: kibanamachine <[email protected]>
) # Backport This will backport the following commits from `main` to `8.x`: - [[Index Management] Add bulk edit data retention (#203083)](#203083) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Elena Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-19T13:11:52Z","message":"[Index Management] Add bulk edit data retention (#203083)\n\nCloses https://github.com/elastic/kibana/issues/165142\r\n\r\n## Summary\r\n\r\nThis PR adds bulk edit data retention to Data streams table.\r\n\r\nOn all offerings apart from serverless security project:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa091fc1-5029-4542-b76b-8045c65dda27\r\n\r\n\r\nOn serverless security project:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cbccc8bd-d3f1-4511-8134-bfb0a9e8587f\r\n\r\n\r\n\r\n\r\n\r\n### How to test:\r\n\r\nTesting in serverless security project:\r\n1. Start ES with `yarn es serverless --projectType security -E\r\ndata_streams.lifecycle.retention.max=200d` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [these\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- The help text displays the set max data retention with a link to\r\ncloud.\r\n- The form doesn't allow setting a data retention higher than the max\r\ndata retention.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\n\r\nTesting in stateful and searc/oblt serverless project:\r\n1. Start ES with `yarn es serverless` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [this\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- There is no help text displaying the max data retention and no\r\nvalidation for the data retention period.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\nConfigure cloud locally by adding the following to\r\n`config/kibana.dev.yml` and restarting Kibana:\r\n```\r\nxpack.cloud.id: 'test'\r\nxpack.cloud.base_url: \"https://cloud.elastic.co\"\r\nxpack.cloud.deployment_url: \"/deployments/deploymentId\"\r\n```\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed -\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7619\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f72b63f3b7c9575605b30d9dcffeec6d9d68574e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","ci:cloud-deploy","ci:project-deploy-security"],"title":"[Index Management] Add bulk edit data retention","number":203083,"url":"https://github.com/elastic/kibana/pull/203083","mergeCommit":{"message":"[Index Management] Add bulk edit data retention (#203083)\n\nCloses https://github.com/elastic/kibana/issues/165142\r\n\r\n## Summary\r\n\r\nThis PR adds bulk edit data retention to Data streams table.\r\n\r\nOn all offerings apart from serverless security project:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa091fc1-5029-4542-b76b-8045c65dda27\r\n\r\n\r\nOn serverless security project:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cbccc8bd-d3f1-4511-8134-bfb0a9e8587f\r\n\r\n\r\n\r\n\r\n\r\n### How to test:\r\n\r\nTesting in serverless security project:\r\n1. Start ES with `yarn es serverless --projectType security -E\r\ndata_streams.lifecycle.retention.max=200d` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [these\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- The help text displays the set max data retention with a link to\r\ncloud.\r\n- The form doesn't allow setting a data retention higher than the max\r\ndata retention.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\n\r\nTesting in stateful and searc/oblt serverless project:\r\n1. Start ES with `yarn es serverless` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [this\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- There is no help text displaying the max data retention and no\r\nvalidation for the data retention period.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\nConfigure cloud locally by adding the following to\r\n`config/kibana.dev.yml` and restarting Kibana:\r\n```\r\nxpack.cloud.id: 'test'\r\nxpack.cloud.base_url: \"https://cloud.elastic.co\"\r\nxpack.cloud.deployment_url: \"/deployments/deploymentId\"\r\n```\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed -\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7619\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f72b63f3b7c9575605b30d9dcffeec6d9d68574e"}},"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/203083","number":203083,"mergeCommit":{"message":"[Index Management] Add bulk edit data retention (#203083)\n\nCloses https://github.com/elastic/kibana/issues/165142\r\n\r\n## Summary\r\n\r\nThis PR adds bulk edit data retention to Data streams table.\r\n\r\nOn all offerings apart from serverless security project:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa091fc1-5029-4542-b76b-8045c65dda27\r\n\r\n\r\nOn serverless security project:\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cbccc8bd-d3f1-4511-8134-bfb0a9e8587f\r\n\r\n\r\n\r\n\r\n\r\n### How to test:\r\n\r\nTesting in serverless security project:\r\n1. Start ES with `yarn es serverless --projectType security -E\r\ndata_streams.lifecycle.retention.max=200d` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [these\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- The help text displays the set max data retention with a link to\r\ncloud.\r\n- The form doesn't allow setting a data retention higher than the max\r\ndata retention.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\n\r\nTesting in stateful and searc/oblt serverless project:\r\n1. Start ES with `yarn es serverless` and Kibana with `yarn\r\nserverless-security`\r\n2. Navigate to console and create a few data streams following [this\r\ninstructions](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-a-data-stream.html#create-component-templates)\r\n3. Navigate to Index Management -> Data streams\r\n4. Select multiple data streams and click on bulk edit data retention\r\nbutton\r\n5. Verify that:\r\n- There is no help text displaying the max data retention and no\r\nvalidation for the data retention period.\r\n- If any of the data streams has a reduced data retention period, an\r\nerror banner is shown, displaying the affected data streams.\r\n\r\nConfigure cloud locally by adding the following to\r\n`config/kibana.dev.yml` and restarting Kibana:\r\n```\r\nxpack.cloud.id: 'test'\r\nxpack.cloud.base_url: \"https://cloud.elastic.co\"\r\nxpack.cloud.deployment_url: \"/deployments/deploymentId\"\r\n```\r\n\r\n\r\n### Checklist\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed -\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7619\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"f72b63f3b7c9575605b30d9dcffeec6d9d68574e"}}]}] BACKPORT--> --------- Co-authored-by: Elena Stoeva <[email protected]> Co-authored-by: Matthew Kime <[email protected]>
Closes #165142
Summary
This PR adds bulk edit data retention to Data streams table.
On all offerings apart from serverless security project:
Screen.Recording.2024-12-12.at.18.37.58.mov
On serverless security project:
Screen.Recording.2024-12-12.at.18.45.58.mov
How to test:
Testing in serverless security project:
yarn es serverless --projectType security -E data_streams.lifecycle.retention.max=200d
and Kibana withyarn serverless-security
Testing in stateful and searc/oblt serverless project:
yarn es serverless
and Kibana withyarn serverless-security
Configure cloud locally by adding the following to
config/kibana.dev.yml
and restarting Kibana:Checklist