-
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
v2 migrations adds significant CI overhead #91618
Comments
@LeeDr @wayneseymour Do you have a target for completing #89368? |
Pinging @elastic/kibana-operations (Team:Operations) |
Pinging @elastic/kibana-core (Team:Core) |
I suspect the overhead will decrease as more plugins migrate to the SO API. |
I'm working with @wayneseymour on getting that PR ready for merge ASAP, as for migrating all our |
Are we sure v2 migrations is adding that much time? I'm getting set up to run locally, but from one case on a recent master Jenkins job it looks like it took just over 2 seconds ( Most of our tests have very few saved objects. A dashboard test, for example, might have up to a dozen or so visualizations that it will add to a dashboard. Maybe there's some fleet tests or others that actually do have a lot?
|
While investigating flakiness we were seeing this weekend I was suspicious about the increase in build time and started stepping back through the https://kibana-ci.elastic.co/job/elastic+kibana+master/ build, and the point where the overall build time changed from ~1h45m to ~2h10m was the build where v2 migrations were enabled in the FTR. Those builds are no longer available in Jenkins, but I can put up a PR reverting the source PR to show the change in execution time if you want to see it. |
I started running functional tests locally while looking at the migration start/end times. I see most of them only take about 4 seconds but we probably do it hundreds of times through the whole CI run. But @spalger is also right that switching tests to use saved object import isn't going to happen quickly or for every test.
|
yeah, v2 migrations are only a few seconds slower, but it really adds up over hundreds of tests that load new data. |
Tre' (@wayneseymour) is starting to make good progress on this now. But there's a lot of tests. We're trying to remove cases where we |
Closing as moving tests to kbnArchiver will remove the migrationsv2 overhead #102552 |
v2 migrations causes the CI run to take 15 minutes longer on average which consumes significant CI resources. In short, the v2 migrations have a lot more steps and do a lot more work so they're much slower especially for small data sets like our tests.
This has caused Jenkins timeouts and although infra bumped the limits, there's still a concern that we're adding this much extra time to CI for something that isn't directly testing v2 migrations and only marginally improving our confidence in the code.
The medium term solution is to use the SO import API to load test fixtures instead of having esArchiver writing potentially outdated documents directly into the index. This will avoid Kibana having to run a full migration every time fixtures are needed as objects will be migrated in memory before they're written which would theoretically be even faster than using a full v1 migration. The QA team has already started working on this #89368.
In the short term we have two options:
Use v1 migrations (Disable v2 migrations to speed-up FTR #91402). This is a quick fix, but prevents us from removing the v1 code which we would ideally do as soon as we have confidence that the v2 migrations are stable (v7.13 at the earliest, but possibly v7.14)The text was updated successfully, but these errors were encountered: