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

[Index Management] Fix filter index list by lifecycle status #195350

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

viajes7
Copy link
Contributor

@viajes7 viajes7 commented Oct 8, 2024

Summary

Fixes #180970

In indexLifecycleDataEnricher, add only_managed: true query parameter to fetch lifecycle data.

It causes the ilm property to be empty in the response. And EuiSearchBar field_value_selection doesn't support filtering a undefined filed value.

So, maybe only_managed: true should be removed.

Before:

image

After:

image

@viajes7 viajes7 requested a review from a team as a code owner October 8, 2024 07:35
@viajes7
Copy link
Contributor Author

viajes7 commented Oct 8, 2024

@elasticmachine merge upstream

@ElenaStoeva ElenaStoeva self-requested a review October 8, 2024 13:00
Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Thanks for patching this up @viajes7! Tested locally and the filter works as expected now. Code changes also lgtm.

I was curious why only_managed was set to true initially and found that this was added in #176178, but it doesn't explain why it sets the response from ES to only return ILM data for indices that are managed by ILM. I tested the scenario from that PR and it still works well, so I think we're good to merge this change! 👍

@ElenaStoeva ElenaStoeva added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@ElenaStoeva ElenaStoeva added the release_note:skip Skip the PR/issue when compiling release notes label Oct 8, 2024
@ElenaStoeva
Copy link
Contributor

/ci

@viajes7
Copy link
Contributor Author

viajes7 commented Oct 9, 2024

@elasticmachine merge upstream

@ElenaStoeva
Copy link
Contributor

/ci

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #95 / Serverless Common UI - Management Index Management Indices can delete index

Metrics [docs]

✅ unchanged

History

@viajes7 viajes7 requested a review from ElenaStoeva October 10, 2024 15:11
@ElenaStoeva
Copy link
Contributor

@elasticmachine run docs-build

@ElenaStoeva ElenaStoeva enabled auto-merge (squash) October 10, 2024 15:38
@ElenaStoeva ElenaStoeva merged commit 5214877 into elastic:main Oct 10, 2024
23 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 10, 2024
…#195350)

## Summary

Fixes elastic#180970

In `indexLifecycleDataEnricher`, add `only_managed: true` query
parameter to fetch lifecycle data.

It causes the `ilm` property to be empty in the response. And
`EuiSearchBar` `field_value_selection` doesn't support filtering a
`undefined` filed value.

So, maybe `only_managed: true` should be removed.

Before:

<img width="733" alt="image"
src="https://github.com/user-attachments/assets/2472127d-c050-4ffb-bb76-f3e80e780cb3">

After:

<img width="511" alt="image"
src="https://github.com/user-attachments/assets/da38f437-58f4-43b2-8d6b-54873e01f79b">

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Elena Stoeva <[email protected]>
(cherry picked from commit 5214877)
@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 Oct 10, 2024
…195350) (#195803)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Index Management] Fix filter index list by lifecycle status
(#195350)](#195350)

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

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

<!--BACKPORT [{"author":{"name":"Jusheng
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T16:05:23Z","message":"[Index
Management] Fix filter index list by lifecycle status (#195350)\n\n##
Summary\r\n\r\nFixes #180970 \r\n\r\nIn `indexLifecycleDataEnricher`,
add `only_managed: true` query\r\nparameter to fetch lifecycle
data.\r\n\r\nIt causes the `ilm` property to be empty in the response.
And\r\n`EuiSearchBar` `field_value_selection` doesn't support filtering
a\r\n`undefined` filed value.\r\n\r\nSo, maybe `only_managed: true`
should be removed.\r\n\r\nBefore:\r\n\r\n<img width=\"733\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2472127d-c050-4ffb-bb76-f3e80e780cb3\">\r\n\r\nAfter:
\r\n\r\n<img width=\"511\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/da38f437-58f4-43b2-8d6b-54873e01f79b\">\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"52148775b1ff4b4379f0049cc2332fb27e405a07","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","💝community","v9.0.0","backport:prev-minor"],"title":"[Index
Management] Fix filter index list by lifecycle
status","number":195350,"url":"https://github.com/elastic/kibana/pull/195350","mergeCommit":{"message":"[Index
Management] Fix filter index list by lifecycle status (#195350)\n\n##
Summary\r\n\r\nFixes #180970 \r\n\r\nIn `indexLifecycleDataEnricher`,
add `only_managed: true` query\r\nparameter to fetch lifecycle
data.\r\n\r\nIt causes the `ilm` property to be empty in the response.
And\r\n`EuiSearchBar` `field_value_selection` doesn't support filtering
a\r\n`undefined` filed value.\r\n\r\nSo, maybe `only_managed: true`
should be removed.\r\n\r\nBefore:\r\n\r\n<img width=\"733\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2472127d-c050-4ffb-bb76-f3e80e780cb3\">\r\n\r\nAfter:
\r\n\r\n<img width=\"511\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/da38f437-58f4-43b2-8d6b-54873e01f79b\">\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"52148775b1ff4b4379f0049cc2332fb27e405a07"}},"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/195350","number":195350,"mergeCommit":{"message":"[Index
Management] Fix filter index list by lifecycle status (#195350)\n\n##
Summary\r\n\r\nFixes #180970 \r\n\r\nIn `indexLifecycleDataEnricher`,
add `only_managed: true` query\r\nparameter to fetch lifecycle
data.\r\n\r\nIt causes the `ilm` property to be empty in the response.
And\r\n`EuiSearchBar` `field_value_selection` doesn't support filtering
a\r\n`undefined` filed value.\r\n\r\nSo, maybe `only_managed: true`
should be removed.\r\n\r\nBefore:\r\n\r\n<img width=\"733\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2472127d-c050-4ffb-bb76-f3e80e780cb3\">\r\n\r\nAfter:
\r\n\r\n<img width=\"511\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/da38f437-58f4-43b2-8d6b-54873e01f79b\">\r\n\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Elena
Stoeva
<[email protected]>","sha":"52148775b1ff4b4379f0049cc2332fb27e405a07"}}]}]
BACKPORT-->

Co-authored-by: Jusheng Huang <[email protected]>
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) 💝community release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Index Management] Filter by lifecycle status not working
4 participants