-
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
[Fleet] Get package info should not store the whole package #123509
[Fleet] Get package info should not store the whole package #123509
Conversation
…kage-info-should-not-store-the-whole-package
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
Yeah I think this would be good to refactor it so this page just uses the registry. The performance benefits for querying the package info from ES versus EPR are likely negligible at best. |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @nchaulet |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
This ends up interacting with #125525 which needs to be backported to 8.1 and 8.0 branches. I'm going to backport this along with the backport to that PR to make the fetch behavior consistent. |
…ilable in registry (#125525) (#125672) * [Fleet] Avoid breaking setup when compatible package is not available in registry (#125525) (cherry picked from commit 928638e) * [Fleet] Use registry version check on main (#125495) * [Fleet] Get package info should not store the whole package (#123509) Co-authored-by: Josh Dover <[email protected]> Co-authored-by: Nicolas Chaulet <[email protected]>
…ilable in registry (#125525) (#125671) * [Fleet] Avoid breaking setup when compatible package is not available in registry (#125525) (cherry picked from commit 928638e) * [Fleet] Get package info should not store the whole package (#123509) Co-authored-by: Josh Dover <[email protected]> Co-authored-by: Nicolas Chaulet <[email protected]>
Summary
Resolve #122560
Do not fetch the whole package in
/api/fleet/epm/pacakges/{pkgName}/{pkgVersion}
instead just fetch the info from the registry.For this I created a new method
getPackageInfoFromRegistry
asgetPackageInfo
is used in a lot of places and has a lot of side effect as it populate a cache in memory of the pakage (Something we should probably refactorize and address as a separate pull request)It improve the first call to the API from ~5s to 500ms for package like APM, AWS.