forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
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
perf: move node_modules out of edx-platform repo #18
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kdmccormick
force-pushed
the
kdmccormick/global-node-modules
branch
3 times, most recently
from
December 22, 2022 19:40
2502fe0
to
7e769c5
Compare
15 tasks
kdmccormick
force-pushed
the
kdmccormick/global-node-modules
branch
5 times, most recently
from
January 10, 2023 21:21
6ed1c5d
to
64e0d8b
Compare
kdmccormick
changed the title
perf: globally install node_modules
perf: move node_modules out of edx-platform repo
Jan 10, 2023
kdmccormick
force-pushed
the
kdmccormick/global-node-modules
branch
2 times, most recently
from
January 10, 2023 22:18
e8fc7e5
to
a5d27a1
Compare
In scriv 1.1.0 the GitHub release description can be templated: nedbat/scriv#61 https://github.com/nedbat/scriv/releases/tag/1.1.0 This means that we can finally get rid of our ugly scripts to generate the release description \o/
Adds `from __future__ import annotations` to the top of every module, right below the module's docstring. Replaces any usages of t.List, t.Dict, t.Set, t.Tuple, and t.Type with their built-in equivalents: list, dict, set, tuple, and type. Ensures that make test still passes under Python 3.7, 3.8 and 3.9.
When a user registers, they receive a confirmation email. This email contained two links to "https://example.com/..." urls. This was caused by the fact that the default site, indicated by SITE_ID=1, was example.com. We resolve this issue by setting instead SITE_ID=2, which should point to the site with the LMS domain name. This is a potentially breaking change for platforms that have manually set to 1 the id of the LMS site in the database. These platforms should now set SITE_ID=1 via a plugin. Alternatives we have considered include modifying the id field of the LMS site in the database. Unfortunately such a change would have important consequences, as the site ID is used as a foreign key for other models. Note that non-https sites still include https links in the registration emails. This is because the "https" scheme is hardcoded by the "ensure_url_is_absolute" utility function. So there is nothing we can do about this without making changes upstream. Close overhangio#572.
The LMS and CMS were producing lots of logs similar to: cms_1 | 2023-01-17 15:30:11,359 INFO 7 [openedx.core.djangoapps.cors_csrf.helpers] [user 7] [ip 31.223.46.44] helpers.py:64 - Origin 'https://studio.demo.openedx.overhang.io' was not in `CORS_ORIGIN_WHITELIST`; full referer was 'https://studio.demo.openedx.overhang.io/learning/course/course-v1:edX+DemoX+Demo_Course/home' and requested host was 'studio.demo.openedx.overhang.io'; CORS_ORIGIN_ALLOW_ALL=False These warnings are produced by openedx.core.djangoapps.cors_csrf.helpers. I don't think they indicate any problem, but they pollute the logs. They are resolved by adding the "http(s)://<lms/cms host>" to CORS_ORIGIN_WHITELIST in production, so we did just that.
Adds `from __future__ import annotations` to the top of every module, right below the module's docstring. Replaces any usages of t.List, t.Dict, t.Set, t.Tuple, and t.Type with their built-in equivalents: list, dict, set, tuple, and type. Ensures that make test still passes under Python 3.7, 3.8 and 3.9.
kdmccormick
force-pushed
the
kdmccormick/global-node-modules
branch
from
January 18, 2023 19:22
a5d27a1
to
45e9e40
Compare
Background: NPM packages were installed into the openedx image at /openedx/edx-platform/node_modules. So, when one mounted their own copy of edx-platform, the built-in node_modules folder was overriden. This forced edx-platform developers to re-run ``npm install``, which is redundant, slow, resource-intensive, and added complexity to the first-time developer setup process. If one forgot to run ``npm install``, their LMS/CMS frontend would be broken. And, when edx-platform's NPM requirements were updated, developers would not receive these updates from the openedx image; they would need to think to re-run ``npm install`` themselves. The solution: Move /openedx/edx-platform/node_modules to /openedx/node_modules. Note that this new location is outside of the edx-platform repository. So, when a developer mounts their own copy of edx-platform, the image's node_modules will remain intact. Closes openedx-unsupported/wg-developer-experience#150
kdmccormick
force-pushed
the
kdmccormick/global-node-modules
branch
from
January 20, 2023 17:40
45e9e40
to
9cff095
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Background: NPM packages were installed into the openedx image at
/openedx/edx-platform/node_modules. So, when one mounted their own copy of
edx-platform, the built-in node_modules folder was overriden. This
forced edx-platform developers to re-run
npm install
, which isredundant, slow, resource-intensive, and added complexity to the first-time
developer setup process. If one forgot to run
npm install
, theirLMS/CMS frontend would be broken. And, when edx-platform's NPM requirements
were updated, developers would not receive these updates from the openedx
image; they would need to think to re-run
npm install
themselves.The solution: Move /openedx/edx-platform/node_modules to
/openedx/node_modules. Note that this new location is outside of the
edx-platform repository. So, when a developer mounts their own copy of
edx-platform, the image's node_modules will remain intact.
Supporting information
Blocked by:
Closes:
Testing instructions
TBD
Deadline
TBD
Other information
TBD