Skip to content

[Migrations] Fix integration tests that use ZIP archives that are not compatible with 9.0.0#193856

Merged
gsoldevila merged 8 commits intoelastic:mainfrom
gsoldevila:kbn-team-1113-upgrade-migration-tests-2
Sep 26, 2024
Merged

[Migrations] Fix integration tests that use ZIP archives that are not compatible with 9.0.0#193856
gsoldevila merged 8 commits intoelastic:mainfrom
gsoldevila:kbn-team-1113-upgrade-migration-tests-2

Conversation

@gsoldevila
Copy link
Copy Markdown
Member

@gsoldevila gsoldevila commented Sep 24, 2024

@gsoldevila gsoldevila added Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// release_note:skip Skip the PR/issue when compiling release notes Feature:Migrations labels Sep 24, 2024
@gsoldevila gsoldevila requested a review from a team as a code owner September 24, 2024 12:09
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-core (Team:Core)

Copy link
Copy Markdown
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I just added a few nits for your consideration.

@@ -0,0 +1,292 @@
/*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this one might need its own group, as starting multiple Kibanas, with delays increase the execution time, and the chances of failing due to timeouts (and retrying the whole CI job).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already has its own group, there aren't any other tests in group2 anymore 😛 .
I will increase jest timeout though, thanks for raising the poing

Comment on lines +77 to +88
afterEach(async () => {
checkMigratorsResults();
await checkIndicesInfo();
await checkSavedObjectDocuments();
await checkMigratorsSteps();
await checkUpToDateOnRestart();
});

afterEach(async () => {
await esServer?.stop();
await delay(5); // give it a few seconds... cause we always do ¯\_(ツ)_/¯
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 afterEach where esServer can be stopped before completing the checks in the other afterEach.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's a good catch, will put them together + finally block.

Comment on lines +77 to +83
afterEach(async () => {
checkMigratorsResults();
await checkIndicesInfo();
await checkSavedObjectDocuments();
await checkMigratorsSteps();
await checkUpToDateOnRestart();
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the shared piece of code, but it feels weird to run the validations in the after phase.

I wonder if an it.each with a table format (description and delay) that runs startWithDelay + these checks is better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, will update it

@@ -0,0 +1,292 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's another file multiple_es_nodes. Should we specify this one to be multi_kb_node_split?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted proposal, will rename to to multiple_kb_nodes

@gsoldevila gsoldevila changed the title [Migrations] Create multi_node_split test [Migrations] Create multiple_kb_nodes test Sep 24, 2024
@gsoldevila gsoldevila changed the title [Migrations] Create multiple_kb_nodes test [Migrations] Fix integration tests that use ZIP archives that are not compatible with 9.0.0 Sep 25, 2024
@gsoldevila gsoldevila added backport:skip This PR does not require backporting and removed backport:prev-minor labels Sep 26, 2024
@gsoldevila gsoldevila enabled auto-merge (squash) September 26, 2024 08:09
@gsoldevila
Copy link
Copy Markdown
Member Author

Already backported with #194013

@afharo
Copy link
Copy Markdown
Member

afharo commented Sep 26, 2024

Already backported with #194013

I think you meant to post that comment in #193328, right?

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Integration Tests #2 / migration actions reindex & waitForReindexTask resolves left wait_for_task_completion_timeout when the task does not finish within the timeout

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@gsoldevila gsoldevila merged commit ac96a4c into elastic:main Sep 26, 2024
@gsoldevila
Copy link
Copy Markdown
Member Author

I think you meant to post that comment in #193328, right?

In fact #194013 will backport multiple of the tests' updates:

There are dependencies between them, and on top of that I need to generate the 8.16.0 baseline zip archives (wrote a test for that). If I backport them one by one it'll take ages.

This was referenced Sep 26, 2024
gsoldevila added a commit that referenced this pull request Sep 27, 2024
# Backport

This will backport the following PRs from `main` to `8.x`:
 - #193328
 - #193856
 - #193696
 - #194151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Migrations release_note:skip Skip the PR/issue when compiling release notes Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants