Skip to content

Conversation

@hainenber
Copy link
Contributor

@hainenber hainenber commented Jul 27, 2024

fix(frontend/docker, ci): fix borked Docker build due to Lerna v8 uplift

SUMMARY

Closes #29658

Remove --no-optional in docker-frontend.sh to allow installing @nx optional dependencies which is necessary for Lerna v8

Also upgrading prop-types to next minor version to assess reproducibility of issue raised in PR #29723

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

@dosubot dosubot bot added the infra:container Infra container and K8s label Jul 27, 2024
cd /app/superset-frontend
npm install -f --no-optional --global webpack webpack-cli
npm install -f --no-optional
npm install -f
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mistercrunch I saw this flag was added previously but unsure the context. I believe there's a historical reason for it? 👀

Copy link
Member

Choose a reason for hiding this comment

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

I did some git archeology and it looks like --no-optional goes back to #10766 (2020) and there's not a clear explanation. I vote going vanilla and doing a very simple npm install instead of those 2 lines. Webpack packages should install as its just a devDependencies, and they'll install normally as long as we don't specify --production, which we don't want to do here.

Copy link
Member

Choose a reason for hiding this comment

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

tagging @eschutho as I believe she ran in an issue similar to the one you're fixing here.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm... looks like @craig-rueda added that a looooong time ago. I'm not sure if there are any consequences to its removal ¯\_(ツ)_/¯

Copy link
Member

Choose a reason for hiding this comment

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

eek... duplicated effort. That's what I get for revisiting an open tab without refreshing.

Copy link
Member

Choose a reason for hiding this comment

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

@rusackas I really think it's ok to remove this --no-optional as it's non-standard and in this context would only apply BUILD_SUPERSET_FRONTEND_IN_DOCKER" = "true" which really should align with other build context (if you're running a dev env outside docker for instance).

Copy link
Member

Choose a reason for hiding this comment

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

This lgtm. I'll remove the pinned optional dependencies in my pr.

@hainenber hainenber changed the title fix(docker, ci): fix borked build due to Lerna v8 uplift fix(frontend/docker, ci): fix borked Docker build due to Lerna v8 uplift Jul 27, 2024
@hainenber
Copy link
Contributor Author

@eschutho I'm not able to reproduce your CI issue as this PR's frontend-build has installed FE dependencies with success 👀

https://github.com/apache/superset/actions/runs/10120546422/job/27990411018?pr=29725

@mistercrunch
Copy link
Member

My vote is to replace those two lines with a single, simple npm install

@rusackas rusackas merged commit 8891f04 into apache:master Jul 30, 2024
@hainenber hainenber deleted the fix-borked-build-due-to-lerna-uplift branch July 30, 2024 18:28
@mistercrunch
Copy link
Member

The webpack install is not necessary, simplifying further here #29779

@sadpandajoe
Copy link
Member

@supersetbot label 4.1

@github-actions github-actions bot added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Jul 30, 2024
@sadpandajoe
Copy link
Member

@supersetbot unlabel 4.1

@github-actions github-actions bot removed the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Aug 1, 2024
@sadpandajoe sadpandajoe added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Nov 13, 2024
sadpandajoe pushed a commit that referenced this pull request Nov 13, 2024
jarethholt pushed a commit to raysearchlabs/superset that referenced this pull request Nov 19, 2024
@mistercrunch mistercrunch added 🍒 4.1.1 Cherry-picked to 4.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Nov 27, 2024
withnale pushed a commit to withnale/superset that referenced this pull request Mar 14, 2025
@github-actions github-actions bot added the 🍒 4.1.2 Cherry-picked to 4.1.2 label Apr 1, 2025
@mistercrunch mistercrunch added 🍒 4.1.3 Cherry-picked to 4.1.3 🚢 5.0.0 First shipped in 5.0.0 labels Jul 29, 2025
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 infra:container Infra container and K8s size/XS v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch 🍒 4.1.1 Cherry-picked to 4.1.1 🍒 4.1.2 Cherry-picked to 4.1.2 🍒 4.1.3 Cherry-picked to 4.1.3 🍒 4.1.4 🚢 5.0.0 First shipped in 5.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

superset_node build failure @nx/nx-linux-x64-gnu missing module

5 participants