ci-azure - Skip the Windows SSPI test when the build exits early - #10515
Merged
Conversation
…out provisioning When the scoped test selection leaves the SINGLE 1/5 partition empty, appveyor.prep exits early without installing the pinned dbatools.library. The SSPI steps still ran and loaded whatever stale library the reused runner had, failing whenever that build predates NetworkCredentialSspiContextProvider. Honor the shim's early-exit flag. (do Copy-DbaDatabase, Test-DbaPath, Test-DbaBackupInformation) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intermittent SSPI failure (example)
The
Run PowerShell 7 Windows SSPI integration teststep fails only sometimes, and the pattern finally fell out of the logs:DBATOOLS_COMMIT_MESSAGEfalls back to the PR title. When a title carries a(do ...)marker (like Copy-DbaDatabase - Fix empty -NewName destination sweep and piped multi-database failures #10514's did), the run is scoped.appveyor.prepexits early without installing the pinned dbatools.library:appveyor.prep: exit early without provisioning (no tests to run).scenario == SINGLE && part == 1/5plus test-file presence, so they still run. Under pwsh 7 thedbatools.psd1import fails (required module unresolvable),Invoke-ManualPesterfalls back to the psm1 import, and that loads whatever stale dbatools.library the reused runner has lying around. If that build predatesNetworkCredentialSspiContextProvider, the test's type guard throws.Green vs. red depends on which runner the job lands on and what a previous job left in
Program Files, which is why it looked random. Full runs (development pushes, unscoped PRs) always install the pinned library first, so they always pass.Fix
Both SSPI steps now honor
C:\Temp\gha-exit-build.flag— the exact flagExit-AppveyorBuilddrops for the later pipeline stages to skip on. The shim deletes it at the start of every job's pipeline step, so the flag state is always this job's own.Validation
This PR's title deliberately carries the same
(do ...)scope as #10514 (normally PR titles shouldn't, but this PR changes no commands, so the title is the only way to reproduce the trigger). The workflow-only diff means changed-file detection narrows nothing, the title scope empties SINGLE 1/5, prep early-exits, and the SSPI step must logCI pipeline exited early without provisioning, skipping.and stay green — the exact A/B of the failing run.🤖 Generated with Claude Code