-
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] Add support for forcing stack aligned versions on bundled packages #139567
[Fleet] Add support for forcing stack aligned versions on bundled packages #139567
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.
Looks good @kpollich! Just one question about the package that is fetched from EPR.
@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.
LGTM 🎉
@elasticmachine merge upstream |
@elasticmachine merge upstream |
); | ||
} | ||
|
||
const archivePath = `${fleetPackage.name}-${versionToWrite}.zip`; |
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'm wondering if we can support 2 endpoints temporarily. The job I'm building here will use indices behind https://epr-v2.ea-web.elastic.dev/, which are different from https://epr-snapshot.elastic.co/ at the moment.
We have 3 options:
- We will enable the job once we switch to Package Storage v2.
build_fleet_packages.ts
will check also the v2 endpoint.- The job can update the
fleet_packages.json
with direct links to packages (and signatures).
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 would prefer to keep Kibana somewhat unaware of a separate package storage v2 endpoint if possible.
What is your thinking behind checking v1 and v2? Just trying to catch cases where a package hasn't been upload to both places yet when a build occurs?
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.
Actually it's more tangled.
APM pipeline is integrated only with v2, so you will never see this package in v1: https://epr-v2.ea-web.elastic.dev/search?prerelease=true&package=apm (8.5.0-preview-1661950351).
That's why I was thinking about setting download_urls in fleet_packages.json
... or we will enable the job once we switch to v2 (epr-snapshot will point to https://epr-v2.ea-web.elastic.dev/).
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'm in favor of enabling the job once we switch to v2 to keep Kibana's assumption around EPR endpoints accurate before and after the release of package storage v2.
@kpollich can it cause some issue with the integration list page, I think we are using the search endpoint from EPR here so the version could mismatch somehow no? |
@elasticmachine merge upstream |
I don't think so, because bundled packages aren't included on the integrations grid. I'm kicking off a cloud deploy here just to verify in an environment where we have both bundled packages + EPR packages. |
Cloud deploy failed and I'm not sure why. Seems like a transient issue. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @kpollich |
Cloud deploy looks good in terms of browse and installed integrations grid. Everything seems to be working as expected. 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.
🚀
…kages (elastic#139567) * Add support for forcing stack aligned versions on bundled packages * Revert build_distributables * Add missing module * Enforce version in config even when stack aligned * Throw error on failure to download bundled package * Update comment Co-authored-by: Kibana Machine <[email protected]>
Summary
Ref #138257
forceAlignStackVersion
option tofleet_packages.json
-SNAPSHOT
suffix if needed) when opted in viaforceAlignStackVersion
apm
package into new versioning logicTo test
build_distributables.ts
yarn build --epr-registry=production
to fetch bundled packages from the production registry (simulates an older APM version in registry)build/kibana/x-pack/plugins/fleet/target/bundled_packages
directory outputted by the build tox-pack/plugins/fleet/target/bundled_packages
to resolve bundled packages in devkibana.dev.yml
, e.g.Dependency alert
I needed a way to manipulate and generate
.zip
files on the fly here, and https://github.com/thejoshwolfe/yazl seemed like the obvious choice. We already make use of its companion library https://github.com/thejoshwolfe/yauzl elsewhere in Kibana, so I opted to installyazl
and@types/yazl
to fulfill our needs here.