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

feat(build): uplift Lerna + replace insecure shortid with nanoid + uplift Yeoman-related packages + ESM-ize generator-superset #29419

Merged

Conversation

hainenber
Copy link
Contributor

@hainenber hainenber commented Jun 30, 2024

feat(build): uplift major version for CI-related packages

SUMMARY

Uplift major version for notable CI-related packages. Notable changes:

  • Uplift Lerna v6 to latest v8
  • Replace unsupported and insecure shortid with successor nanoid + corresponding refactors
  • Uplift yeoman-related packages to latest v7
  • ESM-ize the generator-superset package in order to work with yeoman-generator v7

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…aries + fix Jest tests + add specific ESLint config

Signed-off-by: hainenber <[email protected]>
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jul 13, 2024
@hainenber hainenber marked this pull request as ready for review July 14, 2024 05:17
@hainenber hainenber requested a review from jinghua-qa as a code owner July 14, 2024 05:18
@hainenber hainenber changed the title feat(build): uplift major version for CI-related packages feat(build): uplift Lerna + replace insecure shortid with nanoid + uplift Yeoman-related packages + ESM-ize generator-superset Jul 14, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

This is looking great to me... I just need to find time to test it out!

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM

@mistercrunch
Copy link
Member

I really appreciate all your solid contributions! I'll take a look at all your open PRs today.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Generator seems to work! I echo Max... thanks for all the contributions!

@rusackas rusackas merged commit c30ca53 into apache:master Jul 16, 2024
62 checks passed
@hainenber hainenber deleted the uplift-major-version-for-ci-related-packages branch July 17, 2024 01:58
@fisjac
Copy link
Contributor

fisjac commented Jul 19, 2024

After the Lerna uplift, I'm experiencing build errors in docker when running build-dev. It appears the optional dependency @nx isn't being installed, but is required by Lerna post update. Anyone experiencing this?

@hainenber
Copy link
Contributor Author

Can you share the build failure's screenshot? I ran npm run build-dev locally and it finishes as usual. Maybe you can run npm ci to ensure all packages installed as specified in the lockfile? 👀

➜  superset-frontend git:(master) npm run build-dev

> [email protected] build-dev
> cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --color

[Superset Plugin] Use symlink source for @superset-ui/chart-controls @ ./packages/superset-ui-chart-controls
[Superset Plugin] Use symlink source for @superset-ui/core @ ./packages/superset-ui-core
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-calendar @ ./plugins/legacy-plugin-chart-calendar
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-chord @ ./plugins/legacy-plugin-chart-chord
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-country-map @ ./plugins/legacy-plugin-chart-country-map
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-event-flow @ ./plugins/legacy-plugin-chart-event-flow
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-heatmap @ ./plugins/legacy-plugin-chart-heatmap
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-histogram @ ./plugins/legacy-plugin-chart-histogram
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-horizon @ ./plugins/legacy-plugin-chart-horizon
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-map-box @ ./plugins/legacy-plugin-chart-map-box
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-paired-t-test @ ./plugins/legacy-plugin-chart-paired-t-test
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-parallel-coordinates @ ./plugins/legacy-plugin-chart-parallel-coordinates
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-partition @ ./plugins/legacy-plugin-chart-partition
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-rose @ ./plugins/legacy-plugin-chart-rose
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-sankey @ ./plugins/legacy-plugin-chart-sankey
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-sankey-loop @ ./plugins/legacy-plugin-chart-sankey-loop
[Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-world-map @ ./plugins/legacy-plugin-chart-world-map
[Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-deckgl @ ./plugins/legacy-preset-chart-deckgl
[Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-nvd3 @ ./plugins/legacy-preset-chart-nvd3
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-echarts @ ./plugins/plugin-chart-echarts
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-handlebars @ ./plugins/plugin-chart-handlebars
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-pivot-table @ ./plugins/plugin-chart-pivot-table
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-table @ ./plugins/plugin-chart-table
[Superset Plugin] Use symlink source for @superset-ui/plugin-chart-word-cloud @ ./plugins/plugin-chart-word-cloud
[Superset Plugin] Use symlink source for @superset-ui/switchboard @ ./packages/superset-ui-switchboard

28% building 4/12 entries 58/59 dependencies 25/41 modules`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
28% building 4/12 entries 563/594 dependencies 84/248 modules`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
28% building 4/12 entries 851/1000 dependencies 177/299 modules`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
28% building 4/12 entries 1000/1071 dependencies 186/375 modules`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/@babel/types/lib/validators/generated/index.js:2748:35)
    at PluginPass.Program (/Users/dotronghai/Projects/github.com/apache/superset/superset-frontend/node_modules/babel-plugin-lodash/lib/index.js:102:44)
1059 assets
14017 modules
webpack 5.89.0 compiled successfully in 29595 ms

@mistercrunch
Copy link
Member

Confirming that running npm i; npm run build-dev worked for me. @fisjac please open an issue with more details on your env and error messages if you can recreate.

@fisjac
Copy link
Contributor

fisjac commented Jul 22, 2024

I believe this error is specific to building with docker. When I sh into the superset_app contianer, I see that the optional dependencies aren't being built within the node_modules directory. Building locally with npm i seems fine. Opening a separate issue ticket.

eschutho pushed a commit that referenced this pull request Jul 24, 2024
…lift Yeoman-related packages + ESM-ize generator-superset (#29419)

Signed-off-by: hainenber <[email protected]>
@eschutho
Copy link
Member

eschutho commented Jul 27, 2024

I'm hitting the same issue that @fisjac reported in our ci now. https://github.com/apache/superset/actions/runs/10119252433/job/27987414693?pr=29723

and also when running docker compose up superset
I believe it's related to nrwl/nx#20088

@kgabryje
Copy link
Member

kgabryje commented Aug 1, 2024

I'm also hitting it here #29788 🙁

@eschutho
Copy link
Member

eschutho commented Aug 5, 2024

The side effects of not loading the dependencies were fixed with @mistercrunch's PR here. But I noted in @kgabryje's PR that the lock file can still get out of sync because it will only pull in the dependency required for the OS that built the lockfile. Although at last look the package-lock file has all the dependencies.

@github-actions github-actions bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 4.1.0 labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels dependencies:npm github_actions Pull requests that update GitHub Actions code packages size/L 🚢 4.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants