From 6c018b78c79289a37f13646c777c837cd9b56220 Mon Sep 17 00:00:00 2001 From: Matt Gogerly <6519811+mattgogerly@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:05:53 +0000 Subject: [PATCH] Revert "fix(core): conditionally hide expression evaluation warning messages (#9771)" This reverts commit 7e3dd5053ccdb06ce067303062f90ae82b56bfc8. --- .../pipeline/details/StageFailureMessage.tsx | 34 ++++++------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/packages/core/src/pipeline/details/StageFailureMessage.tsx b/packages/core/src/pipeline/details/StageFailureMessage.tsx index ef04549f858..3368fd1c93c 100644 --- a/packages/core/src/pipeline/details/StageFailureMessage.tsx +++ b/packages/core/src/pipeline/details/StageFailureMessage.tsx @@ -73,33 +73,19 @@ export class StageFailureMessage extends React.Component 0) { + if (isFailed || failedTask || message || messages.length) { const exceptionTitle = isFailed ? (messages.length ? 'Exceptions' : 'Exception') : 'Warning'; - - // expression evaluation warnings can get really long and hide actual failure messages, source - // filter out expression evaluation failure messages if either: - // - there was a stage failure (and failed expressions don't fail the stage) - // - expression evaluation was explicitly disabled for the stage(as Orca still processes expressions and populates - // warnings when evaluation is disabled disabled) - const shouldFilterExpressionFailures = - (isFailed && !stage.context?.failOnFailedExpressions) || stage.context?.skipExpressionEvaluation; - - if (shouldFilterExpressionFailures) { - stageMessages = stageMessages.filter((m) => !m.startsWith('Failed to evaluate')); - - if (stageMessages.length === 0) { - // no messages to be displayed after filtering - return null; - } - } - - const displayMessages = stageMessages.map((m, i) => ( - - )); + const displayMessages = + message || !messages.length ? ( + + ) : ( + messages.map((m, i) => ( + + )) + ); if (displayMessages) { return (