This is an automated email from the ASF dual-hosted git repository.
cwylie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new 57b2b3db21a Web console: fix Diff with current supervisor in data
loader (#18810)
57b2b3db21a is described below
commit 57b2b3db21aed772ef64ee3e03448b2ccffbd70a
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Thu Dec 4 18:15:30 2025 +0000
Web console: fix Diff with current supervisor in data loader (#18810)
---
.../src/druid-models/ingestion-spec/ingestion-spec.tsx | 2 +-
web-console/src/helpers/spec-conversion.ts | 4 ++++
.../src/views/load-data-view/load-data-view.tsx | 18 ++++++++++++++++--
3 files changed, 21 insertions(+), 3 deletions(-)
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 602ed298745..837ae3d4c8b 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/helpers/spec-conversion.ts
b/web-console/src/helpers/spec-conversion.ts
index 84ccb7bcb38..8246b7d2add 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<IngestionSpec>): string | un
return deepGet(spec, 'spec.dataSchema.dataSource');
}
+export function getSpecSupervisorId(spec: Partial<IngestionSpec>): 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 88694367baa..f20b42bcb0b 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 {
@@ -3386,6 +3386,20 @@ export class LoadDataView extends
React.PureComponent<LoadDataViewProps, LoadDat
</>
),
},
+ {
+ name: 'id',
+ label: 'Supervisor ID',
+ type: 'string',
+ defined: isStreamingSpec,
+ placeholder: '(default to the datasource name if not set)',
+ info: (
+ <p>
+ 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.
+ </p>
+ ),
+ },
{
name: 'spec.ioConfig.appendToExisting',
label: 'Append to existing',
@@ -3568,7 +3582,7 @@ export class LoadDataView extends
React.PureComponent<LoadDataViewProps, LoadDat
}
let currentSupervisorSpec: Partial<IngestionSpec> | undefined;
- const supervisorId = getSpecDatasourceName(spec);
+ const supervisorId = getSpecSupervisorId(spec);
if (isStreamingSpec(spec) && supervisorId) {
try {
currentSupervisorSpec = cleanSpec(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]