Skip to content

Commit c918201

Browse files
authored
MINOR: Update DayOneWorkflow Agent Names (#20473)
* Update DayOneWorkflow Agent Names * Migrations for CollateAI DisplayName Update * Remove wrong migrations
1 parent 162244a commit c918201

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

bootstrap/sql/migrations/native/1.7.0/postgres/schemaChanges.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ CREATE INDEX IF NOT EXISTS query_cost_time_series_id_timestamp on test_case_res
4848

4949
UPDATE workflow_definition_entity
5050
SET json = jsonb_set(json, '{trigger,type}', '"periodicBatchEntity"')
51-
WHERE json->'trigger'->>'type' in ('periodicBatchEntityTrigger', 'periodicBatchEntityWorkflow');
51+
WHERE json->'trigger'->>'type' in ('periodicBatchEntityTrigger', 'periodicBatchEntityWorkflow');

openmetadata-service/src/main/java/org/openmetadata/service/governance/workflows/elements/nodes/automatedTask/createAndRunIngestionPipeline/CreateIngestionPipelineImpl.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,21 @@ private boolean deployPipeline(
192192
return response.getCode() == 200;
193193
}
194194

195+
private String getPipelineName(PipelineType pipelineType) {
196+
Map<PipelineType, String> pipelineNameByType =
197+
Map.of(
198+
PipelineType.METADATA, "Metadata Agent",
199+
PipelineType.USAGE, "Usage Agent",
200+
PipelineType.LINEAGE, "Lineage Agent",
201+
PipelineType.PROFILER, "Profiler Agent",
202+
PipelineType.AUTO_CLASSIFICATION, "AutoClassification Agent");
203+
204+
return pipelineNameByType.get(pipelineType);
205+
}
206+
195207
private IngestionPipeline getOrCreateIngestionPipeline(
196208
PipelineType pipelineType, ServiceEntityInterface service) {
197-
String displayName = String.format("[%s] %s", service.getName(), pipelineType);
209+
String displayName = getPipelineName(pipelineType);
198210
IngestionPipelineRepository repository =
199211
(IngestionPipelineRepository) Entity.getEntityRepository(Entity.INGESTION_PIPELINE);
200212

0 commit comments

Comments
 (0)