The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix front comp build/run order to be processed before dependent entities (#18232)
Paul Rastoin856859f9f34c
diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/services/workspace-migration-build-orchestrator.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/services/workspace-migration-build-orchestrator.service.tsindex 58babdcef1c..b82543b2932 100644--- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration/services/workspace-migration-build-orchestrator.service.ts+++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration/services/workspace-migration-build-orchestrator.service.ts@@ -523,6 +523,31 @@ export class WorkspaceMigrationBuildOrchestratorService {}}+ if (isDefined(flatFrontComponentMaps)) {+ const { from: fromFlatFrontComponentMaps, to: toFlatFrontComponentMaps } =+ flatFrontComponentMaps;++ const frontComponentResult =+ await this.workspaceMigrationFrontComponentActionsBuilderService.validateAndBuild(+ {+ additionalCacheDataMaps,+ from: fromFlatFrontComponentMaps,+ to: toFlatFrontComponentMaps,+ buildOptions,+ dependencyOptimisticFlatEntityMaps: optimisticAllFlatEntityMaps,+ workspaceId,+ },+ );++ if (frontComponentResult.status === 'fail') {+ orchestratorFailureReport.frontComponent.push(+ ...frontComponentResult.errors,+ );+ } else {+ orchestratorActionsReport.frontComponent = frontComponentResult.actions;+ }+ }+if (isDefined(flatCommandMenuItemMaps)) {const {from: fromFlatCommandMenuItemMaps,@@ -655,31 +680,6 @@ export class WorkspaceMigrationBuildOrchestratorService {}}- if (isDefined(flatFrontComponentMaps)) {- const { from: fromFlatFrontComponentMaps, to: toFlatFrontComponentMaps } =- flatFrontComponentMaps;-- const frontComponentResult =- await this.workspaceMigrationFrontComponentActionsBuilderService.validateAndBuild(- {- additionalCacheDataMaps,- from: fromFlatFrontComponentMaps,- to: toFlatFrontComponentMaps,- buildOptions,- dependencyOptimisticFlatEntityMaps: optimisticAllFlatEntityMaps,- workspaceId,- },- );-- if (frontComponentResult.status === 'fail') {- orchestratorFailureReport.frontComponent.push(- ...frontComponentResult.errors,- );- } else {- orchestratorActionsReport.frontComponent = frontComponentResult.actions;- }- }-if (isDefined(flatWebhookMaps)) {const { from: fromFlatWebhookMaps, to: toFlatWebhookMaps } =flatWebhookMaps;@@ -795,6 +795,12 @@ export class WorkspaceMigrationBuildOrchestratorService {...aggregatedOrchestratorActionsReport.skill.update,///+ // Front components+ ...aggregatedOrchestratorActionsReport.frontComponent.delete,+ ...aggregatedOrchestratorActionsReport.frontComponent.create,+ ...aggregatedOrchestratorActionsReport.frontComponent.update,+ ///+// Command Menu Items...aggregatedOrchestratorActionsReport.commandMenuItem.delete,...aggregatedOrchestratorActionsReport.commandMenuItem.create,@@ -843,12 +849,6 @@ export class WorkspaceMigrationBuildOrchestratorService {.update,///- // Front components- ...aggregatedOrchestratorActionsReport.frontComponent.delete,- ...aggregatedOrchestratorActionsReport.frontComponent.create,- ...aggregatedOrchestratorActionsReport.frontComponent.update,- ///-// Webhooks...aggregatedOrchestratorActionsReport.webhook.delete,...aggregatedOrchestratorActionsReport.webhook.create,