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

Add functional test cypress workflow improvements and enable the workflow for in-house tests #6061

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

manasvinibs
Copy link
Member

@manasvinibs manasvinibs commented Mar 7, 2024

Description

Addressing comments from this PR #5725

Issues Resolved

#5892

Testing the changes

Look into CI workflow in the PR to verify the change in this PR: https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/8184064533/job/22377905977?pr=6061

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@manasvinibs manasvinibs changed the title Add cigroup matrix for parallel runs Add functional test cypress workflow improvements Mar 7, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.13%. Comparing base (144c022) to head (cd4e25f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6061   +/-   ##
=======================================
  Coverage   67.13%   67.13%           
=======================================
  Files        3318     3318           
  Lines       64037    64037           
  Branches    10266    10266           
=======================================
+ Hits        42990    42992    +2     
+ Misses      18549    18548    -1     
+ Partials     2498     2497    -1     
Flag Coverage Δ
Linux_1 31.63% <ø> (ø)
Linux_2 55.20% <ø> (ø)
Linux_3 44.60% <ø> (+<0.01%) ⬆️
Linux_4 35.14% <ø> (ø)
Windows_1 31.65% <ø> (ø)
Windows_2 55.17% <ø> (ø)
Windows_3 44.61% <ø> (ø)
Windows_4 35.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manasvinibs manasvinibs changed the title Add functional test cypress workflow improvements Add functional test cypress workflow improvements and enable the workflow for in-house tests Mar 7, 2024

"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500",
"osd:ciGroup10": "echo \"dashboard_sanity_test_spec.js\"",
"osd:ciGroup11": "echo \"apps/vis_builder/*.js\""
Copy link
Member Author

Choose a reason for hiding this comment

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

Created an issue to address this concern #6083

Copy link
Member

Choose a reason for hiding this comment

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

Yea have we specified how we group the cypress tests within the dashboard repo into cigroups?

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently in Dashboards repo we are grouping it similar to how we group it in FT repo using package json by defining folder structure in it. I'll have to look into better way of doing it or something similar to how selenium tests are doing it today by passing it as a command.

…flow for in-house tests

Add cigroup matrix for parallel runs

Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
Copy link
Member

@abbyhu2000 abbyhu2000 left a comment

Choose a reason for hiding this comment

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

Synced up with @manasvinibs offline, verified the cypress workflow on dashboard cypress tests.

echo "DASHBOARDS_SPEC=${DASHBOARDS_SPEC}" >> $GITHUB_ENV

- name: Run FT repo tests
if: ${{ matrix.group < 10 }}
Copy link
Member

Choose a reason for hiding this comment

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

Do we plan to migrate all cypress test from FT repo into dashboard repo in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes I think that will be ideal as we want feature and its tests to reside in the same place.

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

We should convert this to a reusable workflow and find a better way to update the CI groups. I'm okay merging this as is to unblock writing functional tests in OSD while we iterate and clean this up :)

@ashwin-pc ashwin-pc merged commit 89fcf63 into opensearch-project:main Mar 8, 2024
68 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-6061-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 89fcf63ca0790858143a97c3bfb47460214afc7e
# Push it to GitHub
git push --set-upstream origin backport/backport-6061-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-6061-to-2.x.

manasvinibs added a commit to manasvinibs/OpenSearch-Dashboards that referenced this pull request Mar 13, 2024
…flow for in-house tests (opensearch-project#6061)

Add cigroup matrix for parallel runs

Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
(cherry picked from commit 89fcf63)
Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
manasvinibs added a commit to manasvinibs/OpenSearch-Dashboards that referenced this pull request Mar 13, 2024
…flow for in-house tests (opensearch-project#6061)

Add cigroup matrix for parallel runs

Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
(cherry picked from commit 89fcf63)
Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
manasvinibs added a commit to manasvinibs/OpenSearch-Dashboards that referenced this pull request Mar 13, 2024
…flow for in-house tests (opensearch-project#6061)

Add cigroup matrix for parallel runs

Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
(cherry picked from commit 89fcf63)
Signed-off-by: Manasvini B Suryanarayana <manasvis@amazon.com>
@manasvinibs
Copy link
Member Author

Manual backport #6139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants