Skip to content

Commit 91d6123

Browse files
sluongngbduffany
andauthoredApr 2, 2025
invocation/error_card: don't show NO_BUILD abort events with cquery (#8804)
cquery would always include the --nobuild flag automatically. This causes Bazel to generate a handful of aborted events despite the user running a valid query. Silence the error card by excluding this particular case. --------- Co-authored-by: Brandon Duffany <brandon@buildbuddy.io>
1 parent 30d1944 commit 91d6123

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed
 

‎app/invocation/invocation_error_card.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,17 @@ function getModel(props: Props): CardModel {
176176
model.errors.push({ action: props.model.failedAction.action });
177177
}
178178
for (const event of props.model.aborted) {
179-
if (!event.aborted) continue;
180-
model.errors.push({ aborted: event });
179+
if (event.aborted) {
180+
if (
181+
// Bazel always include "--nobuild" in a "cquery" command, which results in
182+
// many "NO_BUILD" aborted events. We ignore those.
183+
props.model.invocation.command === "cquery" &&
184+
event.aborted.reason === build_event_stream.Aborted.AbortReason.NO_BUILD
185+
) {
186+
continue;
187+
}
188+
model.errors.push({ aborted: event });
189+
}
181190
}
182191
if (props.model.finished?.failureDetail?.message) {
183192
model.errors.push({ finished: props.model.finished });

0 commit comments

Comments
 (0)