|
1 | 1 | import {EMPTY, from, Observable, of} from 'rxjs';
|
2 | 2 | import {catchError, filter, map, mergeMap, switchMap} from 'rxjs/operators';
|
3 | 3 | import * as models from '../../../models';
|
4 |
| -import {Event, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../../../models'; |
| 4 | +import {Event, isWorkflowInCluster, LogEntry, NodeStatus, Workflow, WorkflowList, WorkflowPhase} from '../../../models'; |
5 | 5 | import {ResubmitOpts, RetryOpts} from '../../../models';
|
6 | 6 | import {SubmitOpts} from '../../../models/submit-opts';
|
7 | 7 | import {uiUrl} from '../base';
|
@@ -253,9 +253,8 @@ export const WorkflowsService = {
|
253 | 253 | getContainerLogs(workflow: Workflow, podName: string, nodeId: string, container: string, grep: string, archived: boolean): Observable<LogEntry> {
|
254 | 254 | const getLogsFromArtifact = () => this.getContainerLogsFromArtifact(workflow, nodeId, container, grep, archived);
|
255 | 255 |
|
256 |
| - // If our workflow is archived, don't even bother inspecting the cluster for logs since it's likely |
257 |
| - // that the Workflow and associated pods have been deleted |
258 |
| - if (archived) { |
| 256 | + // If our workflow was deleted, try to get logs from artifacts. |
| 257 | + if (!isWorkflowInCluster(workflow)) { |
259 | 258 | return getLogsFromArtifact();
|
260 | 259 | }
|
261 | 260 |
|
|
0 commit comments