-
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] Resolve latest package version from bundled packages if possible #126492
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@@ -74,64 +75,73 @@ async function _fetchFindLatestPackage( | |||
packageName: string, | |||
options?: FetchFindLatestPackageOptions | |||
) { | |||
const logger = appContextService.getLogger(); |
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.
These fetch functions could really use some unit tests at this point now that there are varying fallback cases, etc.
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.
Good idea, I added an item in our board 👍
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.
Tested locally, policy editor worked 🎉
As you noted, the Integration details UI is broken now, which is sorta different behavior for testers but at least this unblocks the testing of APM server on Cloud. Once package is published to prod, this will resolve.
One semi-related thing I noticed was the link on the APM server tutorial to Fleet goes to the 8.0.0 page. It doesn't break anything though, everything on the page says 8.1.0 and the editor works fine.
💔 All backports failed
How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
Waiting on a backport of a previous PR to 8.1 before I can resolve conflicts reasonably and backport this to 8.1. |
And the above PR, it turns out needs to wait on a backport of #125959 to 8.1 as well. 🙃 |
…stic#126492) (cherry picked from commit 50e8972)
Summary
Fixes #126487
Update "fetch latest package" logic to compare any bundled packages on disk to the version returned from the registry. If the bundled package version is newer, treat that as the latest.
To test
Create a mimicked cloud policy via
kibana.dev.yml
Then, update your snapshot URL to always resolve to production instead of snapshot/staging by editing this file:
https://github.com/elastic/kibana/blob/4b1bf83bad93b2349581ac7ef70adf230d4dfdb1/x-pack/plugins/fleet/server/services/epm/registry/registry_url.ts
Then, run Fleet setup in a fresh ES/Kibana environment. Verify that APM 8.1.0 and Fleet Server 1.1.0 are installed as expected. e.g.
Note: This does result in a rather broken UI experience on the integration details page, because the installed version does not exist in the configured registry, e.g
However, this is expected for now, and the policy editor for this version of APM is still functional.