[Validate build and run] Early return if workspace migration has no actions (#16467)
# Introduction Early returning in `validateBuildAndRun` as the runner even if passed an empty workspace migration actions array be invalidating dependency related flat entity maps. When we will refactor the runner to consume the generic flat entity maps tools such as `addFlatEntityToFlatEntityAndRelatedEntityMapsThroughMutationOrThrow` we will be able to remove the dependency cache invalidation
This commit is contained in:
+7
@@ -189,6 +189,13 @@ export class WorkspaceMigrationValidateBuildAndRunService {
|
||||
return validateAndBuildResult;
|
||||
}
|
||||
|
||||
// Note: This should be removed once we've refactored the runner optimistic rendering
|
||||
// As with the current implementation passing an empty workspace migration might result
|
||||
// in dependency flat entity maps invalidation
|
||||
if (validateAndBuildResult.workspaceMigration.actions.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.workspaceMigrationRunnerV2Service
|
||||
.run(validateAndBuildResult.workspaceMigration)
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user