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

[BUG][Main] Fix flaky test cases for bundled OpenSearch Dashboards plugins #133

Closed
tianleh opened this issue Mar 16, 2022 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@tianleh
Copy link
Member

tianleh commented Mar 16, 2022

What is the bug?

We have noticed flaky test when running the test cases for Dashboards plugins. To collect enough data points for analysis, we have set up multiple Github workflows against different browsers every three hours. By analyzing the past 10 failed runs, below is a summary of the frequency of failure.

Test File Plugin Owner Failed Times (out of 10)
plugins/anomaly-detection-dashboards-plugin/create_detector_spec.js anomaly-detection-dashboards 8
plugins/anomaly-detection-dashboards-plugin/detector_list_spec.js anomaly-detection-dashboards 2
plugins/index-management-dashboards-plugin/policies_spec.js index-management-dashboards 6
plugins/observability-dashboards/trace_analytics_traces.spec.js observability-dashboards 1
plugins/anomaly-detection-dashboards-plugin/overview_spec.js anomaly-detection-dashboards 3
plugins/anomaly-detection-dashboards-plugin/detector_configuration_spec.js anomaly-detection-dashboards 1
plugins/observability-dashboards/panels.spec.js observability-dashboards 3
plugins/observability-dashboards/app_analytics.spec.js observability-dashboards 2
plugins/reports-dashboards/03-details.spec.js reports-dashboards 1

How can one reproduce the bug?
https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions?query=event%3Aschedule

What is the expected behavior?
We shall see all test cases pass.

What is your host/environment?

  • OS: Github hosted Ubuntu latest

Do you have any screenshots?
Every workflow will upload the video. Use this as an example https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/1987477734

Do you have any additional context?
Note that when running from Jenkins Docker env, we are seeing more flaky test cases due to the less empowered execution env. We will consolidate and share the results later. E.g a recent Jenkins run has the following result (You may need to save the file locally or use curl to view it)
https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.0/1511/linux/x64/test-results/d550538e3386451fbcccea7c0ecf3d46/integ-test/functionalTestDashboards/with-security/test-results/stdout.txt

https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.0/1511/linux/x64/test-results/d550538e3386451fbcccea7c0ecf3d46/integ-test/functionalTestDashboards/without-security/test-results/stdout.txt

https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.0/1511/linux/arm64/test-results/f83b7e7b4ef14a4e9b5cc80a00745347/integ-test/functionalTestDashboards/with-security/test-results/stdout.txt

https://ci.opensearch.org/ci/dbc/integ-test-opensearch-dashboards/1.3.0/1511/linux/arm64/test-results/f83b7e7b4ef14a4e9b5cc80a00745347/integ-test/functionalTestDashboards/without-security/test-results/stdout.txt

@tianleh tianleh added the bug Something isn't working label Mar 16, 2022
@tianleh tianleh changed the title [BUG] Fix flaky test cases for bundled OpenSearch Dashboards plugins [BUG][Main] Fix flaky test cases for bundled OpenSearch Dashboards plugins Mar 16, 2022
@tianleh
Copy link
Member Author

tianleh commented Mar 16, 2022

@tianleh tianleh mentioned this issue Mar 16, 2022
1 task
@tianleh
Copy link
Member Author

tianleh commented Mar 16, 2022

@ohltyler for AD
@bowenlan-amzn for ISM
@joshuali925 for observability
@davidcui1225 for reports

@tianleh
Copy link
Member Author

tianleh commented Mar 16, 2022

@joshuali925 shared a tip to handle the interaction with dropdown component

cy.get('.euiFieldSearch').focus().type('[Flights] Flight Count and Average Ticket Price{enter}');

@ohltyler
Copy link
Member

ohltyler commented Mar 24, 2022

AD flakiness was cleaned up in #144 besides one test that may be related to the Cypress upgrade (link). I've opened #147 to track that. I don't believe this is flaky since it consistently fails, so I'd consider it entirely related to the upgrade efforts.

@wanglam
Copy link
Collaborator

wanglam commented Jan 18, 2024

@tianleh We've run all tests based 2.11 branch for above plugins. After 5 attempts, no failed cases found.
Here is the job details:

The test cases failed in the every 3 hours release sign off workflow may caused by share the same OpenSearch or OpenSearch Dashboards. Some tests may forgot to reset the operated data. There are two ways to make sure each functional tests of specific plugin run in isolate env:

  1. Modify the workflow, run new OpenSearch and OpenSearch Dashboards before plugin tests start.
  2. Inspired by this remote functional tests RFC, trigger functional tests in their own workflows.
    These two ways can provide an isolate OpenSearch and OpenSearch Dashboards for functional tests. It may reduce the differences between the every 3 hours workflow and the PR workflow.

@wanglam
Copy link
Collaborator

wanglam commented Feb 1, 2024

@tianleh Since there are no failed cases in these plugins, we will close this issue first. Will create new issue to track flaky tests case by case.

@wanglam wanglam closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants