-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
build: copy from node_modules using NPM postinstall hook, not Paver (RE-MERGE) #32767
build: copy from node_modules using NPM postinstall hook, not Paver (RE-MERGE) #32767
Conversation
@regisb , would you be able to review both this and the related Tutor PR? overhangio/tutor#872 It's just a fix to the node_modules copy postinstall hook that you reviewed last week. If they look good to you, feel free to merge both PRs. |
751d837
to
b36aab4
Compare
Dockerfile
Outdated
@@ -117,6 +117,7 @@ RUN pip install -r requirements/edx/base.txt | |||
|
|||
# Install node and node modules | |||
RUN nodeenv /edx/app/edxapp/nodeenv --node=16.14.0 --prebuilt | |||
COPY scripts/copy-node-modules.sh scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it weird that we're copying node modules before we've installed the right version of npm and run npm ci
? Not quite following that ordering...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidjoy it's not weird, but I can certainly see why it reads weirdly. I've shifted this statement to be after npm install npm
(it's arbitrary, but I think it reads better now) and I've added a comment explaining why the statement must come before npm ci
. Let me know if that doesn't makes things clearer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH. Duh, I didn't read carefully enough that that was a COPY
. I get it. 👍🏻
b36aab4
to
b1631fc
Compare
…RE-MERGE) Re-merge of 4b64d83 The commit after this one contains the fix for the issue that led to the revert.
Two fixes: * In the (in-repo, non-Tutor) Dockerfile, add copy-node-modules.sh before `npm install`, since it is needed by the new postinstall hook. * In paver/assets.py, run copy-node-modules.sh for backwards com- patibility, just for cases where `SKIP_NPM_INSTALL` is enabled (which would prevent our new postinstall hook from running automatically!). We will deprecate the paver asset commands all at once once the new non-paver stuff is 100% working.
b1631fc
to
fd8e5e5
Compare
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
This is a fixed version of #32717, which we reverted in #32766.
First commit is the same as the original PR. See that PR for details & testing info.
Second commit contains the fixes. You can test the fix simply by running
make docker_build
in the edx-platform root. If the build succeeds then all is well.