-
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
[Remote clusters] Per cluster status call #194420
[Remote clusters] Per cluster status call #194420
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.
We moved from 1 request to N requests (and triggering all requests in parallel).
I wish we could batch cluster resolution (like 10 clusters per call?) to minimize the impact or, at least, use pMap
(from p-map
) to control the number of concurrent requests.
@elasticmachine merge upstream |
Thanks for reviewing @afharo, I've separated the requests in batches of 10 and also requestTimeout at least until we can resolve #194834 |
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
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.
Works well but I think the concurrency can be improved.
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @sabarasaba |
Starting backport for target branches: 8.x |
(cherry picked from commit 77c89d2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Remote clusters] Per cluster status call (#194420)](#194420) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ignacio Rivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-07T16:07:41Z","message":"[Remote clusters] Per cluster status call (#194420)","sha":"77c89d22f7863e8e55214c3aa79dc16026cc08e3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:CCR and Remote Clusters","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"[Remote clusters] Per cluster status call","number":194420,"url":"https://github.com/elastic/kibana/pull/194420","mergeCommit":{"message":"[Remote clusters] Per cluster status call (#194420)","sha":"77c89d22f7863e8e55214c3aa79dc16026cc08e3"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194420","number":194420,"mergeCommit":{"message":"[Remote clusters] Per cluster status call (#194420)","sha":"77c89d22f7863e8e55214c3aa79dc16026cc08e3"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ignacio Rivas <[email protected]>
Summary
We agregate all the cluster names in order to do a single
resolveCluster
API call to get the cluster statuses. If we have many and with long names, this could trigger a error such as400: Bad Request. An HTTP line is larger than 4096 bytes.
. This PR changes this code so that we do aresolveCluster
call per cluster instead, in order to avoid this sort of problems.How to test