Skip to content

Keep version groups out of the leftover-lane exclusion - #10629

Merged
potatoqualitee merged 3 commits into
developmentfrom
fix-leftover-lane-version-groups
Sep 1, 2026
Merged

Keep version groups out of the leftover-lane exclusion#10629
potatoqualitee merged 3 commits into
developmentfrom
fix-leftover-lane-version-groups

Conversation

@andreasjordan

@andreasjordan andreasjordan commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

The leftover lane - any SCENARIO value that is not a group key, which is how the CI matrix entry default works - is computed in Get-TestsForBuildScenario as all tests minus every valid group in pester.groups.ps1. That subtraction included the explicit 2008R2SP2Express list, whose lane existed on AppVeyor but is not in the current CI matrix. Consequence: a file on that list that does not land in an autodetect scenario ran in no lane at all. Concretely: Invoke-DbaDbLogShipping.Tests.ps1 (unit-only, no instance references - even its parameter validation never ran on CI), and New-DbaDatabase.Tests.ps1 until #10628.

The autodetect path already anticipates exactly this class of problem: when computing tied functions it deliberately skips groups named 20* so that version groups stay additive - "also run these on an old-version lane" - rather than subtractive. This PR applies the same one-line filter to the leftover-lane computation, with a comment explaining why. The 2008R2SP2Express group itself stays untouched and ready for an old-version lane to return.

Verification

Computed the default lane with the fix in a fresh process: 219 files, now including the orphaned Invoke-DbaDbLogShipping.Tests.ps1, while files belonging to autodetect scenarios (spot check: Get-DbaDatabase.Tests.ps1) remain excluded. Scenario-scoped lanes are unaffected - the change only touches the else branch for non-key scenario names.

created by Claude and reviewed by Andreas Jordan

🤖 Generated with Claude Code

andreasjordan and others added 2 commits August 28, 2026 22:41
New-DbaDatabase.Tests.ps1 and Install-DbaCommunitySoftware.Tests.ps1
were the only test files referencing InstanceSingle and InstanceMulti
at once. The scenario autodetection excludes a file that matches a
second scenario string from both scenarios, so these two files ran in
no scenario-scoped run at all - a -Scenario SINGLE or MULTI lab run
silently skipped them, and on CI New-DbaDatabase.Tests.ps1 ran in no
lane whatsoever, because its membership in the 2008R2SP2Express group
also removed it from the leftover lane.

Both files need two instances anyway, so their single-instance work now
runs on InstanceMulti1 and the files land cleanly in MULTI. The
misleading variable $InstanceSingle in New-DbaDatabase.Tests.ps1, which
actually held a connection to InstanceMulti1, is renamed serverMulti1
alongside instance3 becoming serverMulti2.

Verified green on SQL03\SQL2025 and SQL03\SQL2022: New-DbaDatabase
13/13, Install-DbaCommunitySoftware 21 passed with the documented
pwsh-edition skips.

(do New-DbaDatabase, Install-DbaCommunitySoftware)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The leftover lane (any scenario name that is not a group key, like the
CI matrix entry "default") is computed as all tests minus every group
in pester.groups.ps1 - including the explicit 2008R2SP2Express list,
whose lane no longer exists in the CI matrix. A file in that list that
does not land in an autodetect scenario therefore ran in no lane at
all: Invoke-DbaDbLogShipping.Tests.ps1 (no instance references), and
New-DbaDatabase.Tests.ps1 until its lane fix.

The autodetect path already anticipates this: computing tied functions
skips groups named 20* so version groups stay additive. The leftover
lane computation now applies the same filter.

Verified by computing the default lane before and after: the orphaned
files are included, files of autodetect scenarios stay excluded.

(do Invoke-DbaDbLogShipping)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ersion-groups

The leftover-lane change releases New-DbaDatabase.Tests.ps1 into the
default lane, which provisions no instances, so this branch needs the
mixed-instance file moves from #10628 to be green on its own.

(do New-DbaDatabase, Install-DbaCommunitySoftware)
@andreasjordan

Copy link
Copy Markdown
Collaborator Author

The test (default) failure on the first run was the dependency on #10628 proving itself: this branch released New-DbaDatabase.Tests.ps1 into the leftover default lane, which provisions no instances, so all 10 of its integration tests failed at connect time. Merged the #10628 branch in so this PR is green standalone; the overlapping changes are identical, so merge order between the two does not matter.

created by Claude and reviewed by Andreas Jordan

@potatoqualitee potatoqualitee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete current head, version-group/additive selector semantics, final MULTI routing, and exact-head matrix evidence. No material CI coverage or correctness issues found.

@potatoqualitee
potatoqualitee merged commit b98428a into development Sep 1, 2026
22 checks passed
@potatoqualitee
potatoqualitee deleted the fix-leftover-lane-version-groups branch September 1, 2026 05:08
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