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

[Lens] Add serverless functional tests #164798

Merged
merged 48 commits into from
Oct 4, 2023

Conversation

nickofthyme
Copy link
Contributor

@nickofthyme nickofthyme commented Aug 25, 2023

Summary

This PR copies, with limited modifications, functional test suites from test/functional and x-pack/test/functional

Lens Smoke tests

  • Smokescreen tests (x-pack/test/functional/apps/lens/group1/smokescreen.ts)
  • Basic vega tests (test/functional/apps/visualize/group6/_vega_chart.ts)
  • Sanity checks for TSDB functionality in Lens x-pack/test/functional/apps/lens/group4/tsdb.ts

Convert to Lens

These tests outside of serverless, assume the following vis types are accessible via the Visualize editor, however all the following types are designated readonly in serverless and thus the fn tests fail.

In place of these tests I created the identical visualizations, added them to a dashboard and exported the SOs. These dashboard and dependent visualizations are loaded in each respective test, and the assertions are run on the Convert to Lens option from the dashboard. All assertions are mostly unchanged or achieve the same effect.

  • ✅ Agg based - x-pack/test/functional/apps/lens/open_in_lens/agg_based
  • ✅ TSVB - x-pack/test/functional/apps/lens/open_in_lens/tsvb
  • ❌ Dashboard - x-pack/test/functional/apps/lens/open_in_lens/dashboard/config.ts
    • Not applicable to serverless env and/or duplicate of other tests.

Closes #162346

- Fix spelling error
- Add Lens helper to set ech debug state
- Remove list table dashboard search escape
@nickofthyme nickofthyme marked this pull request as ready for review August 30, 2023 17:14
@nickofthyme nickofthyme requested review from a team as code owners August 30, 2023 17:14
@nickofthyme nickofthyme requested a review from stratoula August 30, 2023 17:15
Copy link
Contributor

@Ikuni17 Ikuni17 left a comment

Choose a reason for hiding this comment

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

OPs changes LGTM. Please hold off on merging this until #162673 has been merged though (should be today). Then merge main and we can test against a full serverless environment. Thanks!

@nickofthyme nickofthyme added the release_note:skip Skip the PR/issue when compiling release notes label Aug 30, 2023
@nickofthyme nickofthyme added backport:skip This commit does not require backporting blocked labels Sep 28, 2023
@pheyos
Copy link
Member

pheyos commented Sep 29, 2023

@nickofthyme @stratoula serverless common config grouping is merged now (#167172).

With that, you can add more common config files to x-pack/test_serverless/functional/test_suites/[observability|search|security]/common_configs and include proper chunks of your added common tests, so run time of each config is ideally less than ~10-15 minutes.

Don't forget to also add your config files to .buildkite/ftr_configs.yml.

@stratoula stratoula removed the blocked label Sep 29, 2023
@nickofthyme
Copy link
Contributor Author

@stratoula I moved the visualizations/ tests into their own config files and still get the kibanaChrome error.

1) Visualizations

  lens serverless - group 1
  lens smokescreen tests
  should allow creation of lens xy chart:
   
  Error: retry.tryForTime timeout: Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="kibanaChrome"])
  Wait timed out after 61118ms
  at /var/lib/buildkite-agent/builds/kb-n2-4-spot-39f9407726eaba6f/elastic/kibana-pull-request/kibana/node_modules/selenium-webdriver/lib/webdriver.js:929:17
  at processTicksAndRejections (node:internal/process/task_queues:95:5)
  at onFailure (retry_for_success.ts:17:9)
  at retryForSuccess (retry_for_success.ts:59:13)
  at RetryService.try (retry.ts:31:12)
  at common_page.ts:273:21
  at runAttempt (retry_for_success.ts:29:15)
  at retryForSuccess (retry_for_success.ts:68:21)
  at RetryService.tryForTime (retry.ts:22:12)
  at CommonPageObject.navigateToApp (common_page.ts:272:5)
  at VisualizePageObject.gotoVisualizationLandingPage (visualize_page.ts:69:5)
  at VisualizePageObject.navigateToNewVisualization (visualize_page.ts:145:5)
  at Context.<anonymous> (smokescreen.ts:24:7)
  at Object.apply (wrap_function.js:73:16)
  at onFailure (retry_for_success.ts:17:9)
  at retryForSuccess (retry_for_success.ts:59:13)
  at RetryService.tryForTime (retry.ts:22:12)
  at CommonPageObject.navigateToApp (common_page.ts:272:5)
  at VisualizePageObject.gotoVisualizationLandingPage (visualize_page.ts:69:5)
  at VisualizePageObject.navigateToNewVisualization (visualize_page.ts:145:5)
  at Context.<anonymous> (smokescreen.ts:24:7)
  at Object.apply (wrap_function.js:73:16)

Looks like there are 33 issues of failed tests with similar issues here. Have you heard anything about this? The error screenshots point to an authentication problem.

image

@stratoula
Copy link
Contributor

No 🤔 @pheyos or maybe @davismcphee do you have any idea which is the problem here?

@davismcphee
Copy link
Contributor

@nickofthyme @stratoula If it's failing consistently it's possible there's a missing call to await PageObjects.svlCommonPage.login(); in the test. But if it's failing intermittently, it's likely the same cause as other tests, Serverless CI instability. I think the hope was that this PR would resolve the issue in CI, but it seems we're still seeing the failures: #166936.

@pheyos
Copy link
Member

pheyos commented Oct 4, 2023

@davismcphee @nickofthyme @stratoula there was an issue on the Elasticsearch side that caused the login/logout flakiness in serverless. A fix is merged now on their end and during first checks on the flaky test runner, the flakiness didn't come up again. So we should hopefully be good now 🤞

@nickofthyme nickofthyme enabled auto-merge (squash) October 4, 2023 18:46
@nickofthyme nickofthyme merged commit 0f1a6e3 into elastic:main Oct 4, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #16 / AIOps POST /internal/aiops/log_rate_analysis - groups only with ecommerce should return group only in chunks with streaming without compression without flushFix

Metrics [docs]

✅ unchanged

History

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

@nickofthyme nickofthyme deleted the lens-serverless-fnt branch October 4, 2023 20:33
dmlemeshko added a commit that referenced this pull request Oct 6, 2023
## Summary

After [164798](#164798) was merged
CI singnificantly slowed down because f these FTR groups:

```
x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts: 75.6 minutes
x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts: 75 minutes
x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts: 74.7 minutes
```

This PR splits each group into 3.
dej611 pushed a commit to dej611/kibana that referenced this pull request Oct 17, 2023
## Summary

After [164798](elastic#164798) was merged
CI singnificantly slowed down because f these FTR groups:

```
x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts: 75.6 minutes
x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts: 75 minutes
x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts: 74.7 minutes
```

This PR splits each group into 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Visualizations] add Serverless functional tests
9 participants