Skip to content

Commit 3a8bf9e

Browse files
committed
WIP
1 parent 2b2e61e commit 3a8bf9e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.werft/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function run(context: any) {
6161
await triggerUpgradeTests(werft, config, context.Owner);
6262
return;
6363
}
64-
const a = ""
64+
6565
await buildAndPublish(werft, config);
6666

6767
if (config.withSelfHostedPreview) {

.werft/util/werft.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ export class Werft {
9292
console.log(`[${slice}] tracing warning: No slice span by name ${slice}`);
9393
}
9494

95-
const errorMessage = err instanceof Error ? err.toString() : err;
96-
9795
// Set the status on the span for the slice and also propagate the status to the phase and root span
9896
// as well so we can query on all phases that had an error regardless of which slice produced the error.
9997
[span, this.rootSpan, this.currentPhaseSpan].forEach((span: Span) => {
@@ -102,14 +100,18 @@ export class Werft {
102100
}
103101
span.setStatus({
104102
code: SpanStatusCode.ERROR,
105-
message: errorMessage,
103+
message: err.toString(),
106104
});
107105
});
108106

109107
// In case the error message is a multi-line string we want to ensure that we contain
110108
// 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}`));
112112

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.
113115
console.log(`[${slice}] Failed. Expand to see why`);
114116
console.log(`[${slice}|FAIL]`);
115117
throw new FailedSliceError(slice);

0 commit comments

Comments
 (0)