[run-instance-commands] Preserve fast slow sequentiality (#19757)
# Introduction The command was wrongly running all fast and then all slow ignoring instance commands segment Leading to ```ts 1.23.0_AddGlobalObjectContextToCommandMenuItemAvailabilityTypeFastInstanceCommand_1776090711153 executed successfully [Nest] 32679 - 04/16/2026, 1:21:07 PM LOG [InstanceCommandRunnerService] 1.23.0_DropWorkspaceVersionColumnFastInstanceCommand_1785000000000 executed successfully [Nest] 32679 - 04/16/2026, 1:21:07 PM LOG [InstanceCommandRunnerService] 1.22.0_BackfillWorkspaceIdOnIndirectEntitiesSlowInstanceCommand_1775758621018 executed successfully [Nest] 32679 - 04/16/2026, 1:21:07 PM LOG [RunInstanceCommandsCommand] Instance commands completed ``` No prod/self host impact as 1.23 hasn't been released yet
This commit is contained in:
+16
-3
@@ -283,10 +283,10 @@ export class UpgradeMigrationService {
|
||||
return completedCount === workspaceIds.length;
|
||||
}
|
||||
|
||||
async getLastAttemptedInstanceCommandOrThrow(): Promise<{
|
||||
async getLastAttemptedInstanceCommand(): Promise<{
|
||||
name: string;
|
||||
status: UpgradeMigrationStatus;
|
||||
}> {
|
||||
} | null> {
|
||||
const migration = await this.upgradeMigrationRepository
|
||||
.createQueryBuilder('migration')
|
||||
.select(['migration.name', 'migration.status'])
|
||||
@@ -304,11 +304,24 @@ export class UpgradeMigrationService {
|
||||
.getOne();
|
||||
|
||||
if (!migration) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return { name: migration.name, status: migration.status };
|
||||
}
|
||||
|
||||
async getLastAttemptedInstanceCommandOrThrow(): Promise<{
|
||||
name: string;
|
||||
status: UpgradeMigrationStatus;
|
||||
}> {
|
||||
const result = await this.getLastAttemptedInstanceCommand();
|
||||
|
||||
if (!result) {
|
||||
throw new Error(
|
||||
'No instance command found — the database may not have been initialized',
|
||||
);
|
||||
}
|
||||
|
||||
return { name: migration.name, status: migration.status };
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user