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

[Enterprise Search] Fix broken indices page when an index with alias is closed #158871

Conversation

saarikabhasi
Copy link
Member

@saarikabhasi saarikabhasi commented Jun 1, 2023

Summary

Fix indices page when an index is closed. Added a check to see if the index is closed by checking the flag index.settings.index.verified_before_close is set to true

Screen Recording

Fix.broken.indices.page.when.a.index.is.closed.mov

@saarikabhasi
Copy link
Member Author

I didn't add an additional filter to remove closed index from indexData:

To do that we might need filter each index and check if it's closed, which IMO is an another overhead. Also I figured it would be fine as indexData already has hidden indices data even though returnHiddenIndices is false.

And I tested this changes in UI. The indices page doesn't show closed index.

@saarikabhasi saarikabhasi added release_note:skip Skip the PR/issue when compiling release notes Team:EnterpriseSearch v8.9.0 v8.8.1 labels Jun 1, 2023
@saarikabhasi saarikabhasi marked this pull request as ready for review June 1, 2023 21:24
@saarikabhasi saarikabhasi requested a review from a team June 1, 2023 21:24
@saarikabhasi
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 414 418 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 498 502 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@saarikabhasi saarikabhasi merged commit 7c8ddd0 into elastic:main Jun 2, 2023
@saarikabhasi saarikabhasi deleted the indices-page/fetch-indices-fix-closing-index-error branch June 2, 2023 14:57
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 2, 2023
…is closed (elastic#158871)

## Summary

Fix indices page when an index is closed. Added a check to see if the
index is closed by checking the flag
`index.settings.index.verified_before_close` is set to true

### Screen Recording

https://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 7c8ddd0)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

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 Jun 2, 2023
…alias is closed (#158871) (#158938)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Enterprise Search] Fix broken indices page when an index with alias
is closed (#158871)](#158871)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Saarika
Bhasi","email":"55930906+saarikabhasi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-06-02T14:57:42Z","message":"[Enterprise
Search] Fix broken indices page when an index with alias is closed
(#158871)\n\n## Summary\r\n\r\nFix indices page when an index is closed.
Added a check to see if the\r\nindex is closed by checking the
flag\r\n`index.settings.index.verified_before_close` is set to
true\r\n\r\n### Screen
Recording\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7c8ddd0ec54442f3556141c9d8897b28c1539e70","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.9.0","v8.8.1"],"number":158871,"url":"#158871
Search] Fix broken indices page when an index with alias is closed
(#158871)\n\n## Summary\r\n\r\nFix indices page when an index is closed.
Added a check to see if the\r\nindex is closed by checking the
flag\r\n`index.settings.index.verified_before_close` is set to
true\r\n\r\n### Screen
Recording\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7c8ddd0ec54442f3556141c9d8897b28c1539e70"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#158871
Search] Fix broken indices page when an index with alias is closed
(#158871)\n\n## Summary\r\n\r\nFix indices page when an index is closed.
Added a check to see if the\r\nindex is closed by checking the
flag\r\n`index.settings.index.verified_before_close` is set to
true\r\n\r\n### Screen
Recording\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7c8ddd0ec54442f3556141c9d8897b28c1539e70"}},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Saarika Bhasi <55930906+saarikabhasi@users.noreply.github.com>
cqliu1 pushed a commit to cqliu1/kibana that referenced this pull request Jun 5, 2023
…is closed (elastic#158871)

## Summary

Fix indices page when an index is closed. Added a check to see if the
index is closed by checking the flag
`index.settings.index.verified_before_close` is set to true

### Screen Recording


https://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sloanelybutsurely pushed a commit to sloanelybutsurely/kibana that referenced this pull request Jun 6, 2023
…is closed (elastic#158871)

## Summary

Fix indices page when an index is closed. Added a check to see if the
index is closed by checking the flag
`index.settings.index.verified_before_close` is set to true

### Screen Recording


https://github.com/elastic/kibana/assets/55930906/f818b92d-8947-4764-aed9-a8a191cba2e0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:EnterpriseSearch v8.8.1 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants