This is an automated email from the ASF dual-hosted git repository.

tuglu 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 85a94ca247d Update UI to account for multiple supervisors ingesting 
into same datasource (#18175)
85a94ca247d is described below

commit 85a94ca247dbae55a7bdd22653b5c71b02709cde
Author: jtuglu-netflix <[email protected]>
AuthorDate: Wed Jul 2 08:22:32 2025 -0700

    Update UI to account for multiple supervisors ingesting into same 
datasource (#18175)
    
    - Updates the supervisor view UI to include the datasource column in the 
sys.supervisors table
    - Ensures the id field in the root of an stream ingestion spec is always 
rendered in the spec view/edit window.
---
 .../druid-models/ingestion-spec/ingestion-spec.spec.ts  |  3 +++
 .../src/druid-models/ingestion-spec/ingestion-spec.tsx  |  2 +-
 .../__snapshots__/supervisors-view.spec.tsx.snap        | 16 +++++++++-------
 .../src/views/supervisors-view/supervisors-view.tsx     | 17 ++++++++++++++---
 4 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts 
b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts
index 5b4a43aaaa3..cac347cb31f 100644
--- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts
+++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.spec.ts
@@ -369,6 +369,7 @@ describe('ingestion-spec', () => {
   it('upgrades / downgrades back compat supervisor spec', () => {
     const backCompatSupervisorSpec = {
       type: 'kafka',
+      id: 'metrics-kafka',
       spec: {
         dataSchema: {
           dataSource: 'metrics-kafka',
@@ -486,6 +487,7 @@ describe('ingestion-spec', () => {
     };
 
     expect(cleanSpec(upgradeSpec(backCompatSupervisorSpec))).toEqual({
+      id: 'metrics-kafka',
       spec: {
         dataSchema: {
           dataSource: 'metrics-kafka',
@@ -560,6 +562,7 @@ describe('ingestion-spec', () => {
         },
       } as any),
     ).toEqual({
+      id: 'index_parallel_coronavirus_hamlcmea_2020-03-19T00:56:12.175Z',
       type: 'index_parallel',
       spec: {
         dataSchema: {},
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 0100cc34c04..602ed298745 100644
--- a/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
+++ b/web-console/src/druid-models/ingestion-spec/ingestion-spec.tsx
@@ -523,7 +523,7 @@ export function cleanSpec(spec: Partial<IngestionSpec>): 
Partial<IngestionSpec>
     spec = deleteKeys(spec, ['dataSource'] as any[]);
   }
 
-  return deleteKeys(spec, ['id', 'groupId', 'resource']);
+  return deleteKeys(spec, ['groupId', 'resource']);
 }
 
 export function upgradeSpec(spec: any, yolo = false): Partial<IngestionSpec> {
diff --git 
a/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
 
b/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
index b94559423b6..fd8462b8647 100644
--- 
a/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
+++ 
b/web-console/src/views/supervisors-view/__snapshots__/supervisors-view.spec.tsx.snap
@@ -70,6 +70,7 @@ exports[`SupervisorsView matches snapshot 1`] = `
       columns={
         [
           "Supervisor ID",
+          "Datasource",
           "Type",
           "Topic/Stream",
           "Status",
@@ -167,18 +168,19 @@ exports[`SupervisorsView matches snapshot 1`] = `
           [
             {
               "Cell": [Function],
-              "Header": <React.Fragment>
-                Supervisor ID
-                <br />
-                <i>
-                  (datasource)
-                </i>
-              </React.Fragment>,
+              "Header": "Supervisor ID",
               "accessor": "supervisor_id",
               "id": "supervisor_id",
               "show": true,
               "width": 280,
             },
+            {
+              "Cell": [Function],
+              "Header": "Datasource",
+              "accessor": "datasource",
+              "show": true,
+              "width": 280,
+            },
             {
               "Cell": [Function],
               "Header": "Type",
diff --git a/web-console/src/views/supervisors-view/supervisors-view.tsx 
b/web-console/src/views/supervisors-view/supervisors-view.tsx
index 382066a7014..8e972ec66fd 100644
--- a/web-console/src/views/supervisors-view/supervisors-view.tsx
+++ b/web-console/src/views/supervisors-view/supervisors-view.tsx
@@ -95,6 +95,7 @@ import './supervisors-view.scss';
 
 const SUPERVISOR_TABLE_COLUMNS: TableColumnSelectorColumn[] = [
   'Supervisor ID',
+  'Datasource',
   'Type',
   'Topic/Stream',
   'Status',
@@ -124,6 +125,7 @@ interface SupervisorQuery extends TableState {
 
 interface SupervisorQueryResultRow {
   readonly supervisor_id: string;
+  readonly datasource: string;
   readonly type: string;
   readonly source: string;
   readonly detailed_state: string;
@@ -296,6 +298,7 @@ export class SupervisorsView extends React.PureComponent<
           const sqlQuery = assemble(
             'WITH s AS (SELECT',
             '  "supervisor_id",',
+            '  "datasource",',
             '  "type",',
             '  "source",',
             `  CASE WHEN "suspended" = 0 THEN "detailed_state" ELSE 
'SUSPENDED' END AS "detailed_state",`,
@@ -347,6 +350,7 @@ export class SupervisorsView extends React.PureComponent<
             (sup: any) => {
               return {
                 supervisor_id: deepGet(sup, 'id'),
+                datasource: deepGet(sup, 'dataSource'),
                 type: deepGet(sup, 'spec.tuningConfig.type'),
                 source:
                   deepGet(sup, 'spec.ioConfig.topic') ||
@@ -516,7 +520,7 @@ export class SupervisorsView extends React.PureComponent<
   };
 
   private getSupervisorActions(supervisor: SupervisorQueryResultRow): 
BasicAction[] {
-    const { supervisor_id, suspended, type } = supervisor;
+    const { supervisor_id, datasource, suspended, type } = supervisor;
     const { goToDatasource, goToStreamingDataLoader } = this.props;
 
     const actions: BasicAction[] = [];
@@ -525,7 +529,7 @@ export class SupervisorsView extends React.PureComponent<
         {
           icon: IconNames.MULTI_SELECT,
           title: 'Go to datasource',
-          onAction: () => goToDatasource(supervisor_id),
+          onAction: () => goToDatasource(datasource),
         },
         {
           icon: IconNames.CLOUD_UPLOAD,
@@ -848,7 +852,7 @@ export class SupervisorsView extends React.PureComponent<
     ): Column<SupervisorQueryResultRow>[] => {
       return [
         {
-          Header: twoLines('Supervisor ID', <i>(datasource)</i>),
+          Header: 'Supervisor ID',
           id: 'supervisor_id',
           accessor: 'supervisor_id',
           width: 280,
@@ -863,6 +867,13 @@ export class SupervisorsView extends React.PureComponent<
             </TableClickableCell>
           ),
         },
+        {
+          Header: 'Datasource',
+          accessor: 'datasource',
+          width: 280,
+          Cell: this.renderSupervisorFilterableCell('datasource'),
+          show: visibleColumns.shown('Datasource'),
+        },
         {
           Header: 'Type',
           accessor: 'type',


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to