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

Migrate query enhancement tests from functional repo to main #9048

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

abbyhu2000
Copy link
Member

@abbyhu2000 abbyhu2000 commented Dec 12, 2024

Description

P0 PR for migrating the two query enhancement tests with its utils from functional repo to main. Modify cypress test workflow to allow this.

Need to merge this functional repo PR with this: opensearch-project/opensearch-dashboards-functional-test#1661

Built upon the comments in this PR: #8986

Issues Resolved

Changelog

  • skip

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

Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

@abbyhu2000 abbyhu2000 force-pushed the feature/migrate-cypress-2 branch from 0425ffa to c3b8049 Compare December 12, 2024 18:50
@abbyhu2000 abbyhu2000 changed the title Feature/migrate cypress 2 Migrate query enhancement tests from functional repo to main Dec 12, 2024
Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.86%. Comparing base (9f23442) to head (96fe0fb).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9048      +/-   ##
==========================================
- Coverage   60.87%   60.86%   -0.02%     
==========================================
  Files        3808     3808              
  Lines       91209    91209              
  Branches    14410    14410              
==========================================
- Hits        55526    55516      -10     
- Misses      32142    32199      +57     
+ Partials     3541     3494      -47     
Flag Coverage Δ
Linux_1 29.02% <ø> (ø)
Linux_2 56.38% <ø> (ø)
Linux_3 37.93% <ø> (+<0.01%) ⬆️
Linux_4 29.01% <ø> (ø)
Windows_1 29.03% <ø> (-0.02%) ⬇️
Windows_2 56.34% <ø> (ø)
Windows_3 37.93% <ø> (ø)
Windows_4 29.01% <ø> (ø)

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.

@abbyhu2000
Copy link
Member Author

Test flow link: Running this PR workflow with functional repo PR:opensearch-project/opensearch-dashboards-functional-test#1661

All cypress tests pass:

  • ciGroup 1-9: cypress tests in functional repo
  • ciGroup 10: 2 query enhancement tests in dashboard repo
  • ciGroup 11: dashboard sanity test in dashboard repo

https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/12302916791

Copy link
Member

@d-rowe d-rowe left a comment

Choose a reason for hiding this comment

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

Nice! I know this migration work is surprisingly challenging.

Do we have a PR prepared to remove these from ftr or will that be a followup?

Comment on lines +18 to +20
miscUtils.visitPage(
`app/data-explorer/discover#/?_g=(filters:!(),time:(from:'2015-09-19T13:31:44.000Z',to:'2015-09-24T01:31:44.000Z'))`
);
Copy link
Member

Choose a reason for hiding this comment

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

I know you're migrating these, but thinking that these type of hardcoded visits are good opportunities for utils in the future.

Ex.

DiscoverPage.visit({
    timeRange: {
        from: '2015-09-19T13:31:44.000Z',
        to: '2015-09-24T01:31:44.000Z'
    }
});

Copy link
Member

Choose a reason for hiding this comment

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

Seems we are still using the data from data-explorer. Will we do a follow-up to update the data? This is the one for query_enhancement #9006

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, will do a follow up to update the data after 9006 is merged

`app/data-explorer/discover#/?_g=(filters:!(),time:(from:'2015-09-19T13:31:44.000Z',to:'2015-09-24T01:31:44.000Z'))`
);

cy.waitForLoaderNewHeader();
Copy link
Member

Choose a reason for hiding this comment

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

Related to comment above: this can then be rolled into the Discover page visit helper so that no other consumers need to worry about load timing.

Again, no need to address for this PR. Just sharing some thoughts for longterm changes.

@joshuali925
Copy link
Member

do you have more background on why tests are moving from functional test repo to here? for example for other developers which repo should they use to add cypress tests

and is it necessary to add over one million lines of test data which doesn't appear to be from coming opensearch-project/opensearch-dashboards-functional-test#1661?

Copy link
Contributor

❌ Invalid Prefix For Manual Changeset Creation

Invalid description prefix. Found "feat". Only "skip" entry option is permitted for manual commit of changeset files.

If you were trying to skip the changelog entry, please use the "skip" entry option in the ##Changelog section of your PR description.

yarn.lock Outdated Show resolved Hide resolved
Signed-off-by: abbyhu2000 <[email protected]>
@abbyhu2000 abbyhu2000 force-pushed the feature/migrate-cypress-2 branch from 15b5d31 to b75f6f4 Compare December 13, 2024 23:27
@abbyhu2000
Copy link
Member Author

do you have more background on why tests are moving from functional test repo to here? for example for other developers which repo should they use to add cypress tests

and is it necessary to add over one million lines of test data which doesn't appear to be from coming opensearch-project/opensearch-dashboards-functional-test#1661?

@joshuali925 I think the future plan is to have dashboard cypress tests within the dashboard repo, and write future dashboard cypress test in dashboard repo. So in the future when writing features, we can add corresponding cypress tests in the same PR, then it can directly test the feature running those tests in a single PR. (Do not need to raise separate PR in functional repo to verify).

This PR just starts the process of migrating some old cypress tests back to dashboard repo.

cc: @ashwin-pc

@abbyhu2000
Copy link
Member Author

do you have more background on why tests are moving from functional test repo to here? for example for other developers which repo should they use to add cypress tests

and is it necessary to add over one million lines of test data which doesn't appear to be from coming opensearch-project/opensearch-dashboards-functional-test#1661?

both logstash data and discover data are data explorer plugin coming from functional repo. I will raise a follow up PR to clean the data and use the query enhancement data once this PR is merged: #9006

Signed-off-by: abbyhu2000 <[email protected]>
@github-actions github-actions bot added Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry and removed failed changeset labels Dec 13, 2024
Signed-off-by: abbyhu2000 <[email protected]>
@abbyhu2000
Copy link
Member Author

For some reasons, auto generate changelog mechanism does not work properly. Have manually added a changelog

@ananzh
Copy link
Member

ananzh commented Dec 14, 2024

@abbyhu2000 will do a follow up to update data and clean out. Approve this to unblock CI and tests merging.

@abbyhu2000 abbyhu2000 merged commit 442e11e into main Dec 14, 2024
66 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants