Skip to content

Versioning script follow-ups deferred from #4602 #4603

Description

@priyankatiwari08

Splitting these out of #4602 so that PR stays scoped to restoring the preview2 package and file version convention for the 7.1.0-preview3 release. None of these block the release; all came up during review of that PR.

1. Decide whether the addRevision: true version shape should exist

compute-versions.ps1 supports a second shape, 1.2.3.<revision>-previewX, selected by the addRevision pipeline parameter. It stamps the build ID in as the fourth numeric component so repeated publishes of the same base version get distinct package versions, which NuGet requires.

Raised by @cheenamalhotra in #4602 (comment).

Current usage, across the last 100 runs of each pipeline:

Pipeline Runs with addRevision: true
sqlclient-official (def 2241) 0
sqlclient-non-official (def 2240) 7

Both pipelines default it to false (sqlclient-official.yml L41-44, sqlclient-non-official.yml L33-36), and it has never been used on an official build. Six of the seven non-official runs were on 2026-08-07, while #4336 was in development.

If it is dropped, we need an answer for how test-feed republishing of an unchanged base version works instead. Worth @paulmedynski weighing in since it arrived with #4336.

2. Nothing in CI runs the versioning Pester tests

eng/pipelines/onebranch/scripts/tests/ is never executed anywhere. There is no pipeline stage, GitHub workflow, or build.proj target referencing it — the only reference in the repo is the tests' own README.

Two things need fixing together:

  • Wire the suite into CI.
  • Pin Pester to 5.x. The README says -MinimumVersion 5.0, which now resolves to 6.x, and 6.x fails both test files at discovery with InvalidOperationException: A 'break' or 'continue' statement with a label that does not match any enclosing loop escaped from your code (Pester breaks on functions with unknown label pester/Pester#2669).

Also worth noting compute-versions.Tests.ps1 uses the three-argument form of Join-Path, which is PowerShell 6+ only, so the suite needs pwsh rather than Windows PowerShell 5.1.

3. Get-CanonicalVersions passes a build number that cannot apply

compute-versions.ps1 passes -p:BuildNumber=$wrappedRevision to the GetVersions targets unconditionally, including when AddRevision is $false. It is harmless today because BuildSuffix is empty on that path so Versions.props ignores it, but the call reads as though the revision is in play when it is not. Left alone in #4602 to keep that diff minimal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area\EngineeringUse this for issues that are targeted for changes in the 'eng' folder or build systems.

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions