-
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
Optimize package installation performance, phase 2 #131627
Conversation
Pinging @elastic/fleet (Team:Fleet) |
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 all your work on these improvements!
I've significantly refactored index template and ingest pipeline code to separate generating the assets form installing them. PTAL
/** | ||
* In order to install assets in parallel, we need to split the preparation step from the installation step. This | ||
* allows us to know which asset references are going to be installed so that we can save them on the packages | ||
* SO before installation begins. In the case of a failure during installing any individual asset, we'll have the | ||
* references necessary to remove any assets in that were successfully installed during the rollback phase. | ||
* | ||
* This split of prepare/install could be extended to all asset types. Besides performance, it also allows us to | ||
* more easily write unit tests against the asset generation code without needing to mock ES responses. | ||
*/ |
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.
@kpollich Here would be a good place to start reviewing the latest commit / refactor
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 - super helpful comment here so much appreciated on that.
expect(sentTemplate?.index_patterns).toEqual([templateIndexPatternDatasetIsPrefixTrue]); | ||
}); | ||
|
||
it('tests installPackage remove the aliases property if the property existed', async () => { |
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 removed this whole test because this behavior is no longer necessary and was removed in the previous PR. This test just happens to still pass.
💚 Build SucceededMetrics [docs]
History
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.
Thanks for the refactor. The code is super easy to follow and the comments included are much appreciated.
/** | ||
* In order to install assets in parallel, we need to split the preparation step from the installation step. This | ||
* allows us to know which asset references are going to be installed so that we can save them on the packages | ||
* SO before installation begins. In the case of a failure during installing any individual asset, we'll have the | ||
* references necessary to remove any assets in that were successfully installed during the rollback phase. | ||
* | ||
* This split of prepare/install could be extended to all asset types. Besides performance, it also allows us to | ||
* more easily write unit tests against the asset generation code without needing to mock ES responses. | ||
*/ |
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 - super helpful comment here so much appreciated on that.
…hromium-to-print-pdf-part-1 * 'main' of github.com:elastic/kibana: (59 commits) [Cloud Posture] Enabled findings group by feature (elastic#131780) [EBT] Fix `userId` generation (elastic#131701) [RAM] Add shareable rule tag filter (elastic#130710) Optimize package installation performance, phase 2 (elastic#131627) [Screenshotting] instrument for benchmark tests using new EventLogger class (elastic#130356) [Connector] Adding internal route for requesting ad-hoc ServiceNow access token (elastic#131171) [ci] bump kibana-buildkite-library (elastic#131754) [Synthetics] UI clean up (elastic#131598) [RsponseOps] Fix flaky rules list test (elastic#131567) [Cases] Add severity field to create case (elastic#131626) [Discover] Monospace font in Document Explorer (elastic#131513) Sessions tab improvements (elastic#131583) Add cloud icon "ess-icon" at the end of the config keys in "alerting" documentation (elastic#131735) [DOCS] Updates deprecation text for legacy APIs (elastic#131741) [ci] break out skip patterns so they can change without triggering CI (elastic#131726) Adjust search session management page font size (elastic#131291) [Unified search] Fix uptime css problem (elastic#131730) [Actionable Observability] Link to filtered rules page (elastic#131629) Add openAPI specifications for cases endpoint (elastic#131275) Display rule API key owner to users who can manage API keys (elastic#131662) ... # Conflicts: # x-pack/plugins/screenshotting/server/formats/pdf/index.ts # x-pack/plugins/screenshotting/server/screenshots/observable.ts
Summary
Follow up from #130906
Closes #110500
This makes two additional performance improvements to shave off several more seconds from the installation process:
refresh: false
on the Saved Object import of Kibana assets