scripts: vsql rollback selection consults RestartPending again
b7c22e1 shipped without the RestartPending check in the snapshot selection:
a mutation test on the tests' own predicate failed to restore the file before
the commit. A snapshot is open again while an instance is unrestored or its
restart has not succeeded, so -Rollback -RestartInstances retries it.
Pester green on this exact file: PowerShell 7.6 (63) and 5.1 (62, 1 skipped).
The three retry tests fail without the check (mutation run on a copy).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -516,7 +516,7 @@ function Invoke-VsqlRollback($P, $Confirm, [bool]$WhatIf, [string[]]$Instances,
|
||||
foreach ($f in $files) {
|
||||
$s = & $load $f
|
||||
$st = $state[$f.Name]
|
||||
$open = @(& $pick $s | Where-Object { -not $st -or -not $st.Restored.Contains($_.name) })
|
||||
$open = @(& $pick $s | Where-Object { -not $st -or -not $st.Restored.Contains($_.name) -or $st.RestartPending.Contains($_.name) })
|
||||
if ($open) { $chosen = [pscustomobject]@{ File = $f; Data = $s }; $entries = $open; break }
|
||||
}
|
||||
if (-not $chosen) {
|
||||
|
||||
Reference in New Issue
Block a user