Skip to content

Commit

Permalink
fix: get logs from artifact when workflow deleted instead of archived.
Browse files Browse the repository at this point in the history
…Fixes: #14083 (#14087)

Signed-off-by: shuangkun <[email protected]>
  • Loading branch information
shuangkun authored Jan 15, 2025
1 parent a7a72e7 commit b1a65e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ui/src/shared/services/workflows-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {catchError, filter, map, mergeMap, switchMap} from 'rxjs/operators';
import {NameFilterKeys} from '../../workflows/components/workflow-filters/workflow-filters';
import {uiUrl} from '../base';
import * as models from '../models';
import {Event, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../models';
import {Event, isWorkflowInCluster, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../models';
import {ResubmitOpts, RetryOpts} from '../models';
import {SubmitOpts} from '../models/submit-opts';
import {Pagination} from '../pagination';
Expand Down Expand Up @@ -253,9 +253,8 @@ export const WorkflowsService = {
const getLogsFromArtifact = () => this.getContainerLogsFromArtifact(workflow, nodeId, container, grep, archived);
const getLogsFromCluster = () => this.getContainerLogsFromCluster(workflow, podName, container, grep);

// If our workflow is archived, don't even bother inspecting the cluster for logs since it's likely
// that the Workflow and associated pods have been deleted
if (archived) {
// If our workflow was deleted, try to get logs from artifacts.
if (!isWorkflowInCluster(workflow)) {
return getLogsFromArtifact();
}

Expand Down

0 comments on commit b1a65e7

Please sign in to comment.