Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Problem
The VS Code version 1.100.0 is hardcoded in 3 separate locations:
| Location | Line | Usage |
|---|---|---|
apps/vscode-e2e/package.json |
21 | "@types/vscode": "1.100.0" |
apps/vscode-e2e/src/runTest.ts |
164 | version: process.env.VSCODE_VERSION || "1.100.0" |
.github/workflows/e2e.yml |
44 | key: vscode-test-${{ runner.os }}-1.100.0-v1 |
When @types/vscode is manually updated, all three locations must be updated together. If they drift:
- Cache misses occur (downloading VS Code binary every run)
- Version mismatches between types and downloaded binary
- Potential test failures
Context
- Renovate is configured to disable automatic updates for
@types/vscode(seerenovate.jsonlines 87-90) - This is the correct approach for VS Code extensions (types must align with
engines.vscode) - Manual updates are still expected when intentionally bumping minimum VS Code version
Expected Result
Version should be updated in all locations when @types/vscode changes.
Proposed Solutions
Option 1: Dynamic cache key extraction (Recommended)
# In .github/workflows/e2e.yml
- name: Get VS Code version from package.json
id: vscode-ver
run: |
VERSION=$(node -p 'require("./apps/vscode-e2e/package.json").devDependencies["@types/vscode"]')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Cache VS Code test binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: apps/vscode-e2e/.vscode-test/
key: vscode-test-${{ runner.os }}-${{ steps.vscode-ver.outputs.version }}-v1This keeps the cache key in sync with package.json automatically.
Option 2: Documentation reminder
Add a comment in the workflow:
# NOTE: Keep in sync with apps/vscode-e2e/package.json devDependencies["@types/vscode"]
# Update only when intentionally bumping minimum VS Code version
key: vscode-test-${{ runner.os }}-1.100.0-v1Option 3: Hash-based cache key
key: vscode-test-${{ runner.os }}-${{ hashFiles('apps/vscode-e2e/package.json') }}-v1Auto-invalidates on package.json changes, but may also invalidate on unrelated changes.
Variations Tried
Researched best practices from:
- Renovate docs and community discussions
- GitHub Actions caching documentation
- Other VS Code extension projects (Markuplint, VS Code DVC, freeCodeCamp)
Relevant Files
apps/vscode-e2e/package.jsonapps/vscode-e2e/src/runTest.ts.github/workflows/e2e.ymlrenovate.json(already configured to disable@types/vscodeauto-updates)
Related
- PR 🐛 test(mcp): fix McpHub Windows command wrapping test ordering #632 added the hardcoded version to the workflow cache key
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Activity
edelauna commentedon Jun 23, 2026
Fixed by dynamically extracting the VS Code version from
package.jsonin both locations:Changes made:
.github/workflows/e2e.yml: Added step to extract@types/vscodeversion frompackage.jsonand use it in the cache keyapps/vscode-e2e/src/runTest.ts: Read@types/vscodefrompackage.jsoninstead of hardcoded fallbackNow when
@types/vscodeis manually updated (per Renovate config), the workflow cache key and test runner will automatically use the new version. TheVSCODE_VERSIONenv var is still supported for overriding.This implements Option 1 from the issue description.
edelauna commentedon Jun 23, 2026
Closed as fixed - VS Code version now dynamically read from
package.jsonin both workflow and test runner.