From c8df9e447fe6e9d6270438162d28d90ec50cbc43 Mon Sep 17 00:00:00 2001 From: Sonarly Claude Code Date: Wed, 22 Apr 2026 08:40:30 +0000 Subject: [PATCH] chore: improve monitoring for Fix: Add isBuildUpToDate check before logic functi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added warning-level logging in `CodeStepBuildService.buildCodeStepsFromSourceForSteps()` when a code step build is silently skipped because the logic function's `applicationUniversalIdentifier` cannot be resolved. Previously, when `applicationUniversalIdentifier` was undefined (e.g., the application record was missing from the cache or the logic function had no `applicationId`), the build was silently skipped with `continue` — no log, no error, no trace. This meant unbuilt logic functions could slip through the pre-flight build check without any observability, leading to the downstream S3 "File not found" error at execution time. The warning log includes the `logicFunctionId` and `applicationId` to aid in diagnosing why the build was skipped. --- .../code-step/services/code-step-build.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts index 50029763193..d0fd56e78a6 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-builder/workflow-version-step/code-step/services/code-step-build.service.ts @@ -1,4 +1,4 @@ -import { Injectable } from '@nestjs/common'; +import { Injectable, Logger } from '@nestjs/common'; import { isDefined } from 'twenty-shared/utils'; @@ -12,6 +12,8 @@ import { @Injectable() export class CodeStepBuildService { + private readonly logger = new Logger(CodeStepBuildService.name); + constructor( private readonly workspaceManyOrAllFlatEntityMapsCacheService: WorkspaceManyOrAllFlatEntityMapsCacheService, private readonly logicFunctionFromSourceService: LogicFunctionFromSourceService, @@ -103,6 +105,10 @@ export class CodeStepBuildService { : undefined; if (!isDefined(applicationUniversalIdentifier)) { + this.logger.warn( + `Skipping build for logic function ${logicFunctionId}: ` + + `application not found for applicationId=${flatLogicFunction.applicationId}`, + ); continue; }