Remove logic function layer (#17697)
## Remove logic function layer Package.json and yarn.lock are now on the application entity, so the logic function layer is no longer used except as a legacy source for the 1.17 backfill. This PR removes all layer usage outside of that migration and keeps only the entity for backfill. ### Summary - **Kept:** `LogicFunctionLayerEntity` and its table, only used by the 1.17 backfill command to read legacy layer data and backfill application package files. - **Removed:** All other layer logic: CRUD, cache, resolvers, services, DTOs, and frontend types. Logic functions now depend only on the application for package/dependency context. ### Why Dependencies instead of Source for package files Package.json and yarn.lock are the application’s dependency set and are stored under the application in **FileFolder.Dependencies**. The build service and drivers now read them only from Dependencies; nothing is written to Source for these files.
This commit is contained in:
-1
@@ -194,7 +194,6 @@ export class MigrateWorkflowCodeStepsCommand extends ActiveOrSuspendedWorkspaces
|
||||
name: oldLogicFunction.name,
|
||||
description: oldLogicFunction.description ?? undefined,
|
||||
timeoutSeconds: oldLogicFunction.timeoutSeconds ?? 300,
|
||||
logicFunctionLayerId: oldLogicFunction.logicFunctionLayerId,
|
||||
toolInputSchema: oldLogicFunction.toolInputSchema ?? undefined,
|
||||
isTool: oldLogicFunction.isTool ?? false,
|
||||
},
|
||||
|
||||
+1
-10
@@ -1,15 +1,14 @@
|
||||
import { Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { Command } from 'nest-commander';
|
||||
import { Repository } from 'typeorm';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { ActiveOrSuspendedWorkspacesMigrationCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspaces-migration.command-runner';
|
||||
import { RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspaces-migration.command-runner';
|
||||
import { ApplicationService } from 'src/engine/core-modules/application/services/application.service';
|
||||
import { FileStorageService } from 'src/engine/core-modules/file-storage/file-storage.service';
|
||||
import { LogicFunctionLayerService } from 'src/engine/core-modules/logic-function/logic-function-layer/services/logic-function-layer.service';
|
||||
import { RecordPositionService } from 'src/engine/core-modules/record-position/services/record-position.service';
|
||||
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service';
|
||||
@@ -66,7 +65,6 @@ export class SeedWorkflowV1_16Command extends ActiveOrSuspendedWorkspacesMigrati
|
||||
protected readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager,
|
||||
protected readonly dataSourceService: DataSourceService,
|
||||
private readonly applicationService: ApplicationService,
|
||||
private readonly logicFunctionLayerService: LogicFunctionLayerService,
|
||||
private readonly fileStorageService: FileStorageService,
|
||||
private readonly recordPositionService: RecordPositionService,
|
||||
) {
|
||||
@@ -421,12 +419,6 @@ export class SeedWorkflowV1_16Command extends ActiveOrSuspendedWorkspacesMigrati
|
||||
{ workspaceId },
|
||||
);
|
||||
const applicationId = workspaceCustomFlatApplication.id;
|
||||
const { id: logicFunctionLayerId } =
|
||||
await this.logicFunctionLayerService.createCommonLayer({
|
||||
workspaceId,
|
||||
applicationUniversalIdentifier:
|
||||
workspaceCustomFlatApplication.universalIdentifier,
|
||||
});
|
||||
const id = uuidv4();
|
||||
const universalIdentifier = uuidv4();
|
||||
const now = new Date();
|
||||
@@ -446,7 +438,6 @@ export class SeedWorkflowV1_16Command extends ActiveOrSuspendedWorkspacesMigrati
|
||||
checksum: null,
|
||||
toolInputSchema: null,
|
||||
isTool: false,
|
||||
logicFunctionLayerId,
|
||||
cronTriggerSettings: null,
|
||||
databaseEventTriggerSettings: null,
|
||||
httpRouteTriggerSettings: null,
|
||||
|
||||
-2
@@ -16,7 +16,6 @@ import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-
|
||||
import { FeatureFlagModule } from 'src/engine/core-modules/feature-flag/feature-flag.module';
|
||||
import { FileStorageModule } from 'src/engine/core-modules/file-storage/file-storage.module';
|
||||
import { FileEntity } from 'src/engine/core-modules/file/entities/file.entity';
|
||||
import { CoreLogicFunctionLayerModule } from 'src/engine/core-modules/logic-function/logic-function-layer/logic-function-layer.module';
|
||||
import { RecordPositionModule } from 'src/engine/core-modules/record-position/record-position.module';
|
||||
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { DataSourceModule } from 'src/engine/metadata-modules/data-source/data-source.module';
|
||||
@@ -58,7 +57,6 @@ import { TaskTargetWorkspaceEntity } from 'src/modules/task/standard-objects/tas
|
||||
FieldMetadataModule,
|
||||
ObjectMetadataModule,
|
||||
ApplicationModule,
|
||||
CoreLogicFunctionLayerModule,
|
||||
LogicFunctionModule,
|
||||
RecordPositionModule,
|
||||
GlobalWorkspaceDataSourceModule,
|
||||
|
||||
Reference in New Issue
Block a user