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: don't unneccessarily rebuild dev assets #39
Draft
kdmccormick
wants to merge
21
commits into
nightly
Choose a base branch
from
kdmccormick/assets-split
base: nightly
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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/assets-split
branch
from
May 31, 2024 20:02
b74e8f4
to
dbf0a32
Compare
kdmccormick
changed the title
perf: don't unneccessarily rebuild dev assets (WIP)
perf: don't unneccessarily rebuild dev assets
May 31, 2024
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
June 1, 2024 02:50
dbf0a32
to
7da30eb
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
2 times, most recently
from
June 5, 2024 14:17
012faef
to
90b3b6d
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
June 17, 2024 16:33
90b3b6d
to
79de7af
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
2 times, most recently
from
June 24, 2024 14:49
4cf93da
to
aa2e674
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
2 times, most recently
from
June 25, 2024 14:52
cea0739
to
fc75206
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
2 times, most recently
from
July 16, 2024 15:08
0e444b9
to
58630de
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
July 29, 2024 14:32
0a3be8c
to
cfb0db1
Compare
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
July 30, 2024 15:48
cfb0db1
to
76755b9
Compare
The warning message printed during `tutor local upgrade` was incorrectly indented.
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
August 9, 2024 19:55
76755b9
to
cc6e668
Compare
This is to address a few vulnerabilities in these libraries: https://github.com/overhangio/tutor/security/dependabot/54 https://github.com/overhangio/tutor/security/dependabot/53 https://github.com/overhangio/tutor/security/dependabot/48 https://github.com/overhangio/tutor/security/dependabot/46 https://github.com/overhangio/tutor/security/dependabot/52 https://github.com/overhangio/tutor/security/dependabot/51 https://github.com/overhangio/tutor/security/dependabot/49 https://github.com/overhangio/tutor/security/dependabot/47 https://github.com/overhangio/tutor/security/dependabot/50
…#1083) Currently, we are asking devs to set this env var manually before they run tests. We may as well save them some keystrokes by setting it in the dev image programmatically.
This will add a `-c` / `--clean` flag to the save command and ensure that the env directory is deleted if it exists. Close overhangio#967
TODO: * is the pre-assets patch in the right place? * changelog entry * more details in commit message * test with 'tutor local'
kdmccormick
force-pushed
the
kdmccormick/assets-split
branch
from
August 30, 2024 17:11
cc6e668
to
8d35aa6
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.
Background
Currently, Tutor Dev users who mount edx-platform end up needing to install node_modules and build static assets three separate times!
In addition, devs are forced to collect assets and pull translations as part of step 1, which is slow and not necessary for dev mode.
Even though the artifacts from steps 1-2 are totally ignored when bind-mounting edx-platform, those steps are re-executed every time any part of the image is to be rebuilt, e.g. adding/removing dev python packages. This is a huge time sink for edx-platform devs and package devs.
This PR
This PR makes a few critical changes:
ln-assets
script to create links from edx-platform to those artifacts.The combined result of all of these changes is that you should only need to build static assets once, whether you're building prod or dev, whether you're bind-mounting edx-platform or not. You should only need to rebuild assets if you actually make changes to the asset sources (js, css, underscore, images, etc.).
Trying out this branch?
If you're trying this branch, I'm assuming that you are bind-mounting edx-platform and using tutor dev.
This is a based on nightly, make sure you have a recent-ish version of edx-platform master. It must include this change, merged early June.
You could also cherry-pick this Tutor commit onto Tutor master and try it out with edx-platform Redwood. You'll need a very recent version of redwood.master, including this change, merged mid-June.
Then, run:
Getting back off this branch?
If you're switching back to upstream Tutor master or nightly, and you were using a bind-mounted edx-platform, then you'll want to remove the symlinks from your edx-platform bind-mount so that they don't interfere. From edx-platform, run:
make clean
Then: