chore: move Code to a submodule#4990
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.
| # 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.
Remind me again, we don't need this anymore because it's no longer cached or something?
There was a problem hiding this comment.
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.