Fix upgrade --start-from-workspace-id (#20116)

# Introduction
Prevent using both `--start-from-workspace-id` and `--workspace`

When any of the two are being passed we prevent passing to the next
instance segment, it would require an upgrade re run even if legit

When `--start-from-workspace-id` is passed we filter from all the
fetched active or suspended workspace ids and apply equivalent filter as
before
This commit is contained in:
Paul Rastoin
2026-04-28 18:46:15 +02:00
committed by GitHub
parent 6aec449a56
commit d2dda67596
3 changed files with 235 additions and 9 deletions
@@ -113,6 +113,15 @@ export class UpgradeCommand extends CommandRunner {
});
}
if (
isDefined(options.workspaceId) &&
isDefined(options.startFromWorkspaceId)
) {
throw new Error(
'Cannot use --start-from-workspace-id together with -w/--workspace-id',
);
}
try {
const sequence = this.upgradeSequenceReaderService.getUpgradeSequence();