fix: Write webpack stats file to right place (so static assets can load) #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After the removal of paver, static assets build wasn't completing properly in edxapp -- static files were written to the correct directory in the assets volume (mounted under /edx/var) but the webpack-stats.json files were written to the test_root dir in the app container (under /edx/app). The service would fail on first page load as it failed to find the stats file, which is apparently used for locating resources.
The static assets build was also taking quite a long time and a lot of CPU, which is likely because we were doing the production-style build with full optimization.
staticRootLms
andstaticRootCms
inwebpack.common.config.js
in edx-platform for where that default is set. Set both LMS/CMS vars for both lms and cms since there's some dependency of CMS on LMS in the logic (and both calls build both sets of files, for better or worse).--settings devstack_docker
in the Makefile call to collectstatic; I'm not actually sure what the impact of that is, but it's what was in the provisioning script's version of the call and I needed to deduplicate these calls.provision-lms.sh
just call the Makefile so that there aren't two sources of truth on how to build static assets for edxapp.Also:
--no-input
for both calls (either works, just make it uniform)Addresses #65
I've completed each of the following or determined they are not applicable: