Skip to content

[3.8] Skip flaky AD release tests - #2119

Merged
rishabh6788 merged 1 commit into
opensearch-project:3.8from
jackiehanyang:backport/3.8-skip-flaky-ad-view-events
Jul 27, 2026
Merged

[3.8] Skip flaky AD release tests#2119
rishabh6788 merged 1 commit into
opensearch-project:3.8from
jackiehanyang:backport/3.8-skip-flaky-ad-view-events

Conversation

@jackiehanyang

@jackiehanyang jackiehanyang commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Backports the AD release E2E unblock for opensearch-project/anomaly-detection-dashboards-plugin#1224 to the 3.8 branch.

This PR:

  • runs the AD release E2E workflow with Chromium instead of Electron, matching the prior 3.7 release unblock
  • skips the flaky View anomaly events in flyout absence check that fails while querying the visualization context menu
  • skips the flaky sample_detector_spec.js suite after PR validation repeatedly timed out waiting for viewSampleDetectorLink after clicking different sample detector create buttons

Issues Resolved

Related to opensearch-project/anomaly-detection-dashboards-plugin#1224

Testing

  • git diff --check
  • yarn eslint cypress/integration/plugins/anomaly-detection-dashboards-plugin/sample_detector_spec.js cypress/utils/plugins/anomaly-detection-dashboards-plugin/helpers.js cypress/integration/plugins/anomaly-detection-dashboards-plugin/vis_augmenter/view_anomaly_events_spec.js --ext .js
  • Pre-commit eslint . --ext .js hook passed
  • GitHub Actions rerun is pending on commit ee73b8b

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit ee73b8b)

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
📝 TODO sections

🔀 No multiple PR themes
⚡ No major issues detected

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to ee73b8b

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use a supported Cypress browser name

Cypress officially supports chrome, edge, electron, and firefox as browser values,
but not chromium. Passing --browser chromium will likely cause Cypress to fail with
an unrecognized browser error. Consider using chrome or reverting to electron if the
intent was to switch browsers.

.github/workflows/anomaly-detection-release-e2e-workflow.yml [26]

-test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/anomaly-detection-dashboards-plugin/*'
+test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/plugins/anomaly-detection-dashboards-plugin/*'
Suggestion importance[1-10]: 6

__

Why: Cypress does actually detect chromium as a browser if it is installed on the runner (it auto-detects Chromium-family browsers), but it is not a canonical/officially documented option like chrome. The suggestion raises a reasonable concern that could prevent CI failures, though it may not be strictly incorrect.

Low

Previous suggestions

Suggestions up to commit d77e1e2
CategorySuggestion                                                                                                                                    Impact
General
Avoid fixed wait; assert on UI state

Replace the hard-coded cy.wait(10000) with a deterministic wait that asserts on a UI
element or network response indicating the detector was created. Fixed waits are a
common source of flakiness and slow test runs, and this may still be insufficient on
slower CI environments.

cypress/utils/plugins/anomaly-detection-dashboards-plugin/helpers.js [35]

 cy.getElementByTestId(createButtonDataTestSubj).click();
-cy.wait(10000);
+cy.getElementByTestId('viewSampleDetectorLink', { timeout: 30000 }).should('exist');
 cy.visit(AD_URL.OVERVIEW);
Suggestion importance[1-10]: 6

__

Why: Replacing cy.wait(10000) with a deterministic assertion is a valid best practice that reduces flakiness and speeds up tests, though the specific test ID suggested may not be the correct indicator of detector creation completion.

Low
Suggestions up to commit c6ebde7
CategorySuggestion                                                                                                                                    Impact
Possible issue
Use a supported Cypress browser value

Cypress officially supports electron, chrome, firefox, and edge as browser values;
chromium is not a recognized Cypress browser identifier and will likely cause the
run to fail with "Browser not found". Consider using chrome (or reverting to
electron) instead.

.github/workflows/anomaly-detection-release-e2e-workflow.yml [26]

-test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/plugins/anomaly-detection-dashboards-plugin/*'
+test-command: env CYPRESS_NO_COMMAND_LOG=1 yarn cypress:run-with-security --browser chrome --spec 'cypress/integration/plugins/anomaly-detection-dashboards-plugin/*'
Suggestion importance[1-10]: 5

__

Why: Cypress does accept chromium as a browser identifier in newer versions (via path or name detection), but this claim about it not being supported may be inaccurate. However, the concern is worth verifying since chrome is the more commonly documented option.

Low

@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit d77e1e2

Signed-off-by: Jackie Han <hnyng@amazon.com>
@jackiehanyang
jackiehanyang force-pushed the backport/3.8-skip-flaky-ad-view-events branch from d77e1e2 to ee73b8b Compare July 27, 2026 19:07
@jackiehanyang jackiehanyang changed the title [3.8] Skip flaky AD view events menu test [3.8] Skip flaky AD release tests Jul 27, 2026
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit ee73b8b

@rishabh6788
rishabh6788 merged commit 8a62c35 into opensearch-project:3.8 Jul 27, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants