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

CUMULUS-3859:Update @cumulus packages and elasticsearch removal #1155

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

jennyhliu
Copy link
Contributor

@jennyhliu jennyhliu commented Nov 14, 2024

Summary: Summary of changes

Addresses CUMULUS-3859: cumulus-dashboard: Update @cumulus packages for cypress tests

Changes

  • Removed ElasticSearch from localAPI docker-compose files
  • Updated the dashboard to use alpha version @cumulus/[email protected] and@cumulus/[email protected]
  • Updated packages to address cross-spawn audit issue
  • Updated the integration tests to work with updated API.
    Previously, api list endpoints searches record from ElasticSearch, and the ES records inserted for testing have the recent timestamp/updatedAt, so when the datepicker is set to Recent, the records will returned.
    With @cumulus/api > 19.1.0, api list endpoints search pg records, and the records inserted into pg have the original timestamp/updated_at, in order to test Recent datepicker, we adjust cy.clock(), so that records can be returned.

Issues after update packages

  1. Unit test error:
    Error: Package subpath './lib/utils' is not defined by "exports" in /data/bamboo/bamboo-agent-home/xml-data/build-dir/CUM-CDG251-TEST/cumulus-dashboard/node_modules/cheerio/package.json
    solution: Get an Error About export  cheeriojs/cheerio#2547 lock cheerio version to 1.0.0-rc.12
  2. Include vm due to the following error from npm run serve
    WARNING in ./node_modules/asn1.js/lib/asn1/api.js 21:12-42
    Module not found: Error: Can't resolve 'vm' in '/Users/jhliu/cumulus-dashboard/node_modules/asn1.js/lib/asn1'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "vm": require.resolve("vm-browserify") }'
- install 'vm-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "vm": false }

PR Checklist

  • Update CHANGELOG
  • Unit tests
  • Adhoc testing
  • Integration tests

@jennyhliu jennyhliu marked this pull request as ready for review November 21, 2024 20:43
@jennyhliu jennyhliu added Needs Review Looking for a reviewer and removed Work In Progress labels Nov 21, 2024
@jjmccoy jjmccoy added In Review and removed Needs Review Looking for a reviewer labels Nov 25, 2024
@jjmccoy
Copy link
Member

jjmccoy commented Nov 25, 2024

@jennyhliu

PR Feedback:
Able to run localstack (even on my M1 now that ES is gone...yay!) and seed the database to the dashboard with the pseudo data. Documentation, utils, tests, and comments have been updated: removing references to ES.

When I run the Cypress integration tests in Electron 93, I get errors. I think these are based on code being changed in the components and not being updated in the tests, but I'll send this back to you to make sure.

Copy link
Member

@jjmccoy jjmccoy left a comment

Choose a reason for hiding this comment

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

LGTG! @jennyhliu

@jennyhliu jennyhliu merged commit d2f2b3f into develop Nov 25, 2024
3 checks passed
@jennyhliu jennyhliu deleted the CUMULUS-3859 branch November 25, 2024 21:19
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