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

Simplify test code, reenable skipped suite #163158

Merged

Conversation

gsoldevila
Copy link
Contributor

@gsoldevila gsoldevila commented Aug 4, 2023

Attempt at fixing #149611

I updated the test code as follows:

  • Removed the RxJS logic and simply factorised the reads to read only once.
  • Got rid of the "retry" service. There's already a mechanism in place to make sure the logs are up-to-date.
  • Updated the setCommonlyUsedTime method to make sure it awaits for the popup to be ready before clicking.
  • Skipped 4 tests that seem outdated, the logs don't have the related entries even after waiting for more than one minute and flushing (in fact, they all seem to systematically fail on main too):
    • lnsLegacyMetric
    • [Flights] Delays & Cancellations
    • [Flights] Destination Weather
    • [Flights] Delay Buckets

Attached is the generated kibana.log (focussing only the browser.ts tests).

So for the skipped tests, this does not look like flakiness anymore, but rather outdated / incorrect checks. I propose we review and update them on a separate issue / PR.

50 runs results here.

@gsoldevila gsoldevila added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.10.0 v8.9.1 labels Aug 4, 2023
@gsoldevila gsoldevila requested a review from afharo August 4, 2023 11:17
@gsoldevila gsoldevila self-assigned this Aug 4, 2023
Copy link
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.

I'm happy with this approach. We are proving that the underlying core feature is working with the running tests.

Re the skipped ones, IIRC, the Sample Dashboards were revisited, and some visualizations have changed ever since this test was skipped.

We may ask other teams help to adapt the tests accordingly (is it @elastic/appex-sharedux or @elastic/kibana-presentation 🤷 ?)

await this.testSubjects.click('superDatePickerToggleQuickMenuButton');
await this.testSubjects.exists('`superDatePickerCommonlyUsed_${option}`', { timeout: 5000 });
Copy link
Member

Choose a reason for hiding this comment

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

Should this only use the backticks?

Suggested change
await this.testSubjects.exists('`superDatePickerCommonlyUsed_${option}`', { timeout: 5000 });
await this.testSubjects.exists(`superDatePickerCommonlyUsed_${option}`, { timeout: 5000 });

Copy link
Contributor Author

@gsoldevila gsoldevila Aug 31, 2023

Choose a reason for hiding this comment

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

Wait! How on earth did that not fail? will review this
UPDATE: this caused the exists check to wait for 5 seconds unnecessarily.
Fixing the malformed identifier should speed up the process.

@gsoldevila gsoldevila marked this pull request as ready for review August 31, 2023 10:35
@elasticmachine
Copy link
Contributor

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

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @gsoldevila

@gsoldevila
Copy link
Contributor Author

I created a separate issue to update + unskip the outdated tests:

#165308

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.10

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 31, 2023
Attempt at fixing elastic#149611

I updated the test code as follows:
* Removed the RxJS logic and simply factorised the reads to read only
once.
* Got rid of the "retry" service. There's already a mechanism in place
to make sure the logs are up-to-date.
* Updated the `setCommonlyUsedTime` method to make sure it awaits for
the popup to be ready before clicking.
* Skipped 4 tests that seem outdated, the logs don't have the related
entries even after waiting for more than one minute and flushing (in
fact, they all seem to systematically fail on `main` too):
  * lnsLegacyMetric
  * [Flights] Delays & Cancellations
  * [Flights] Destination Weather
  * [Flights] Delay Buckets

Attached is the generated
[kibana.log](https://github.com/elastic/kibana/files/12260144/kibana.log)
(focussing only the `browser.ts` tests).

So for the skipped tests, this does not look like flakiness anymore, but
rather outdated / incorrect checks. I propose we review and update them
on a separate issue / PR.

50 runs results
[here](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3026).

(cherry picked from commit a62d9a9)
kibanamachine added a commit that referenced this pull request Aug 31, 2023
# Backport

This will backport the following commits from `main` to `8.10`:
- [Simplify test code, reenable skipped suite
(#163158)](#163158)

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

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

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-31T13:09:19Z","message":"Simplify
test code, reenable skipped suite (#163158)\n\nAttempt at fixing
https://github.com/elastic/kibana/issues/149611\r\n\r\nI updated the
test code as follows:\r\n* Removed the RxJS logic and simply factorised
the reads to read only\r\nonce.\r\n* Got rid of the \"retry\" service.
There's already a mechanism in place\r\nto make sure the logs are
up-to-date.\r\n* Updated the `setCommonlyUsedTime` method to make sure
it awaits for\r\nthe popup to be ready before clicking.\r\n* Skipped 4
tests that seem outdated, the logs don't have the related\r\nentries
even after waiting for more than one minute and flushing (in\r\nfact,
they all seem to systematically fail on `main` too):\r\n *
lnsLegacyMetric\r\n * [Flights] Delays & Cancellations\r\n * [Flights]
Destination Weather\r\n * [Flights] Delay Buckets\r\n\r\nAttached is the
generated\r\n[kibana.log](https://github.com/elastic/kibana/files/12260144/kibana.log)\r\n(focussing
only the `browser.ts` tests).\r\n\r\nSo for the skipped tests, this does
not look like flakiness anymore, but\r\nrather outdated / incorrect
checks. I propose we review and update them\r\non a separate issue /
PR.\r\n\r\n50 runs
results\r\n[here](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3026).","sha":"a62d9a90f53c6ebec48d4982393c637cc73c26ac","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","test-failure-flaky","backport:prev-minor","v8.11.0"],"number":163158,"url":"https://github.com/elastic/kibana/pull/163158","mergeCommit":{"message":"Simplify
test code, reenable skipped suite (#163158)\n\nAttempt at fixing
https://github.com/elastic/kibana/issues/149611\r\n\r\nI updated the
test code as follows:\r\n* Removed the RxJS logic and simply factorised
the reads to read only\r\nonce.\r\n* Got rid of the \"retry\" service.
There's already a mechanism in place\r\nto make sure the logs are
up-to-date.\r\n* Updated the `setCommonlyUsedTime` method to make sure
it awaits for\r\nthe popup to be ready before clicking.\r\n* Skipped 4
tests that seem outdated, the logs don't have the related\r\nentries
even after waiting for more than one minute and flushing (in\r\nfact,
they all seem to systematically fail on `main` too):\r\n *
lnsLegacyMetric\r\n * [Flights] Delays & Cancellations\r\n * [Flights]
Destination Weather\r\n * [Flights] Delay Buckets\r\n\r\nAttached is the
generated\r\n[kibana.log](https://github.com/elastic/kibana/files/12260144/kibana.log)\r\n(focussing
only the `browser.ts` tests).\r\n\r\nSo for the skipped tests, this does
not look like flakiness anymore, but\r\nrather outdated / incorrect
checks. I propose we review and update them\r\non a separate issue /
PR.\r\n\r\n50 runs
results\r\n[here](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3026).","sha":"a62d9a90f53c6ebec48d4982393c637cc73c26ac"}},"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/163158","number":163158,"mergeCommit":{"message":"Simplify
test code, reenable skipped suite (#163158)\n\nAttempt at fixing
https://github.com/elastic/kibana/issues/149611\r\n\r\nI updated the
test code as follows:\r\n* Removed the RxJS logic and simply factorised
the reads to read only\r\nonce.\r\n* Got rid of the \"retry\" service.
There's already a mechanism in place\r\nto make sure the logs are
up-to-date.\r\n* Updated the `setCommonlyUsedTime` method to make sure
it awaits for\r\nthe popup to be ready before clicking.\r\n* Skipped 4
tests that seem outdated, the logs don't have the related\r\nentries
even after waiting for more than one minute and flushing (in\r\nfact,
they all seem to systematically fail on `main` too):\r\n *
lnsLegacyMetric\r\n * [Flights] Delays & Cancellations\r\n * [Flights]
Destination Weather\r\n * [Flights] Delay Buckets\r\n\r\nAttached is the
generated\r\n[kibana.log](https://github.com/elastic/kibana/files/12260144/kibana.log)\r\n(focussing
only the `browser.ts` tests).\r\n\r\nSo for the skipped tests, this does
not look like flakiness anymore, but\r\nrather outdated / incorrect
checks. I propose we review and update them\r\non a separate issue /
PR.\r\n\r\n50 runs
results\r\n[here](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3026).","sha":"a62d9a90f53c6ebec48d4982393c637cc73c26ac"}}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) 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 test-failure-flaky v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants