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

[8.x] [Index Management] Add bulk edit data retention (#203083) #204936

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

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 <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit f72b63f)
@mattkime
Copy link
Contributor

/ci

@kibanamachine kibanamachine merged commit 9b2b922 into elastic:8.x Dec 19, 2024
8 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 695 699 +4

Async chunks

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

id before after diff
indexManagement 696.9KB 701.1KB +4.2KB

Page load bundle

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

id before after diff
indexManagement 47.2KB 47.3KB +86.0B

History

cc @ElenaStoeva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants