File tree Expand file tree Collapse file tree 2 files changed +443
-0
lines changed Expand file tree Collapse file tree 2 files changed +443
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { useSession } from "next-auth/react";
1212import { IssueLabelApiResponse } from "pages/api/issue/[label]" ;
1313import useSWR from "swr" ;
1414import styles from "./JobLinks.module.css" ;
15+ import { ODCommandInstructions } from "./ODCCommand" ;
1516import ReproductionCommand from "./ReproductionCommand" ;
1617
1718const DEFAULT_REPO = "pytorch/pytorch" ;
@@ -129,6 +130,28 @@ export default function JobLinks({
129130 }
130131 }
131132
133+ if (
134+ job . repo == "pytorch/pytorch" &&
135+ isFailedJob ( job ) &&
136+ job . workflowId != null &&
137+ job . id != null &&
138+ job . failureLineNumbers &&
139+ job . failureLineNumbers . length > 0 &&
140+ job . sha != null &&
141+ job . name ?. includes ( "linux" ) // ODC only supports linux jobs for now
142+ ) {
143+ const ODCCommand = ODCommandInstructions ( {
144+ jobId : parseInt ( job . id ) ,
145+ workflowId : parseInt ( job . workflowId ) ,
146+ failureLineNum : job . failureLineNumbers [ 0 ] ,
147+ headSha : job . sha ,
148+ jobName : job . name ,
149+ } ) ;
150+ if ( ODCCommand != null ) {
151+ subInfo . push ( ODCCommand ) ;
152+ }
153+ }
154+
132155 return (
133156 < span >
134157 { subInfo . map ( ( info , i ) => (
You can’t perform that action at this time.
0 commit comments