Skip to content

Cache the VS Code download in CI - #14

Merged
Chirag6722 merged 1 commit into
thegoodengineer:mainfrom
Chirag6722:ci/cache-vscode-download
Aug 13, 2026
Merged

Cache the VS Code download in CI#14
Chirag6722 merged 1 commit into
thegoodengineer:mainfrom
Chirag6722:ci/cache-vscode-download

Conversation

@Chirag6722

Copy link
Copy Markdown
Collaborator

Follow-up to #12, prompted by an actual red run rather than a hunch.

The merge of #9 to main failed on:

Failed to run tests
Error: connect ENETUNREACH 2603:1061:14:e0::1:443
code: 'ENETUNREACH'

That is the runner failing to reach the download server partway through fetching VS Code, not a test failure. It passed on retry with no code change. Every integration job currently re-downloads that build from scratch, so the job's reliability is tied to a network round trip it does not need to repeat.

This caches .vscode-test, keyed on runner OS and package.json, with a looser restore-keys prefix so a dependency bump reuses the existing build rather than starting cold. @vscode/test-electron re-downloads on its own if the version it wants is not in the cache, so a stale entry degrades to today's behaviour instead of breaking anything. .vscode-test is already gitignored.

Worth doing beyond the time saved: a job that goes red for reasons unrelated to the change is a job people stop reading, which on this repository in particular would be an odd thing to ship.

Every integration job re-downloads a VS Code build, so a network blip on
the runner fails a run that has nothing wrong with it. That is not
hypothetical: the first merge to main went red on

    Error: connect ENETUNREACH 2603:1061:14:e0::1:443

partway through the download, and passed on retry with no code change.

A red build that people learn to shrug at is worse than a slow one,
especially on a repository whose entire premise is that a reported result
should mean something.

Cache .vscode-test, keyed on the runner OS and package.json, with a
looser restore key so a dependency bump reuses the existing build instead
of starting from nothing. test-electron re-downloads by itself if the
version it wants is not in the cache.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Chirag6722
Chirag6722 merged commit 7db6e93 into thegoodengineer:main Aug 13, 2026
4 checks passed
@Chirag6722
Chirag6722 deleted the ci/cache-vscode-download branch August 13, 2026 09:03
@Chirag6722

Copy link
Copy Markdown
Collaborator Author

@thegoodengineer thanks for the merges and for the commit access, that was quick.

Where things stand now that all nine are in:

main is green. I ran the merged result on Windows as well as CI, since the combination only existed once everything landed: #7 and #13 both rewrite recorder.ts, and #6 and #9 both feed the tree, so I wanted to see them together rather than trust eight individually green branches. 35 passing, 0 failing on Windows, and the Linux job is green on every commit since.

One thing to know about that red run on the #9 merge: it was ENETUNREACH partway through downloading VS Code, not a test failure. I confirmed it by re-running the same commit untouched, and it passed. #14 caches the download so a network blip cannot redden a clean run again, which felt worth fixing properly here rather than getting used to retrying, given what the extension is for.

Four issues are still open and I have deliberately not sent PRs for them, because each needs a call that is yours:

Say which way you want any of them to go and I will do it.

Last thing before you cut a .vsix: package.json is still on 0.1.1, and main now has two changes users will actually notice. Unknown-exit entries no longer show up under "Failures Only", and a command whose terminal you close mid-run now leaves a grey "unknown" row where it previously left nothing at all. That probably wants a version bump and a line in the README's limitations section. Happy to open that one too if you want it.

@thegoodengineer

Copy link
Copy Markdown
Owner

Thanks for the writeup, and for catching that the #9 merge failure was network, not a real regression — good call confirming it with a clean re-run instead of just retrying and moving on.

Direction on the four:

And yes, please open the version bump + README note too — go ahead and cut a PR for that whenever's convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants