-
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
[Fleet] Stop fetching all full or with agentCount agent policies #191661
[Fleet] Stop fetching all full or with agentCount agent policies #191661
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
36fca6b
to
df8b1ce
Compare
/ci |
/ci |
3216a30
to
1fec585
Compare
/ci |
Pinging @elastic/fleet (Team:Fleet) |
x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx
Outdated
Show resolved
Hide resolved
…policy/list_page/index.tsx Co-authored-by: Julia Bardi <[email protected]>
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @nchaulet |
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
Summary
Related to https://github.com/elastic/ingest-dev/issues/3343
Currently the Fleet UI is really slow with 500 agents policies, 1 minute loading the agent tab, same for the enrollment api keys, to be able to fully support 500 agent policies (and in the future more), we should stop fetching all the agent policies with the full flag or with agent count from the UI, as this cause very long API request and make the UI not usable. (we could still fetch them using the perPage flag).
That PR does that, by making fetching agent policies without agent count the default.
As part of that PR I also added a small script that allow to quickly generate a big number of agent policies bypassing Fleet APIs that usefull for testing.
It could be called from the Fleet plugin folder with
Why that change matter?
This is the performance of calling the agent policies endpoint with 500 agent policies (on a macbook)
With ?full and agentCount => 49s
Without ?full and no agentCount => 266ms
Questions
How can we prevent call to get all the agent policies with agent count or full to be introduced in the future?
Should we introduce a maximum validation to the
perPage
on the API side iffull
ornoAgentCount=false
?