-
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
[esArchiver] Do not perform SO migration on cleanup #163302
Merged
gsoldevila
merged 22 commits into
elastic:main
from
gsoldevila:kbn-127545-do-not-migrate-on-cleanup
Sep 1, 2023
Merged
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
43cbad0
[esArchiver] Do not perform SO migration on cleanup
gsoldevila aae12cc
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila fc9e679
Unskip flaky suite
gsoldevila c603793
Fix incorrect tests
gsoldevila 15ca6b3
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila 0b9ba20
Make sure we go to the right Dashboard page
gsoldevila baa243c
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila 1cdecea
Add missing await statement
gsoldevila 2d0ee39
Fix the clickLink() issues
gsoldevila 04481ef
Make sure we go to the right Dashboards page
gsoldevila ba9f2d3
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila 7ed084d
Make sure `Download Report` popup is closed by each test
gsoldevila da54bc9
Clear toast notifications before generating / getting a report
gsoldevila d186adb
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila c8c5f9a
Wait for the welcome interstitial to be fully visible (500ms)
gsoldevila d9b2ccf
Add more logging for failed requests at Kibana level
gsoldevila 733f8ff
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila 7708424
Update snapshots with latest logging enhancements
gsoldevila ea25549
Update logged requests to NOT include the hostname
gsoldevila fda0195
Revert changes in router.ts (separate PR)
gsoldevila e1d93c1
Undo changes in router.test.ts
gsoldevila 4870c7f
Merge branch 'main' into kbn-127545-do-not-migrate-on-cleanup
gsoldevila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
At the moment we call SO migration during esArchive loading and only if it modified
.kibana
indexkibana/packages/kbn-es-archiver/src/actions/load.ts
Lines 109 to 118 in a29e4aa
If I understand correctly, in
.kibana
cleanup SO migration was from the start (added 5 years ago):c64624a#diff-b22ea1611642a7e2cdc07bce3086e1b7e260f075fb08fdc9c2ae67ecf3742444R23-R24
Could you provide more context here. Since many tests call
await esArchiver.emptyKibanaIndex();
I would like to understand if not running SO migrations is desired behaviour for cleanup or it should be optionally run for some cases?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.
Many of those
esArchiver.emptyKibanaIndex()
calls were added in #85778@rudolf do you think we can safely remove migration from that call and be sure it will work for all those cases?
started flaky-test-runner to check those tests https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2851
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.
Let's consider the following groups of tests that use
esArchiver
:1. Tests where we have deleted the
mappings.json
definitions. We are implicitly using the "official" saved object indices created by Kibana at startup, which are already aligned with the current stack version. In these cases, there's no need to "realign" them. On the contrary, doing so triggers unnecessary migrations that can cause errors + flakiness.2. Tests that don't define saved object indices. There are a few tests that use
esArchiver
archives that DON'T define saved object indices (they define other indices). For these tests, we fall in the same scenario as (1), i.e. we are not recreating the "official" indices created by Kibana, and thus there's no need to "realign" them.3. Tests that define
.kibana
index (and perhaps other saved object indices) inmappings.json
. If some of these tests are callingesArchiver.emptyKibanaIndex()
, they could be impacted by this PR, as we are no longer migrating on cleanup. But so far CI hasn't complained, and I'm on a crusade to remove them all.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.
yeah quite a lot has changed since #85778 and I agree with @gsoldevila that (3) should be the only tests likely to be impacted.
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.
Thanks for the details, especially great to hear you are working on those tests removal.
@gsoldevila I guess there is not much we can do in esArchiver code to prevent someone from adding new test suites with loading SO indexes and calling
emptyKibanaIndex
later in the test? We still need to load SO indexes with custom mappings for some scenarios, right?Maybe leaving a comment to the
emptyKibanaIndex
function is a good thing to have.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, if/when I manage to remove all SO index definitions from
mappings.json
, I can throw an exception fromesArchiver
side, saying that defining such indices is no longer supported.