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

fix: support imports without extensions in cypress webpack build #8993

Merged

Conversation

d-rowe
Copy link
Member

@d-rowe d-rowe commented Dec 2, 2024

Description

When migrating to cypress v12, we saw a small number of regressions due compilation failures in cypress. This change is to resolve this class of issue. Once resolved in this branch I'll create a PR to merge the cypress 12 upgrade in main.

Details
By default, cypress' internal webpack preprocessor doesn't allow imports without file extensions. This makes our life a bit hard since if any file in our testing dependency graph has an import without the .js extension our cypress build will fail.

This configuration relaxes this a bit by allowing imports without file extension
ex. import module from './module'

Changelog

  • fix: support imports without extensions in cypress webpack build

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

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (cypress-unification@d7b9046). Learn more about missing BASE report.

Additional details and impacted files
@@                  Coverage Diff                   @@
##             cypress-unification    #8993   +/-   ##
======================================================
  Coverage                       ?   60.87%           
======================================================
  Files                          ?     3802           
  Lines                          ?    91070           
  Branches                       ?    14374           
======================================================
  Hits                           ?    55443           
  Misses                         ?    32086           
  Partials                       ?     3541           
Flag Coverage Δ
Linux_1 29.02% <ø> (?)
Linux_2 56.39% <ø> (?)
Linux_3 37.89% <ø> (?)
Linux_4 29.00% <ø> (?)
Windows_1 29.03% <ø> (?)
Windows_2 56.34% <ø> (?)
Windows_3 37.90% <ø> (?)
Windows_4 29.00% <ø> (?)

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.

@d-rowe d-rowe changed the base branch from feature/migrate-cypress to cypress-unification December 2, 2024 19:35
Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
@d-rowe
Copy link
Member Author

d-rowe commented Dec 2, 2024

Related: #4813

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>
@ananzh ananzh merged commit c6f5c8f into opensearch-project:cypress-unification Dec 2, 2024
68 checks passed
@ananzh
Copy link
Member

ananzh commented Dec 2, 2024

I don't think we need AGGREGATION_VIEW: false and ML_COMMONS_DASHBOARDS_ENABLED: true but I also don't think it is hurtful. But can clean up in a follow-up if we need a more cleaned up config file.

@d-rowe d-rowe deleted the cypress-unification branch December 3, 2024 00:05
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Dec 3, 2024
…nsearch-project#8993)

* fix: support imports without extensions in cypress webpack build

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR opensearch-project#8993 created/updated

* use typescript config

Signed-off-by: Daniel Rowe <[email protected]>

* fix lint

Signed-off-by: Daniel Rowe <[email protected]>

* disable new test isolation feature

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
LDrago27 pushed a commit that referenced this pull request Dec 3, 2024
* Update Cypress to v12 (#8926)

* Update cypress to v12

Signed-off-by: Daniel Rowe <[email protected]>

* Add required e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR #8926 created/updated

* Update license header

Signed-off-by: Daniel Rowe <[email protected]>

* Update license in e2e.js

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* fix: support imports without extensions in cypress webpack build (#8993)

* fix: support imports without extensions in cypress webpack build

Signed-off-by: Daniel Rowe <[email protected]>

* Changeset file for PR #8993 created/updated

* use typescript config

Signed-off-by: Daniel Rowe <[email protected]>

* fix lint

Signed-off-by: Daniel Rowe <[email protected]>

* disable new test isolation feature

This isolation was causing regressions

Signed-off-by: Daniel Rowe <[email protected]>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Daniel Rowe <[email protected]>
Signed-off-by: Daniel Rowe <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
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