chore: improve monitoring for Fix: Add isBuildUpToDate check before logic functi
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.
This commit is contained in:
+7
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user