Skip to content

Commit 4f1fdcb

Browse files
committed
Show error messages for Koji builds and Bodhi updates
Related to packit/packit-service#2426
1 parent 737fc8f commit 4f1fdcb

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

frontend/src/apiDefinitions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export interface KojiBuild {
179179
task_id: string;
180180
web_url: string;
181181
build_submission_stdout: string | null;
182+
error_message: string | null;
182183
}
183184

184185
// /api/koji-tag-requests
@@ -307,6 +308,7 @@ export interface BodhiUpdate {
307308
submitted_time: number;
308309
update_creation_time: number | null;
309310
web_url: string | null;
311+
error_message: string | null;
310312
}
311313

312314
// /api/testing-farm/results

frontend/src/components/bodhi/BodhiUpdate.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import {
55
Card,
66
CardBody,
7+
CodeBlock,
8+
CodeBlockCode,
79
Content,
810
DescriptionList,
911
DescriptionListDescription,
@@ -97,6 +99,18 @@ export const BodhiUpdate = () => {
9799
{" "}
98100
{data.koji_nvrs}
99101
</DescriptionListDescription>
102+
{data.error_message ? (
103+
<>
104+
<DescriptionListTerm>Error message</DescriptionListTerm>
105+
<DescriptionListDescription>
106+
<CodeBlock>
107+
<CodeBlockCode>{data.error_message}</CodeBlockCode>
108+
</CodeBlock>
109+
</DescriptionListDescription>
110+
</>
111+
) : (
112+
<></>
113+
)}
100114
</DescriptionListGroup>
101115
<DescriptionListGroup>
102116
<DescriptionListTerm>

frontend/src/components/koji/KojiBuild.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import {
55
Card,
66
CardBody,
7+
CodeBlock,
8+
CodeBlockCode,
79
Content,
810
DescriptionList,
911
DescriptionListDescription,
@@ -158,6 +160,18 @@ export const KojiBuild = () => {
158160
<span>not provided</span>
159161
)}
160162
</DescriptionListDescription>
163+
{data.error_message ? (
164+
<>
165+
<DescriptionListTerm>Error message</DescriptionListTerm>
166+
<DescriptionListDescription>
167+
<CodeBlock>
168+
<CodeBlockCode>{data.error_message}</CodeBlockCode>
169+
</CodeBlock>
170+
</DescriptionListDescription>
171+
</>
172+
) : (
173+
<></>
174+
)}
161175
</DescriptionListGroup>
162176
<DescriptionListGroup>
163177
<DescriptionListTerm>

0 commit comments

Comments
 (0)