-
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] Use local EPR for all FTR runs on CI #116591
Comments
Pinging @elastic/fleet (Team:Fleet) |
Pinging @elastic/kibana-operations (Team:Operations) |
As part of my attempt to get test passing when re-enabling the registry version check, I explored this a bit: 2fd4ec1 I tried adding the
Plus we would be setting up a dockerized registry even though 99% of the functional/api_integration test suite doesn't need it. I've reverted my changes as the workaround of promoting necessary 8.0 packages to production is easier for now. |
Thanks for your effort here, @jen-huang. I think this will be less of a concern once we add support for bundled packages in #112095 |
@joshdover @jen-huang Is using a local version of EPR still the goal for this ticket? I had also tried adding docker to |
That is still the intention, yes. @elastic/kibana-operations I wonder if we should discuss long-term options here. It's likely that we increase the usage of packages across the product as time progresses and I think it'd be best if we default to a local EPR instance for all suites. Is there any technical reason we can't use |
Hi all, considering that the SynthRUM team has #116522 scheduled, I was wondering whether we should keep that one open and tackle it ourselves or whether this initiative has been taken over by the Fleet/Ops team and you will do the necessary updates? Asking because I'd like to know whether I should attempt an update or if you're already doing it/would like to do it yourselves. Thanks in advance 🙌 |
@lucasfcosta We don't have any immediate plans to address this for all of Kibana CI right now. What I would recommend is moving any functional tests that depend on packages to a separate functional suite that can be added to the docker CI group and use the same pattern we use in the Fleet functional tests. |
@joshdover, apologies as I don't fully understand the Fleet setup here. But did #122297 address some of the asks for this? Do we still need to run the EPR in CI now that we are downloading packages? |
We probably don't need to, though it is possible the build fails due to not being able to download packages, but so far I haven't seen that happen? @kpollich What do you think about removing the EPR docker images altogether? |
I believe it's true that we only assert on bundled packages in CI, but I'd want to verify. If that's the case it'd certainly be worth experimentation. The original motivation for dockerizing EPR in CI environments was to avoid network flakiness, I believe, which is still a potential issue with downloading bundled packages. The download process still needs to call out to EPR when we run the "build bundled packages" process. The way this works today in CI, we download bundled packages to This is a much lower amount of overall network requests than before the dockerized EPR service was introduced, though. We just make N requests "up front" to download bundled packages, then all tests should not incur any network requests. That reduction alone may be enough to avoid network flakiness since we're not making individual network requests per-package per-test at that point. Overall, I think removing the dockerized EPR instance from CI in favor of bundling packages under test would be worth exploring. |
This is a good point, if the build fails (which happens quite early in the CI process), then retrying is much less impactful since you don't have to wait 2 hours to find that a single test failed due to flakiness. +1 on experimenting with removing the dockerized EPR altogether. I'll open a new issue: #128522 |
Fleet relies on the the Elastic Package Registry to retrieve packages. As more teams start relying on packages, we're introducing more potential for Kibana's CI to break due to network or production issues with accessing EPR.
In Fleet's API integration tests, we instead run a local version of the registry that we update periodically. To reduce flakiness from all of CI, we should consider generalizing this and always using a local EPR instance in FTR runs (or at least making it the default FTR behavior).
This is how we configure this in Fleet:
kibana/x-pack/test/fleet_api_integration/config.ts
Lines 43 to 52 in acf0426
--xpack.fleet.registryUrl
CLI flag in the FTR config like this:kibana/x-pack/test/fleet_api_integration/config.ts
Line 65 in acf0426
kibana/x-pack/test/fleet_api_integration/apis/epm/get.ts
Line 40 in acf0426
Recent non-Fleet tests that seem to have failed due to temporary connectivity issues:
Example build:
The text was updated successfully, but these errors were encountered: