-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Search Apps. - fetch indices one-by-one #156571
[Enterprise Search] Search Apps. - fetch indices one-by-one #156571
Conversation
5f748af
to
7fe70a2
Compare
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.
Thanks for taking care of this!
x-pack/plugins/enterprise_search/server/lib/engines/fetch_indices_stats.ts
Outdated
Show resolved
Hide resolved
⏸️ ope! similar issues with pages fetching fields caps. more fixes incoming 🔧 |
7fe70a2
to
8ff3897
Compare
@kderusso made some pretty significant changes to accommodate a similar change to search app field capabilities. mind taking another look? |
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.
LGTM! Thanks!
c72f63f
to
b89d75e
Compare
b89d75e
to
f63cf12
Compare
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
…156571) ## Summary fetches a search application's indices' stats one at a time. if even one index is not available the stats api returns an error[^1]. while fetching them all together is probably more efficient we have to get them one-by-one just in case one isn't available. ### Checklist - [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 [^1]: <details><summary>stats errors response</summary> <pre> { "error": { "root_cause": [ { "type": "index_not_found_exception", "reason": "no such index [sloane-books-001]", "resource.type": "index_or_alias", "resource.id": "sloane-books-001", "index_uuid": "_na_", "index": "sloane-books-001" } ], "type": "index_not_found_exception", "reason": "no such index [sloane-books-001]", "resource.type": "index_or_alias", "resource.id": "sloane-books-001", "index_uuid": "_na_", "index": "sloane-books-001" }, "status": 404 } </pre> </details> (cherry picked from commit 23a45bd)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…56571) (#156624) # Backport This will backport the following commits from `main` to `8.8`: - [[Enterprise Search] Search Apps. - fetch indices one-by-one (#156571)](#156571) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sloane Perrault","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-03T20:39:53Z","message":"[Enterprise Search] Search Apps. - fetch indices one-by-one (#156571)\n\n## Summary\r\n\r\nfetches a search application's indices' stats one at a time.\r\n\r\nif even one index is not available the stats api returns an error[^1].\r\nwhile fetching them all together is probably more efficient we have to\r\nget them one-by-one just in case one isn't available.\r\n\r\n### Checklist\r\n\r\n\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\r\n[^1]: <details><summary>stats errors response</summary>\r\n <pre>\r\n {\r\n \"error\": {\r\n \"root_cause\": [\r\n {\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n }\r\n ],\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n },\r\n \"status\": 404\r\n }\r\n </pre>\r\n</details>","sha":"23a45bde21b36be49a1174b9bde1fc340de67534","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.8.0","v8.9.0"],"number":156571,"url":"https://github.com/elastic/kibana/pull/156571","mergeCommit":{"message":"[Enterprise Search] Search Apps. - fetch indices one-by-one (#156571)\n\n## Summary\r\n\r\nfetches a search application's indices' stats one at a time.\r\n\r\nif even one index is not available the stats api returns an error[^1].\r\nwhile fetching them all together is probably more efficient we have to\r\nget them one-by-one just in case one isn't available.\r\n\r\n### Checklist\r\n\r\n\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\r\n[^1]: <details><summary>stats errors response</summary>\r\n <pre>\r\n {\r\n \"error\": {\r\n \"root_cause\": [\r\n {\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n }\r\n ],\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n },\r\n \"status\": 404\r\n }\r\n </pre>\r\n</details>","sha":"23a45bde21b36be49a1174b9bde1fc340de67534"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156571","number":156571,"mergeCommit":{"message":"[Enterprise Search] Search Apps. - fetch indices one-by-one (#156571)\n\n## Summary\r\n\r\nfetches a search application's indices' stats one at a time.\r\n\r\nif even one index is not available the stats api returns an error[^1].\r\nwhile fetching them all together is probably more efficient we have to\r\nget them one-by-one just in case one isn't available.\r\n\r\n### Checklist\r\n\r\n\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\r\n[^1]: <details><summary>stats errors response</summary>\r\n <pre>\r\n {\r\n \"error\": {\r\n \"root_cause\": [\r\n {\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n }\r\n ],\r\n \"type\": \"index_not_found_exception\",\r\n \"reason\": \"no such index [sloane-books-001]\",\r\n \"resource.type\": \"index_or_alias\",\r\n \"resource.id\": \"sloane-books-001\",\r\n \"index_uuid\": \"_na_\",\r\n \"index\": \"sloane-books-001\"\r\n },\r\n \"status\": 404\r\n }\r\n </pre>\r\n</details>","sha":"23a45bde21b36be49a1174b9bde1fc340de67534"}}]}] BACKPORT--> Co-authored-by: Sloane Perrault <[email protected]>
Summary
fetches a search application's indices' stats one at a time.
if even one index is not available the stats api returns an error1. while fetching them all together is probably more efficient we have to get them one-by-one just in case one isn't available.
Checklist
Footnotes
stats errors response
↩