-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Ingest Manager] Optimize installation of integration #67708
Conversation
Pinging @elastic/ingest-management (Team:Ingest 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.
I'll try out locally ASAP. Any chance you have traces that show the difference before and after?
x-pack/plugins/ingest_manager/server/services/epm/packages/assets.ts
Outdated
Show resolved
Hide resolved
No, I was having some issues with server errors from APM working on your PR but noticed looking at the traces that this was a good place to start. Using chrome dev tools and looking at the time it takes for the integration install it usually cut the time significantly. |
@elasticmachine merge upstream |
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.
Didn't run locally but LGTM. Sorry for the holdup.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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.
🚀
* call getArchiveInfo once first, pass paths to template * pass paths to installPreBuiltTemplates * pass paths to installILMPolicy * pass paths to ingest pipeline creation * use correct package key for cache * pass paths to kibana assets * cache other installed packages * create function for ensuring packages are cached * remove unused imports Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* call getArchiveInfo once first, pass paths to template * pass paths to installPreBuiltTemplates * pass paths to installILMPolicy * pass paths to ingest pipeline creation * use correct package key for cache * pass paths to kibana assets * cache other installed packages * create function for ensuring packages are cached * remove unused imports Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* call getArchiveInfo once first, pass paths to template * pass paths to installPreBuiltTemplates * pass paths to installILMPolicy * pass paths to ingest pipeline creation * use correct package key for cache * pass paths to kibana assets * cache other installed packages * create function for ensuring packages are cached * remove unused imports Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* call getArchiveInfo once first, pass paths to template * pass paths to installPreBuiltTemplates * pass paths to installILMPolicy * pass paths to ingest pipeline creation * use correct package key for cache * pass paths to kibana assets * cache other installed packages * create function for ensuring packages are cached * remove unused imports Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@neptunian Could you elaborate on how / where exactly do we cache it? |
@ruflin |
Installing an integration for a large package like AWS is timing out in cloud. I think this might speed things up enough.
Changes:
To test try the following on master and then in this PR:
*Note that because we use a cache it will take longer the first time its installed (which is going mostly always be the case) and whether or not other packages are installed (because of building the index patterns #67760 - i'm not comfortable making this optimization in alpha ) so these cases should be checked, too.
Fixes: #67743
Before changes, locally I consistently get about 7-9 seconds
With these changes its around 3-5
These comparisons were made by restarting the kibana server before each request so there was no cache of aws and while the default packages were installed only (base, endpoint, system)