diff --git a/src/components/logs/LogSnippetBlock.tsx b/src/components/logs/LogSnippetBlock.tsx index e81cad7e..1fc7f02f 100644 --- a/src/components/logs/LogSnippetBlock.tsx +++ b/src/components/logs/LogSnippetBlock.tsx @@ -19,6 +19,7 @@ const LogSnippetBlock: React.FC = ({ namespace={namespace} podName={logDetails.podName} title={logDetails.title} + staticMessage={logDetails.staticMessage} > {children} diff --git a/src/components/logs/LogSnippetFromPod.tsx b/src/components/logs/LogSnippetFromPod.tsx index 21aad022..ed864394 100644 --- a/src/components/logs/LogSnippetFromPod.tsx +++ b/src/components/logs/LogSnippetFromPod.tsx @@ -12,6 +12,7 @@ type LogSnippetFromPodProps = { namespace: string; podName: string; title: string; + staticMessage?: string; }; const LogSnippetFromPod: React.FC = ({ @@ -20,6 +21,7 @@ const LogSnippetFromPod: React.FC = ({ namespace, podName, title, + staticMessage, }) => { const { t } = useTranslation('plugin__pipelines-console-plugin'); @@ -49,7 +51,7 @@ const LogSnippetFromPod: React.FC = ({ if (logError) { return ( - {logError} + {staticMessage ? staticMessage : logError} ); } diff --git a/src/components/logs/log-snippet-utils.ts b/src/components/logs/log-snippet-utils.ts index 1fec7ae3..b3ed7f5c 100644 --- a/src/components/logs/log-snippet-utils.ts +++ b/src/components/logs/log-snippet-utils.ts @@ -27,5 +27,6 @@ export const taskRunSnippetMessage = ( title: t('Failure on task {{taskName}} - check logs for details.', { taskName, }), + staticMessage: joinConditions(taskRunStatus.conditions), }; }; diff --git a/src/components/pipelines-tasks/taskRunLogSnippet.ts b/src/components/pipelines-tasks/taskRunLogSnippet.ts index e40c5efa..fa0b5230 100644 --- a/src/components/pipelines-tasks/taskRunLogSnippet.ts +++ b/src/components/pipelines-tasks/taskRunLogSnippet.ts @@ -26,7 +26,11 @@ export const getTRLogSnippet = (taskRun: TaskRunKind): CombinedErrorDetails => { } const isKnownReason = (reason: string): boolean => { // known reasons https://tekton.dev/vault/pipelines-v0.21.0/taskruns/#monitoring-execution-status - return ['TaskRunCancelled', 'TaskRunTimeout'].includes(reason); + return [ + 'TaskRunCancelled', + 'TaskRunTimeout', + 'TaskRunImagePullFailed', + ].includes(reason); }; if (isKnownReason(succeededCondition?.reason)) { diff --git a/src/types/log-snippet-types.ts b/src/types/log-snippet-types.ts index bce2b4ca..6d7c19dc 100644 --- a/src/types/log-snippet-types.ts +++ b/src/types/log-snippet-types.ts @@ -5,6 +5,7 @@ type ErrorDetails = { export type ErrorDetailsWithLogName = ErrorDetails & { containerName: string; podName: string; + staticMessage?: string; }; export type ErrorDetailsWithStaticLog = ErrorDetails & { staticMessage: string;