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

[Canvas] Fix flaky test failures when navigating to Canvas app #164376

Merged
merged 25 commits into from
Sep 19, 2023

Conversation

cqliu1
Copy link
Contributor

@cqliu1 cqliu1 commented Aug 21, 2023

Summary

Closes #163303.
Closes #163368.
Closes #163903.

This fixes a rarely occurring flaky test failure while navigating to the Canvas app where the currentURL check fails. The cause is navigateToApp goes to app/canvas#/ which includes a hash get redirected by the Canvas app to app/canvas/, and fails when app/canvas/ doesn't match app/canvas#/. I've chosen to disable this check when navigating to Canvas to avoid this flakiness because I couldn't remove the hash from the URL while using navigateToApp or navigateToURL.

Instead of checking the URLs match, I opted to check that the workpad listing page loaded correctly.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@cqliu1 cqliu1 added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:medium Medium Level of Effort technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes impact:critical This issue should be addressed immediately due to a critical level of impact on the product. Feature:Canvas v8.11.0 labels Aug 21, 2023
@cqliu1
Copy link
Contributor Author

cqliu1 commented Aug 21, 2023

@cqliu1 cqliu1 marked this pull request as ready for review August 22, 2023 15:00
@cqliu1 cqliu1 requested review from a team as code owners August 22, 2023 15:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@ThomThomson ThomThomson self-requested a review August 22, 2023 15:46
@cqliu1 cqliu1 requested a review from a team as a code owner August 22, 2023 17:09
@cqliu1
Copy link
Contributor Author

cqliu1 commented Aug 22, 2023

Updated flaky test runner x 100 https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2953

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Test + page object changes LGTM!

// See https://github.com/elastic/kibana/pull/164376
if (appName === 'canvas' && !path) {
throw new Error(
'This causes flaky test failures. Use Canvas page object goToListingPage instead'
Copy link
Contributor

Choose a reason for hiding this comment

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

Good call!

Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

LGTM!

@cqliu1
Copy link
Contributor Author

cqliu1 commented Sep 19, 2023

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1011.6KB 1011.6KB +34.0B

History

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

@cqliu1 cqliu1 merged commit 94587c9 into elastic:main Sep 19, 2023
18 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 19, 2023
@cqliu1 cqliu1 deleted the fix/navigate-to-canvas-flakiness branch September 19, 2023 20:10
wayneseymour added a commit to wayneseymour/kibana that referenced this pull request Oct 11, 2024
Contributes to: elastic#194817

Why I assigned them:

Assigned advanced_settings due to elastic#175255

Assigned dashboard_controls due to elastic#190797

Assigned dashboard_links due to elastic#174772

Assigned dashboard_panel_options due to elastic#178596

Assigned grok_debugger due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned helpers due to elastic#164341 (call site)

Assigned home due to elastic#103192

Assigned index_lifecycle_management due to elastic#116207

Assigned ingest_node_pipelines due to elastic#113783

Assigned kibana_overview due to  https://github.com/elastic/kibana/blob/f00ac7a8a21463e6bb4a2784c3a3884f36c62900/x-pack/plugins/grokdebugger/kibana.jsonc#L4

Assigned management due to elastic#165705

Assigned painless_lab due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/painless_lab/kibana.jsonc#L4

Assigned search_profiler due to elastic#195343

Assigned uptime due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/uptime/kibana.jsonc#L4

Assigned lens due to elastic#175893

Assigned ml_anomaly_detection due to elastic#162126

Assigned canvas due to elastic#164376

Assigned cc replication due to elastic#149069

Assigned enterpise search due to elastic#79359

Assigned graph to due elastic#190797

Assigned license_management due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/license_management/kibana.jsonc#L4

Assigned maps due to elastic#155161

Assigned observability due to https://github.com/elastic/kibana/blob/main/x-pack/plugins/observability_solution/observability/kibana.jsonc#L4

Assigned remote clusters due to elastic#96989

Assigned reporting due to elastic#121435

Assigned rollup_jobs due to https://github.com/elastic/kibana/blob/d57bc9a5d7d64f86b550eff7997605a3090aee9a/x-pack/plugins/rollup/kibana.jsonc#L4

Assigned watcher due to elastic#119717
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 Feature:Canvas impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:medium Medium Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas technical debt Improvement of the software architecture and operational architecture v8.11.0
Projects
None yet
6 participants