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

chore(scripts): purge node_modules folder on npm prune #30255

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

rusackas
Copy link
Member

The npm prune script wasn't purging node modules folders, which (AFAIK) should be nuked from time to time. npm install should be run when building/publishing packages, or building/installing superset.

SUMMARY

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

The npm prune script wasn't purging node modules folders, which (AFAIK) should be nuked from time to time. `npm install` should be run when building/publishing packages, or building/installing superset.
@michael-s-molina michael-s-molina added the review:checkpoint Last PR reviewed during the daily review standup label Sep 12, 2024
@rusackas rusackas removed the review:checkpoint Last PR reviewed during the daily review standup label Sep 16, 2024
@mistercrunch
Copy link
Member

Just a thought but could be good to nuke .temp_cache/ too, mine got to 3GB

$ du -sh .temp_cache/
2.9G    .temp_cache/

after nuking + a rebuild it's about

@rusackas
Copy link
Member Author

rusackas commented Nov 4, 2024

@mistercrunch done (finally) :)

@mistercrunch
Copy link
Member

mistercrunch commented Nov 4, 2024

Wondering if this npm run prune is ever viable given that it removes the package-lock.json, doesn't that lead to upgrading all packages/sub-packages in a way that's too-much-all-at-once?

@rusackas
Copy link
Member Author

rusackas commented Nov 4, 2024

Wondering if this npm run prune is ever viable given that it removes the package-lock.json, doesn't that lead to upgrading all packages/sub-packages in a way that's too-much-all-at-once?

Nope... there shouldn't ever be a need to have package-lock files in packages/plugins. Running npm install from the root superset-frontend directory installs them all for Superset. The package lock files in these plugins/packages aren't needed and in fact cause scripts to fail when building/deploying.

@rusackas rusackas merged commit 3be6cef into master Nov 5, 2024
33 checks passed
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