UPDATE: one platform route for table removal; table orchestration moves to PipelineTablesService

Review (maestro #510): batch and CDC tables are both removed through
DELETE /pipeline/{id}/jobs (the platform dispatches by type: Airflow refresh
vs Kafka Connect reconfigure), so the connector 'if' in the controller is
gone. deleteTable/deleteTables/addTable are now thin controller methods over
PipelineTablesService (mark -> resolve jobs -> platform -> rollback), with
typed request bodies.

Behavior change for batch: the platform refuses to remove the LAST table of
a pipeline (400 'Cannot remove all jobs'), where DELETE /jobs/{id} allowed it.

Co-Authored-By: WOZCODE <contact@withwoz.com>
This commit is contained in:
Rafael
2026-08-29 12:57:49 -03:00
co-authored by WOZCODE
parent 23f0554311
commit 2347f65b78
6 changed files with 513 additions and 502 deletions
@@ -4,6 +4,7 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
import { PlatformApiController } from './platform-api.controller';
import { PlatformApiService } from './platform-api.service';
import { PipelineTablesService } from './pipeline-tables.service';
import { ElasticsearchModule } from '../../services/elasticsearch';
import { DynamoDBModule } from '../../services/dynamodb';
import { CustomersModule } from '../customers/customers.module';
@@ -21,7 +22,7 @@ import { PipelinesV2Module } from '../pipelinesV2/pipelines.module';
forwardRef(() => PipelinesV2Module),
],
controllers: [PlatformApiController],
providers: [PlatformApiService, DadosferaLogger],
providers: [PlatformApiService, PipelineTablesService, DadosferaLogger],
exports: [PlatformApiService],
})
export class PlatformApiModule {}