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 and isubasinghe committed Jan 31, 2025
1 parent fd11401 commit d94c214
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ui/src/app/shared/services/workflows-service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {EMPTY, from, Observable, of} from 'rxjs';
import {catchError, filter, map, mergeMap, switchMap} from 'rxjs/operators';
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 {uiUrl} from '../base';
Expand Down Expand Up @@ -253,9 +253,8 @@ export const WorkflowsService = {
getContainerLogs(workflow: Workflow, podName: string, nodeId: string, container: string, grep: string, archived: boolean): Observable<LogEntry> {
const getLogsFromArtifact = () => this.getContainerLogsFromArtifact(workflow, nodeId, container, grep, archived);

// 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 d94c214

Please sign in to comment.