From 7bda53051750c208b74ebf31a7063efc6ef9be67 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Thu, 4 Dec 2025 07:17:46 -0800 Subject: [PATCH 1/2] fix Diff with current supervisor in data loader --- web-console/src/helpers/spec-conversion.ts | 4 ++++ web-console/src/views/load-data-view/load-data-view.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web-console/src/helpers/spec-conversion.ts b/web-console/src/helpers/spec-conversion.ts index 84ccb7bcb385..8246b7d2add0 100644 --- a/web-console/src/helpers/spec-conversion.ts +++ b/web-console/src/helpers/spec-conversion.ts @@ -51,6 +51,10 @@ export function getSpecDatasourceName(spec: Partial): string | un return deepGet(spec, 'spec.dataSchema.dataSource'); } +export function getSpecSupervisorId(spec: Partial): string | undefined { + return typeof spec.id === 'string' ? spec.id : getSpecDatasourceName(spec); +} + function convertFilter(filter: any): SqlExpression { switch (filter.type) { case 'selector': diff --git a/web-console/src/views/load-data-view/load-data-view.tsx b/web-console/src/views/load-data-view/load-data-view.tsx index 88694367baad..4f0defa395a4 100644 --- a/web-console/src/views/load-data-view/load-data-view.tsx +++ b/web-console/src/views/load-data-view/load-data-view.tsx @@ -143,7 +143,7 @@ import { updateSchemaWithSample, upgradeSpec, } from '../../druid-models'; -import { getSpecDatasourceName } from '../../helpers'; +import { getSpecDatasourceName, getSpecSupervisorId } from '../../helpers'; import { getLink } from '../../links'; import { Api, AppToaster, UrlBaser } from '../../singletons'; import { @@ -3568,7 +3568,7 @@ export class LoadDataView extends React.PureComponent | undefined; - const supervisorId = getSpecDatasourceName(spec); + const supervisorId = getSpecSupervisorId(spec); if (isStreamingSpec(spec) && supervisorId) { try { currentSupervisorSpec = cleanSpec( From 8759e832bfc6c7d24bda989101a2514df9819992 Mon Sep 17 00:00:00 2001 From: Vadim Ogievetsky Date: Thu, 4 Dec 2025 08:53:03 -0800 Subject: [PATCH 2/2] add input in publish step also --- .../druid-models/ingestion-spec/ingestion-spec.tsx | 2 +- .../src/views/load-data-view/load-data-view.tsx | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx index 602ed2987457..837ae3d4c8be 100644 --- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx +++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx @@ -77,12 +77,12 @@ const CURRENT_YEAR = new Date().getUTCFullYear(); export interface IngestionSpec { readonly type: IngestionType; + readonly id?: string; readonly spec: IngestionSpecInner; readonly context?: { useConcurrentLocks?: boolean }; readonly suspended?: boolean; // Added by the server - readonly id?: string; readonly groupId?: string; readonly resource?: any; } diff --git a/web-console/src/views/load-data-view/load-data-view.tsx b/web-console/src/views/load-data-view/load-data-view.tsx index 4f0defa395a4..f20b42bcb0bc 100644 --- a/web-console/src/views/load-data-view/load-data-view.tsx +++ b/web-console/src/views/load-data-view/load-data-view.tsx @@ -3386,6 +3386,20 @@ export class LoadDataView extends React.PureComponent ), }, + { + name: 'id', + label: 'Supervisor ID', + type: 'string', + defined: isStreamingSpec, + placeholder: '(default to the datasource name if not set)', + info: ( +

+ The ID of the supervisor that will manage the ingestion. This should generally + be set to the datasource name (the default if left unset) unless you are setting + up multiple supervisors for the same datasource. +

+ ), + }, { name: 'spec.ioConfig.appendToExisting', label: 'Append to existing',