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

[Dataset Quality] Fix tests for degraded fields flyout #202288

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

tonyghiani
Copy link
Contributor

@tonyghiani tonyghiani commented Nov 29, 2024

📓 Summary

Closes #198849
Closes #200287
Closes #201273
Closes #201975

The above issues were raised with similar conditions which converged in the following assumptions:

  • They are raised due to timeout identifying a visual element on the degraded fields flyout.
  • They are raised due to a missing UI element, which is part of a common sub-tree conditionally rendered when the data analysis is completed.
  • They are raised in serverless tests, where the latency might be randomly higher.

Given the nature of these tests, which locally always pass correctly given the fastest nature of a local setup, I assume these random failures are due to latency on the common request gating the rendering of these sections.

As a fix, I added a wait on the global loading indicator before the assertions, which should wait for the data loading to be completed before running the assertions on the UI elements.

@tonyghiani tonyghiani added Team:obs-ux-logs Observability Logs User Experience Team 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) labels Nov 29, 2024
@mohamedhamed-ahmed
Copy link
Contributor

I think this is a good solution give we never know when these components are going to be available so increasing timeouts wouldn't work.
In this case do we still need all the await retry.tryForTime?

@tonyghiani
Copy link
Contributor Author

In this case do we still need all the await retry.tryForTime?

Some tests also rely on changes on the UI components which might not be immediate, I would leave those retries as they are since I don't know which ones are fixing previous issues. If the element is already there, the retry won't wait for the whole time anyway.

Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Thank you 🚀

@tonyghiani tonyghiani marked this pull request as ready for review November 29, 2024 13:59
@tonyghiani tonyghiani requested a review from a team as a code owner November 29, 2024 13:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7537

[✅] x-pack/test_serverless/functional/test_suites/observability/config.ts: 50/50 tests passed.

see run history

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@tonyghiani tonyghiani merged commit d13904e into elastic:main Dec 2, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12118005054

@tonyghiani tonyghiani deleted the fix/dataset-quality-tests branch December 2, 2024 11:07
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 2, 2024
## 📓 Summary

Closes elastic#198849
Closes elastic#200287
Closes elastic#201273
Closes elastic#201975

The above issues were raised with similar conditions which converged in
the following assumptions:
- They are raised due to timeout identifying a visual element on the
degraded fields flyout.
- They are raised due to a missing UI element, which is part of a common
sub-tree conditionally rendered when the data analysis is completed.
- They are raised in serverless tests, where the latency might be
randomly higher.

Given the nature of these tests, which locally always pass correctly
given the fastest nature of a local setup, I assume these random
failures are due to latency on the common request gating the rendering
of these sections.

As a fix, I added a wait on the global loading indicator before the
assertions, which should wait for the data loading to be completed
before running the assertions on the UI elements.

Co-authored-by: Marco Antonio Ghiani <[email protected]>
(cherry picked from commit d13904e)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 2, 2024
#202432)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Dataset Quality] Fix tests for degraded fields flyout
(#202288)](#202288)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-02T11:04:48Z","message":"[Dataset
Quality] Fix tests for degraded fields flyout (#202288)\n\n## 📓
Summary\r\n\r\nCloses #198849 \r\nCloses #200287 \r\nCloses #201273
\r\nCloses #201975 \r\n\r\nThe above issues were raised with similar
conditions which converged in\r\nthe following assumptions:\r\n- They
are raised due to timeout identifying a visual element on
the\r\ndegraded fields flyout.\r\n- They are raised due to a missing UI
element, which is part of a common\r\nsub-tree conditionally rendered
when the data analysis is completed.\r\n- They are raised in serverless
tests, where the latency might be\r\nrandomly higher.\r\n\r\nGiven the
nature of these tests, which locally always pass correctly\r\ngiven the
fastest nature of a local setup, I assume these random\r\nfailures are
due to latency on the common request gating the rendering\r\nof these
sections.\r\n\r\nAs a fix, I added a wait on the global loading
indicator before the\r\nassertions, which should wait for the data
loading to be completed\r\nbefore running the assertions on the UI
elements.\r\n\r\nCo-authored-by: Marco Antonio Ghiani
<[email protected]>","sha":"d13904eb6596edd51e4d52aa74c24c070be3ce5c","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-logs"],"title":"[Dataset
Quality] Fix tests for degraded fields
flyout","number":202288,"url":"https://github.com/elastic/kibana/pull/202288","mergeCommit":{"message":"[Dataset
Quality] Fix tests for degraded fields flyout (#202288)\n\n## 📓
Summary\r\n\r\nCloses #198849 \r\nCloses #200287 \r\nCloses #201273
\r\nCloses #201975 \r\n\r\nThe above issues were raised with similar
conditions which converged in\r\nthe following assumptions:\r\n- They
are raised due to timeout identifying a visual element on
the\r\ndegraded fields flyout.\r\n- They are raised due to a missing UI
element, which is part of a common\r\nsub-tree conditionally rendered
when the data analysis is completed.\r\n- They are raised in serverless
tests, where the latency might be\r\nrandomly higher.\r\n\r\nGiven the
nature of these tests, which locally always pass correctly\r\ngiven the
fastest nature of a local setup, I assume these random\r\nfailures are
due to latency on the common request gating the rendering\r\nof these
sections.\r\n\r\nAs a fix, I added a wait on the global loading
indicator before the\r\nassertions, which should wait for the data
loading to be completed\r\nbefore running the assertions on the UI
elements.\r\n\r\nCo-authored-by: Marco Antonio Ghiani
<[email protected]>","sha":"d13904eb6596edd51e4d52aa74c24c070be3ce5c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202288","number":202288,"mergeCommit":{"message":"[Dataset
Quality] Fix tests for degraded fields flyout (#202288)\n\n## 📓
Summary\r\n\r\nCloses #198849 \r\nCloses #200287 \r\nCloses #201273
\r\nCloses #201975 \r\n\r\nThe above issues were raised with similar
conditions which converged in\r\nthe following assumptions:\r\n- They
are raised due to timeout identifying a visual element on
the\r\ndegraded fields flyout.\r\n- They are raised due to a missing UI
element, which is part of a common\r\nsub-tree conditionally rendered
when the data analysis is completed.\r\n- They are raised in serverless
tests, where the latency might be\r\nrandomly higher.\r\n\r\nGiven the
nature of these tests, which locally always pass correctly\r\ngiven the
fastest nature of a local setup, I assume these random\r\nfailures are
due to latency on the common request gating the rendering\r\nof these
sections.\r\n\r\nAs a fix, I added a wait on the global loading
indicator before the\r\nassertions, which should wait for the data
loading to be completed\r\nbefore running the assertions on the UI
elements.\r\n\r\nCo-authored-by: Marco Antonio Ghiani
<[email protected]>","sha":"d13904eb6596edd51e4d52aa74c24c070be3ce5c"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
## 📓 Summary

Closes elastic#198849 
Closes elastic#200287 
Closes elastic#201273 
Closes elastic#201975 

The above issues were raised with similar conditions which converged in
the following assumptions:
- They are raised due to timeout identifying a visual element on the
degraded fields flyout.
- They are raised due to a missing UI element, which is part of a common
sub-tree conditionally rendered when the data analysis is completed.
- They are raised in serverless tests, where the latency might be
randomly higher.

Given the nature of these tests, which locally always pass correctly
given the fastest nature of a local setup, I assume these random
failures are due to latency on the common request gating the rendering
of these sections.

As a fix, I added a wait on the global loading indicator before the
assertions, which should wait for the data loading to be completed
before running the assertions on the UI elements.

Co-authored-by: Marco Antonio Ghiani <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## 📓 Summary

Closes elastic#198849 
Closes elastic#200287 
Closes elastic#201273 
Closes elastic#201975 

The above issues were raised with similar conditions which converged in
the following assumptions:
- They are raised due to timeout identifying a visual element on the
degraded fields flyout.
- They are raised due to a missing UI element, which is part of a common
sub-tree conditionally rendered when the data analysis is completed.
- They are raised in serverless tests, where the latency might be
randomly higher.

Given the nature of these tests, which locally always pass correctly
given the fastest nature of a local setup, I assume these random
failures are due to latency on the common request gating the rendering
of these sections.

As a fix, I added a wait on the global loading indicator before the
assertions, which should wait for the data loading to be completed
before running the assertions on the UI elements.

Co-authored-by: Marco Antonio Ghiani <[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:obs-ux-logs Observability Logs User Experience Team v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing test: Serverless Observability Functional Tests.x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout·ts - serverless observability UI Dataset Quality Degraded fields flyout testing root cause for ignored fields current field limit issues should display additional input fields and button increasing the limit for integrations Failing test: Serverless Observability Functional Tests.x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout·ts - serverless observability UI Dataset Quality Degraded fields flyout testing root cause for ignored fields character limit exceeded should show possible mitigation section with different manual options for integrations Failing test: Serverless Observability Functional Tests.x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout·ts - serverless observability UI Dataset Quality Degraded fields flyout testing root cause for ignored fields current field limit issues should let user increase the field limit for integrations Failing test: Serverless Observability Functional Tests.x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout·ts - serverless observability UI Dataset Quality Degraded fields flyout testing root cause for ignored fields current field limit issues should validate and show error callout when API call fails
5 participants