Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions torchci/components/job/JobLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useSession } from "next-auth/react";
import { IssueLabelApiResponse } from "pages/api/issue/[label]";
import useSWR from "swr";
import styles from "./JobLinks.module.css";
import { ODCommandInstructions } from "./ODCCommand";
import ReproductionCommand from "./ReproductionCommand";

const DEFAULT_REPO = "pytorch/pytorch";
Expand Down Expand Up @@ -129,6 +130,28 @@ export default function JobLinks({
}
}

if (
job.repo == "pytorch/pytorch" &&
isFailedJob(job) &&
job.workflowId != null &&
job.id != null &&
job.failureLineNumbers &&
job.failureLineNumbers.length > 0 &&
job.sha != null &&
job.name?.includes("linux") // ODC only supports linux jobs for now
) {
const ODCCommand = ODCommandInstructions({
jobId: parseInt(job.id),
workflowId: parseInt(job.workflowId),
failureLineNum: job.failureLineNumbers[0],
headSha: job.sha,
jobName: job.name,
});
if (ODCCommand != null) {
subInfo.push(ODCCommand);
}
}

return (
<span>
{subInfo.map((info, i) => (
Expand Down
Loading