Skip to content

Commit

Permalink
add retryPipelineRunLogic, wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed May 21, 2024
1 parent cd93b29 commit cb8e308
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/api/pipelines/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ export const stopPipelineRun: UpdatePipelineRunAPI = (hostPath) => (opts, runId)
proxyENDPOINT(hostPath, `/apis/v2beta1/runs/${runId}:terminate`, {}, opts),
);

export const retryPipelineRun: UpdatePipelineRunAPI = (hostPath) => (opts, runId) =>
handlePipelineFailures(
proxyENDPOINT(hostPath, `/apis/v2beta1/runs/${runId}:retry`, {}, opts),
);

export const updatePipelineRunJob: UpdatePipelineRunJobAPI = (hostPath) => (opts, jobId, enabled) =>
handlePipelineFailures(
proxyENDPOINT(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
archiveExperiment,
unarchiveExperiment,
deleteExperiment,
retryPipelineRun,
} from '~/api';
import { PipelineAPIs } from '~/concepts/pipelines/types';
import { APIState } from '~/concepts/proxy/types';
Expand Down Expand Up @@ -66,6 +67,7 @@ const usePipelineAPIState = (
listPipelineVersions: listPipelineVersions(path),
archivePipelineRun: archivePipelineRun(path),
unarchivePipelineRun: unarchivePipelineRun(path),
retryPipelineRun: retryPipelineRun(path),
archiveExperiment: archiveExperiment(path),
unarchiveExperiment: unarchiveExperiment(path),
stopPipelineRun: stopPipelineRun(path),
Expand Down
1 change: 1 addition & 0 deletions frontend/src/concepts/pipelines/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export type PipelineAPIs = {
listPipelineRunJobs: ListPipelineRunJobs;
listPipelineVersions: ListPipelineVersions;
archivePipelineRun: UpdatePipelineRun;
retryPipelineRun: UpdatePipelineRun;
unarchivePipelineRun: UpdatePipelineRun;
archiveExperiment: UpdateExperiment;
unarchiveExperiment: UpdateExperiment;
Expand Down

0 comments on commit cb8e308

Please sign in to comment.