Skip to content

Commit

Permalink
Display pipeline run volume name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode committed Jul 22, 2024
1 parent 7d5ba02 commit 12a5257
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/src/concepts/pipelines/kfTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export type PipelineExecutorKF = {
};
pvcMount?: {
mountPath: string;
constant?: string;
taskOutputParameter?: {
outputParameterKey: string;
producerTask: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,10 @@ describe('pipeline topology parseUtils', () => {
producerTask: 'test-task-1',
},
},
{
mountPath: 'path-2',
constant: 'test-constant-value',
},
],
},
},
Expand All @@ -606,7 +610,10 @@ describe('pipeline topology parseUtils', () => {
},
};
const result = parseVolumeMounts(testPlatformSpec, testExecutorLabel);
expect(result).toEqual([{ mountPath: 'path-1', name: 'test-task-1' }]);
expect(result).toEqual([
{ mountPath: 'path-1', name: 'test-task-1' },
{ mountPath: 'path-2', name: 'test-constant-value' },
]);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/concepts/pipelines/topology/parseUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ export const parseVolumeMounts = (
}
return executor.pvcMount.map((pvc) => ({
mountPath: pvc.mountPath,
name: pvc.taskOutputParameter?.producerTask ?? '',
name: pvc.taskOutputParameter?.producerTask ?? pvc.constant ?? '',
}));
};

Expand Down

0 comments on commit 12a5257

Please sign in to comment.