-
Notifications
You must be signed in to change notification settings - Fork 5.9k
chore: move Code to a submodule #4990
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
Conversation
Looks like CI is failing - exit code 137 |
It looks like it is installing dependencies over and over again, I see the same "installing dependencies for..." line multiple times. |
Docs preview failing again 🤔 https://github.com/coder/code-server/runs/5544837131?check_suite_focus=true#step:4:18
@BrunoQuaresma did you ever figure out how to fix this? I could have sworn it worked when you and I did it. But Asher's PR is from a fork. |
The current setup appears to only rebuild VS Code if the dependencies change but we need to rebuild it if anything changes. I also re-enabled the commented out node_modules caches. They look like they should work to me with the submodule method. I think the problem occurred because Code itself was being installed in the yarn step.
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.
# TODO@jsjoeio - remove once we switch to submodules. | ||
- name: Create package.json for testing | ||
run: | | ||
mkdir -p ./vendor/modules/code-oss-dev | ||
echo '{ "version": "test" }' > ./vendor/modules/code-oss-dev/package.json | ||
|
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.
Remind me again, we don't need this anymore because it's no longer cached or something?
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.
Yeah I think the problem was that we cache node_modules
and then restore that cache. But Code is under vendor/modules
so it did not get restored. Then we tried to read package.json
from it.
Now that this uses a submodule and we have submodules: true
in the checkout stage Code will be cloned as part of the checkout phase and package.json
will exist.
I assumed this still runs locally and we've tested a build from CI (the latter I guess can't until CI passes, but we should before merging) |
I ran it locally with |
Codecov Report
@@ Coverage Diff @@
## main #4990 +/- ##
=======================================
Coverage 71.58% 71.58%
=======================================
Files 29 29
Lines 1675 1675
Branches 373 373
=======================================
Hits 1199 1199
Misses 405 405
Partials 71 71
Continue to review full report at Codecov.
|
I tested the CI build, all seems well. |
* Move Code to a submodule Closes coder#4901. * Base Code cache on hash and re-enable node_modules cache The current setup appears to only rebuild VS Code if the dependencies change but we need to rebuild it if anything changes. I also re-enabled the commented out node_modules caches. They look like they should work to me with the submodule method. I think the problem occurred because Code itself was being installed in the yarn step.
Closes #4901.