Commit d9e2031
authored
## Summary
This PR stops `update_ext_version.py` from overriding the pre-release
version number and instead lets the `vscode-engineering` shared pipeline
template handle it via the `standardizedVersioning` flag (which was
already enabled but being overriden).
## Why change the versioning?
### Problem 1: Poor readability
The old pre-release version format was `1.27.10931010`, computed as `1`
+ Julian day (`093`) + hour (`10`) + minute (`10`). Looking at
`1.27.10931010`, there's no easy way to tell *when* it was built. You'd
have to reverse-engineer the Julian day and time to figure out it means
"April 3, 10:10 AM UTC".
### Problem 2: Different platforms got different version numbers
The pre-release pipeline builds 10 platform-specific packages
(win32-x64, darwin-arm64, linux-x64, etc.) in parallel. Each platform
ran `update_ext_version.py` independently, and because the script uses
the current time (down to the minute), each platform ended up with a
slightly different version:
```
1.27.10931008 ← linux-x64 finished at 10:08
1.27.10931009 ← darwin-arm64 finished at 10:09
1.27.10931010 ← win32-x64 finished at 10:10
```
In VS Code, users only see their own platform's version, so this wasn't
visually obvious — but the Marketplace version history showed multiple
entries per day, which was confusing.
For example, marketplace shows
<img width="858" height="582" alt="image"
src="https://github.com/user-attachments/assets/d7790618-0ce7-4ee9-b885-e63ca47264ce"
/>
while vscode shows
<img width="625" height="144" alt="image"
src="https://github.com/user-attachments/assets/2c9450cd-92b2-4c75-a882-2f777a32291d"
/>
## What does `standardizedVersioning` do?
The flag is already set in our pre-release pipeline
(`azure-pipeline.pre-release.yml` line 32):
```yaml
standardizedVersioning: true
```
When this flag is `true` and it's a pre-release build, the
`vscode-engineering` template runs a step called
`modify-extension-version.yml` **before** our `buildSteps`. See
https://github.com/microsoft/vscode-engineering/blob/main/azure-pipelines/extension/templates/steps/modify-extension-version.yml
for what it does.
This runs **once per platform job**, but `$(Build.BuildNumber)` is the
**same for all jobs** in a pipeline run, so every platform gets the
identical version.
### Example versions under the new scheme
| Scenario | Version |
|---|---|
| First build on April 6, 2026 | `1.27.2026040601` |
| Second build same day (manual re-trigger) | `1.27.2026040602` |
| Build on April 7 | `1.27.2026040701` |
### Why this is better
- **Readable** — `1.27.2026040601` clearly means "April 6, 2026, build
1"
- **Consistent** — all 10 platforms share the exact same version
- **Same-day safe** — the `.Rev` suffix from Azure DevOps handles
re-triggers
- **Always increasing** — `2026040601` > `13652359` (old max), so new
versions always sort ahead of old ones on the Marketplace
- **Within Marketplace limits** — max possible value ~`2099123199` ≈ 2.1
billion, well under the uint32 max of ~4.3 billion
## What changed in the code?
### `build/update_ext_version.py`
- Added an **early return** for the pre-release case (no `--release`, no
`--build-id`). The script now validates the even/odd minor version rule
and strips any `-dev`/`-rc` suffix if `--for-publishing`, but **does not
overwrite the version** set by the template.
- Removed the `else` branch that called `micro_build_number()` — this
was the code that was clobbering the template's version.
- The `--release` and `--build-id` code paths are **completely
unchanged**.
### `build/azure-pipeline.pre-release.yml`
- Renamed the step display name from "Update build number" to "Validate
version number" to reflect what it actually does now.
### `build/test_update_ext_version.py`
- Updated test expectations: the no-args and `--for-publishing` (without
`--release` or `--build-id`) cases now expect the original micro version
to be preserved instead of being replaced with a computed timestamp.
- Removed the unused `EXPECTED_BUILD_ID` constant.
## Stable releases are not affected
The stable pipeline (`azure-pipeline.stable.yml`) does not use
`standardizedVersioning` and continues to call `update_ext_version.py
--release --for-publishing`, which is unchanged.
1 parent 76c2430 commit d9e2031
3 files changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
74 | | - | |
| 70 | + | |
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
| |||
80 | 76 | | |
81 | 77 | | |
82 | 78 | | |
83 | | - | |
| 79 | + | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
98 | | - | |
| 94 | + | |
99 | 95 | | |
100 | 96 | | |
101 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | 95 | | |
84 | 96 | | |
| |||
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
0 commit comments