Skip to content

Commit 3be3cd8

Browse files
authored
[ch][hud][ez] Fix artifacts under each job (#5772)
CH returns job id as a number, not a string, but string is expected in some places Previously, when using CH, the show artifacts button wouldn't show up, but now it does <img width="563" alt="image" src="https://github.com/user-attachments/assets/9a6a1b5f-990d-42e4-9e19-60d730592c53">
1 parent 9342437 commit 3be3cd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchci/components/WorkflowBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export default function WorkflowBox({
222222
<div key={job.id} id={`${job.id}-box`}>
223223
<WorkflowJobSummary
224224
job={job}
225-
artifacts={groupedArtifacts?.get(job.id)}
225+
artifacts={groupedArtifacts?.get(job.id?.toString())}
226226
artifactsToShow={artifactsToShow}
227227
setArtifactsToShow={setArtifactsToShow}
228228
unstableIssues={unstableIssues}
@@ -264,7 +264,7 @@ function useArtifacts(workflowId: string | undefined): {
264264

265265
function groupArtifacts(jobs: JobData[], artifacts: Artifact[]) {
266266
// Group artifacts by job id if possible
267-
const jobIds = jobs.map((job) => job.id);
267+
const jobIds = jobs.map((job) => job.id?.toString());
268268
const grouping = new Map<string | undefined, Artifact[]>();
269269
for (const artifact of artifacts) {
270270
let key = "none";

0 commit comments

Comments
 (0)