File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ async function run(context: any) {
61
61
await triggerUpgradeTests ( werft , config , context . Owner ) ;
62
62
return ;
63
63
}
64
- const a = ""
64
+
65
65
await buildAndPublish ( werft , config ) ;
66
66
67
67
if ( config . withSelfHostedPreview ) {
Original file line number Diff line number Diff line change @@ -92,8 +92,6 @@ export class Werft {
92
92
console . log ( `[${ slice } ] tracing warning: No slice span by name ${ slice } ` ) ;
93
93
}
94
94
95
- const errorMessage = err instanceof Error ? err . toString ( ) : err ;
96
-
97
95
// Set the status on the span for the slice and also propagate the status to the phase and root span
98
96
// as well so we can query on all phases that had an error regardless of which slice produced the error.
99
97
[ span , this . rootSpan , this . currentPhaseSpan ] . forEach ( ( span : Span ) => {
@@ -102,14 +100,18 @@ export class Werft {
102
100
}
103
101
span . setStatus ( {
104
102
code : SpanStatusCode . ERROR ,
105
- message : errorMessage ,
103
+ message : err . toString ( ) ,
106
104
} ) ;
107
105
} ) ;
108
106
109
107
// In case the error message is a multi-line string we want to ensure that we contain
110
108
// the error message within the slice (otherwise they'll be moved to the "default" slice of the phase)
111
- errorMessage . split ( "\n" ) . forEach ( ( line : string ) => console . log ( `[${ slice } ] ${ line } ` ) ) ;
109
+ err . toString ( )
110
+ . split ( "\n" )
111
+ . forEach ( ( line : string ) => console . log ( `[${ slice } ] ${ line } ` ) ) ;
112
112
113
+ // The UI shows the last log of the slice which might not make a lot of sense
114
+ // for multi-line error messages, so instead we tell the user to expand the slice.
113
115
console . log ( `[${ slice } ] Failed. Expand to see why` ) ;
114
116
console . log ( `[${ slice } |FAIL]` ) ;
115
117
throw new FailedSliceError ( slice ) ;
You can’t perform that action at this time.
0 commit comments