Skip to content
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

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Aug 7, 2023

Summary

Attempt at fixing #127545

The failing tests use esArchiver to cleanup Saved Object indices between tests.
Strangely, the cleanup method calls the migration logic to update the SO indices.

In this particular source of flakiness, a test fails during the migration (problem is tracked by #163289).

Performing a migration as part of the cleanup does not make too much sense (at least in this test suite), so the goal of this PR is to simplify the cleanup operation, getting rid of the call to migrateSavedObjectIndices.

50 runs flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes test-failure-flaky backport:all-open Backport to all branches that could still receive a release v8.10.0 v8.9.1 v7.17.13 labels Aug 7, 2023
@gsoldevila gsoldevila added the bug Fixes for quality problems that affect the customer experience label Aug 9, 2023
@gsoldevila gsoldevila marked this pull request as ready for review August 10, 2023 17:29
@gsoldevila gsoldevila requested review from a team as code owners August 10, 2023 17:29
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

test/examples/search/warnings.ts change LGTM

@afharo
Copy link
Member

afharo commented Aug 11, 2023

@gsoldevila, can we run the Flaky Test runner to confirm the flakiness is gone?

@gsoldevila
Copy link
Contributor Author

@gsoldevila, can we run the Flaky Test runner to confirm the flakiness is gone?

Running on https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM, great work!

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #37 / discover Discover Saved Searches Customize time range should be possible to customize time range for saved searches on dashboards

Metrics [docs]

✅ unchanged

History

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

@gsoldevila
Copy link
Contributor Author

gsoldevila commented Sep 1, 2023

I investigated the flakiness of the last CI build, will create a separate PR for it.
@elastic/kibana-qa FYI I created a separate PR to tackle that flakiness #165454

@gsoldevila gsoldevila merged commit f8303ec into elastic:main Sep 1, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 1, 2023
## Summary

Attempt at fixing elastic#127545

The failing tests use `esArchiver` to cleanup Saved Object indices
between tests.
Strangely, the cleanup method calls the migration logic to update the SO
indices.

In this particular source of flakiness, a test fails during the
migration (problem is tracked by
elastic#163289).

Performing a migration as part of the cleanup does not make too much
sense (at least in this test suite), so the goal of this PR is to
simplify the cleanup operation, getting rid of the call to
`migrateSavedObjectIndices`.

50 runs flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850
✅

(cherry picked from commit f8303ec)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.10
8.9 Backport failed because of merge conflicts

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 163302

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 1, 2023
…165451)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[esArchiver] Do not perform SO migration on cleanup
(#163302)](#163302)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2023-09-01T10:41:20Z","message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","Team:Operations","release_note:skip","test-failure-flaky","backport:all-open","v8.11.0"],"number":163302,"url":"https://github.com/elastic/kibana/pull/163302","mergeCommit":{"message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163302","number":163302,"mergeCommit":{"message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
@gsoldevila
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

gsoldevila added a commit to gsoldevila/kibana that referenced this pull request Sep 4, 2023
## Summary

Attempt at fixing elastic#127545

The failing tests use `esArchiver` to cleanup Saved Object indices
between tests.
Strangely, the cleanup method calls the migration logic to update the SO
indices.

In this particular source of flakiness, a test fails during the
migration (problem is tracked by
elastic#163289).

Performing a migration as part of the cleanup does not make too much
sense (at least in this test suite), so the goal of this PR is to
simplify the cleanup operation, getting rid of the call to
`migrateSavedObjectIndices`.

50 runs flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850
✅

(cherry picked from commit f8303ec)

# Conflicts:
#	packages/kbn-es-archiver/src/actions/empty_kibana_index.ts
#	test/examples/search/warnings.ts
@gsoldevila
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
7.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

gsoldevila added a commit that referenced this pull request Sep 25, 2023
…165566)

# Backport

This will backport the following commits from `main` to `7.17`:
- [[esArchiver] Do not perform SO migration on cleanup
(#163302)](#163302)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2023-09-01T10:41:20Z","message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Core","Team:Operations","release_note:skip","test-failure-flaky","backport:all-open","v8.10.0","v8.11.0"],"number":163302,"url":"https://github.com/elastic/kibana/pull/163302","mergeCommit":{"message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/165451","number":165451,"state":"MERGED","mergeCommit":{"sha":"8ea7cee5003c3bfb550da9ab1fab8e9bfe820250","message":"[8.10]
[esArchiver] Do not perform SO migration on cleanup (#163302)
(#165451)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.10`:\n- [[esArchiver] Do not perform SO migration on
cleanup\n(#163302)](https://github.com/elastic/kibana/pull/163302)\n\n<!---
Backport version: 8.9.7 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Gerard\nSoldevila\",\"email\":\"gerard.soldevila@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2023-09-01T10:41:20Z\",\"message\":\"[esArchiver]\nDo
not perform SO migration on cleanup
(#163302)\\n\\n##\nSummary\\r\\n\\r\\nAttempt at
fixing\nhttps://github.com//issues/127545\\r\\n\\r\\nThe
failing tests\nuse `esArchiver` to cleanup Saved Object
indices\\r\\nbetween\ntests.\\r\\nStrangely, the cleanup method calls
the migration logic to\nupdate the SO\\r\\nindices.\\r\\n\\r\\nIn this
particular source of flakiness,\na test fails during the\\r\\nmigration
(problem is
tracked\nby\\r\\nhttps://github.com//issues/163289).\\r\\n\\r\\nPerforming\na
migration as part of the cleanup does not make too much\\r\\nsense
(at\nleast in this test suite), so the goal of this PR is
to\\r\\nsimplify the\ncleanup operation, getting rid of the
call\nto\\r\\n`migrateSavedObjectIndices`.\\r\\n\\r\\n50 runs flaky
test\nrunner\\r\\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\\r\\n✅\",\"sha\":\"f8303ec7cf57aa8787331ada397dfa853de969c9\",\"branchLabelMapping\":{\"^v8.11.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"bug\",\"Team:Core\",\"Team:Operations\",\"release_note:skip\",\"test-failure-flaky\",\"backport:all-open\",\"v8.11.0\"],\"number\":163302,\"url\":\"https://github.com/elastic/kibana/pull/163302\",\"mergeCommit\":{\"message\":\"[esArchiver]\nDo
not perform SO migration on cleanup
(#163302)\\n\\n##\nSummary\\r\\n\\r\\nAttempt at
fixing\nhttps://github.com//issues/127545\\r\\n\\r\\nThe
failing tests\nuse `esArchiver` to cleanup Saved Object
indices\\r\\nbetween\ntests.\\r\\nStrangely, the cleanup method calls
the migration logic to\nupdate the SO\\r\\nindices.\\r\\n\\r\\nIn this
particular source of flakiness,\na test fails during the\\r\\nmigration
(problem is
tracked\nby\\r\\nhttps://github.com//issues/163289).\\r\\n\\r\\nPerforming\na
migration as part of the cleanup does not make too much\\r\\nsense
(at\nleast in this test suite), so the goal of this PR is
to\\r\\nsimplify the\ncleanup operation, getting rid of the
call\nto\\r\\n`migrateSavedObjectIndices`.\\r\\n\\r\\n50 runs flaky
test\nrunner\\r\\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\\r\\n✅\",\"sha\":\"f8303ec7cf57aa8787331ada397dfa853de969c9\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.11.0\",\"labelRegex\":\"^v8.11.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/163302\",\"number\":163302,\"mergeCommit\":{\"message\":\"[esArchiver]\nDo
not perform SO migration on cleanup
(#163302)\\n\\n##\nSummary\\r\\n\\r\\nAttempt at
fixing\nhttps://github.com//issues/127545\\r\\n\\r\\nThe
failing tests\nuse `esArchiver` to cleanup Saved Object
indices\\r\\nbetween\ntests.\\r\\nStrangely, the cleanup method calls
the migration logic to\nupdate the SO\\r\\nindices.\\r\\n\\r\\nIn this
particular source of flakiness,\na test fails during the\\r\\nmigration
(problem is
tracked\nby\\r\\nhttps://github.com//issues/163289).\\r\\n\\r\\nPerforming\na
migration as part of the cleanup does not make too much\\r\\nsense
(at\nleast in this test suite), so the goal of this PR is
to\\r\\nsimplify the\ncleanup operation, getting rid of the
call\nto\\r\\n`migrateSavedObjectIndices`.\\r\\n\\r\\n50 runs flaky
test\nrunner\\r\\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\\r\\n✅\",\"sha\":\"f8303ec7cf57aa8787331ada397dfa853de969c9\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Gerard Soldevila
<gerard.soldevila@elastic.co>"}},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/163302","number":163302,"mergeCommit":{"message":"[esArchiver]
Do not perform SO migration on cleanup (#163302)\n\n##
Summary\r\n\r\nAttempt at fixing
https://github.com/elastic/kibana/issues/127545\r\n\r\nThe failing tests
use `esArchiver` to cleanup Saved Object indices\r\nbetween
tests.\r\nStrangely, the cleanup method calls the migration logic to
update the SO\r\nindices.\r\n\r\nIn this particular source of flakiness,
a test fails during the\r\nmigration (problem is tracked
by\r\nhttps://github.com//issues/163289).\r\n\r\nPerforming
a migration as part of the cleanup does not make too much\r\nsense (at
least in this test suite), so the goal of this PR is to\r\nsimplify the
cleanup operation, getting rid of the call
to\r\n`migrateSavedObjectIndices`.\r\n\r\n50 runs flaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850\r\n✅","sha":"f8303ec7cf57aa8787331ada397dfa853de969c9"}}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:all-open Backport to all branches that could still receive a release bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Operations Team label for Operations Team test-failure-flaky v7.17.14 v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants