Automated Version Updates - redhat-developer/vscode-extension-tester GitHub Wiki
Automated VS Code Version Updates
Overview
ExTester automatically maintains support for the latest 3 stable VS Code releases through an automated workflow. This reduces maintenance burden while ensuring the testing framework stays current with VS Code updates.
How It Works
Version Window
ExTester supports a floating window of the 3 most recent VS Code major versions, always using the latest patch release for each:
Example:
┌─────────────────────────────────────────────────┐
│ Min: 1.109.5 (latest patch of 1.109.x) │
│ Middle: 1.110.1 (latest patch of 1.110.x) │
│ Max: 1.111.0 (latest patch of 1.111.x) │
└─────────────────────────────────────────────────┘
When a new major version is released (e.g., 1.112.0), the window shifts:
New major version: 1.112.x
┌─────────────────────────────────────────────────┐
│ Min: 1.110.1 (latest patch of 1.110.x) │
│ Middle: 1.111.0 (latest patch of 1.111.x) │
│ Max: 1.112.0 (latest patch of 1.112.x) │
└─────────────────────────────────────────────────┘
When a new patch is released (e.g., 1.111.1), only that version updates:
New patch: 1.111.1
┌─────────────────────────────────────────────────┐
│ Min: 1.109.5 (unchanged) │
│ Middle: 1.110.1 (unchanged) │
│ Max: 1.111.1 (updated patch) │
└─────────────────────────────────────────────────┘
Automation Workflow
The .github/workflows/update-vscode-versions.yml workflow:
- Runs weekly (every Monday at 9 AM UTC)
- Fetches all stable VS Code versions from the official API
- Identifies the latest 3 major versions (e.g., 1.111.x, 1.110.x, 1.109.x)
- Selects the latest patch release for each major version
- Compares with current versions in the repository
- Updates if changes are detected:
packages/extester/package.json-vscode-minandvscode-max.github/workflows/main.yml- middle version in test matrix
- Creates a Pull Request with all changes
- Triggers CI tests against all 3 versions automatically
Files Updated
1. packages/extester/package.json
"supportedVersions": {
"vscode-min": "1.109.5", // ← Updated to oldest of 3
"vscode-max": "1.111.0" // ← Updated to newest of 3
}
These values are used when users run tests with:
--code_version=min- Uses the oldest supported version--code_version=max- Uses the newest supported version
2. .github/workflows/main.yml
matrix:
version: [min, 1.110.1, max] // ← Middle version updated
This ensures CI tests run against all 3 supported versions.
For Maintainers
Reviewing Auto-Generated PRs
When the workflow creates a PR, you should:
- Check the PR description for version changes
- Wait for CI tests to complete (tests all 3 versions)
- Review test results for any failures or warnings
- Look for breaking changes in page objects
- Merge if all tests pass ✅
Manual Trigger
You can manually trigger the workflow:
- Go to Actions → Update VS Code Version Window
- Click "Run workflow"
- Select the branch (usually
main) - Click "Run workflow"
When Tests Fail
If the automated PR shows test failures:
- Review the failure - Is it a breaking change in VS Code?
- Update page objects if needed to fix compatibility
- Push fixes to the auto-generated PR branch
- Re-run tests to verify fixes
- Merge once tests pass
Skipping a Version
If a VS Code version has known issues:
- Close the auto-generated PR without merging
- Wait for the next release - the workflow will create a new PR
- Document the skip in an issue for tracking
For Users
Using Version Placeholders
Users can specify VS Code versions when running tests:
# Use the oldest supported version
extest setup-tests --code_version=min
# Use a specific version
extest setup-tests --code_version=1.110.1
# Use the newest supported version
extest setup-tests --code_version=max
# Use the absolute latest (may be untested)
extest setup-tests --code_version=latest
Checking Supported Versions
To see which versions are currently supported:
# View package.json
cat packages/extester/package.json | grep -A 3 "supportedVersions"
Or check the package.json file directly.
Troubleshooting
Workflow Fails
If the automated workflow fails, it will:
- Create an issue with details
- Notify maintainers
- Require manual intervention
Manual fallback:
- Check latest VS Code versions at https://code.visualstudio.com/updates
- Update
packages/extester/package.jsonmanually - Update
.github/workflows/main.ymlmanually - Run tests and create a release
Version Mismatch
If you notice version mismatches between files:
- Run the workflow manually to sync versions
- Or update both files manually to match
API Rate Limits
The workflow includes retry logic and runs weekly to avoid rate limits. If you encounter issues:
- Wait a few hours and try again
- Check GitHub Actions status
- Use manual update process as fallback
Benefits
For Maintainers
- ✅ 80% less manual work - No more checking for new versions
- ✅ No version mismatches - Both files updated atomically
- ✅ Automatic testing - CI validates all 3 versions
- ✅ Clear audit trail - All changes via PRs
For Users
- ✅ Always current - Support for latest VS Code versions
- ✅ Predictable - Always 3 versions supported
- ✅ Flexible - Can use min/max/latest as needed
- ✅ Reliable - Tested before release
Related Documentation
- Test Setup - How to set up tests
- Mocha Configuration - Configuring test runner
- Contributing - How to contribute