MINOR: Update DayOneWorkflow Agent Names (#20473)

* Update DayOneWorkflow Agent Names

* Migrations for CollateAI DisplayName Update

* Remove wrong migrations
This commit is contained in:
IceS2 2025-03-28 14:01:42 +01:00 committed by GitHub
parent 162244a127
commit c9182016db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -48,4 +48,4 @@ CREATE INDEX IF NOT EXISTS query_cost_time_series_id_timestamp on test_case_res
UPDATE workflow_definition_entity UPDATE workflow_definition_entity
SET json = jsonb_set(json, '{trigger,type}', '"periodicBatchEntity"') SET json = jsonb_set(json, '{trigger,type}', '"periodicBatchEntity"')
WHERE json->'trigger'->>'type' in ('periodicBatchEntityTrigger', 'periodicBatchEntityWorkflow'); WHERE json->'trigger'->>'type' in ('periodicBatchEntityTrigger', 'periodicBatchEntityWorkflow');

View File

@ -192,9 +192,21 @@ public class CreateIngestionPipelineImpl {
return response.getCode() == 200; return response.getCode() == 200;
} }
private String getPipelineName(PipelineType pipelineType) {
Map<PipelineType, String> pipelineNameByType =
Map.of(
PipelineType.METADATA, "Metadata Agent",
PipelineType.USAGE, "Usage Agent",
PipelineType.LINEAGE, "Lineage Agent",
PipelineType.PROFILER, "Profiler Agent",
PipelineType.AUTO_CLASSIFICATION, "AutoClassification Agent");
return pipelineNameByType.get(pipelineType);
}
private IngestionPipeline getOrCreateIngestionPipeline( private IngestionPipeline getOrCreateIngestionPipeline(
PipelineType pipelineType, ServiceEntityInterface service) { PipelineType pipelineType, ServiceEntityInterface service) {
String displayName = String.format("[%s] %s", service.getName(), pipelineType); String displayName = getPipelineName(pipelineType);
IngestionPipelineRepository repository = IngestionPipelineRepository repository =
(IngestionPipelineRepository) Entity.getEntityRepository(Entity.INGESTION_PIPELINE); (IngestionPipelineRepository) Entity.getEntityRepository(Entity.INGESTION_PIPELINE);