Skip to content

Commit 438d035

Browse files
authored
Revert "DrCI: mark PyTorch OSDC job failures as unstable (#8062)" (#8121)
## Summary This reverts commit 91ecd67 (#8062), which marked PyTorch jobs with the `-osdc` suffix as unstable in Dr.CI for both pending and failure/cancelled signals. Reverting so that OSDC job failures surface in Dr.CI / trymerge again. ## Test plan - [ ] CI green on this revert PR - [ ] Verify OSDC job failures are no longer reclassified as unstable in Dr.CI on a sample PyTorch PR
1 parent 272d10a commit 438d035

4 files changed

Lines changed: 1 addition & 121 deletions

File tree

torchci/lib/jobUtils.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,6 @@ export function isUnstableJob(
9090
return openUnstableIssues !== undefined && openUnstableIssues.length !== 0;
9191
}
9292

93-
// Matches the `-osdc` suffix that PyTorch's OSDC (ARC) workflow variants
94-
// append to the job id, e.g. `test-osdc`, `test-osdc (cfg, ...)`,
95-
// `linux-jammy-py3.10-clang12 / test-osdc`. Mirrors the regex used by
96-
// `getNameWithoutOSDC` in JobClassifierUtil.ts.
97-
export const OSDC_JOB_NAME_REGEX = /-osdc(?=[\s()/]|$)/;
98-
99-
export function isOSDCJob(jobName?: string): boolean {
100-
if (!jobName) {
101-
return false;
102-
}
103-
return OSDC_JOB_NAME_REGEX.test(jobName);
104-
}
105-
10693
export function getOpenUnstableIssues(
10794
jobName?: string,
10895
unstableIssues?: IssueData[]

torchci/pages/api/drci/drci.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
getOpenUnstableIssues,
4040
isDisabledTest,
4141
isDisabledTestMentionedInPR,
42-
isOSDCJob,
4342
isRecentlyCloseDisabledTest,
4443
isSameFailure,
4544
isUnstableJob,
@@ -1027,17 +1026,9 @@ export async function getWorkflowJobsStatuses(
10271026
continue;
10281027
}
10291028

1030-
// PyTorch OSDC (ARC) jobs are still rolling out, so treat any failure or
1031-
// pending signal from them as unstable to avoid blocking PRs on the
1032-
// migration.
1033-
const isPyTorchOSDC = prInfo.repo === "pytorch" && isOSDCJob(job.name);
1034-
10351029
if (isPending(job)) {
10361030
pending++;
1037-
if (isPyTorchOSDC) {
1038-
unstableJobs.push(job);
1039-
relatedInfo.set(job.id, "PyTorch OSDC job marked as unstable");
1040-
} else if (isUnstableJob(job as any, unstableIssues)) {
1031+
if (isUnstableJob(job as any, unstableIssues)) {
10411032
unstableJobs.push(job);
10421033
relatedIssues.set(
10431034
job.id,
@@ -1052,12 +1043,6 @@ export async function getWorkflowJobsStatuses(
10521043
continue;
10531044
}
10541045

1055-
if (isPyTorchOSDC) {
1056-
unstableJobs.push(job);
1057-
relatedInfo.set(job.id, "PyTorch OSDC job marked as unstable");
1058-
continue;
1059-
}
1060-
10611046
// TODO: remove the `as any` cast when CH migration is complete
10621047
if (isUnstableJob(job as any, unstableIssues)) {
10631048
unstableJobs.push(job);

torchci/test/drci.test.ts

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -551,75 +551,6 @@ describe("Update Dr. CI Bot Unit Tests", () => {
551551
expect(comment.includes("## :x: 1 New Failure, 1 Pending")).toBeTruthy();
552552
});
553553

554-
test("PyTorch OSDC failures are marked unstable", async () => {
555-
const failedOSDC = getDummyJob({
556-
name: "linux-jammy-py3.10-clang12 / test-osdc (default, 1, 3, mt-l-x86iavx512-8-64)",
557-
conclusion: "failure",
558-
completed_at: "2022-07-13 19:34:03",
559-
html_url: "a",
560-
head_sha: "abcdefg",
561-
id: 42,
562-
pr_number: 1001,
563-
failure_lines: ["a"],
564-
failure_captures: ["a"],
565-
runnerName: "dummy",
566-
});
567-
const pendingOSDC = getDummyJob({
568-
name: "linux-jammy-py3.10-clang12 / test-osdc (default, 2, 3, mt-l-x86iavx512-8-64)",
569-
conclusion: "",
570-
completed_at: TIME_0,
571-
html_url: "b",
572-
head_sha: "abcdefg",
573-
id: 43,
574-
pr_number: 1001,
575-
runnerName: "dummy",
576-
});
577-
578-
const workflowsByPR = await updateDrciBot.reorganizeWorkflows(
579-
"pytorch",
580-
"pytorch",
581-
[failedOSDC, pendingOSDC]
582-
);
583-
const pr_1001 = workflowsByPR.get(1001)!;
584-
585-
const { failedJobs, flakyJobs, brokenTrunkJobs, unstableJobs, pending } =
586-
await updateDrciBot.getWorkflowJobsStatuses(pr_1001, [], new Map());
587-
expect(failedJobs.length).toBe(0);
588-
expect(brokenTrunkJobs.length).toBe(0);
589-
expect(flakyJobs.length).toBe(0);
590-
expect(unstableJobs.length).toBe(2);
591-
// The pending OSDC job still counts as pending overall, like other
592-
// pending-and-unstable jobs.
593-
expect(pending).toBe(1);
594-
});
595-
596-
test("OSDC jobs in non-pytorch repos are not auto-marked unstable", async () => {
597-
const failedOSDC = getDummyJob({
598-
name: "linux-jammy-py3.10-clang12 / test-osdc (default, 1, 3, mt-l-x86iavx512-8-64)",
599-
conclusion: "failure",
600-
completed_at: "2022-07-13 19:34:03",
601-
html_url: "a",
602-
head_sha: "abcdefg",
603-
id: 42,
604-
pr_number: 1001,
605-
failure_lines: ["a"],
606-
failure_captures: ["a"],
607-
runnerName: "dummy",
608-
});
609-
610-
const workflowsByPR = await updateDrciBot.reorganizeWorkflows(
611-
"meta-pytorch",
612-
"some-other-repo",
613-
[failedOSDC]
614-
);
615-
const pr_1001 = workflowsByPR.get(1001)!;
616-
617-
const { failedJobs, unstableJobs } =
618-
await updateDrciBot.getWorkflowJobsStatuses(pr_1001, [], new Map());
619-
expect(unstableJobs.length).toBe(0);
620-
expect(failedJobs.length).toBe(1);
621-
});
622-
623554
test("test flaky, broken trunk, and unstable jobs are filtered out", async () => {
624555
const originalWorkflows = [failedA, failedB, unstableA, unstableB];
625556
const workflowsByPR = await updateDrciBot.reorganizeWorkflows(

torchci/test/jobUtils.test.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
isDisabledTest,
99
isDisabledTestMentionedInPR,
1010
isFailureFromPrevMergeCommit,
11-
isOSDCJob,
1211
isRecentlyCloseDisabledTest,
1312
isSameContext,
1413
isSameFailure,
@@ -64,28 +63,6 @@ describe("Test various job utils", () => {
6463
).toStrictEqual("Test `run_test.py` is usable without boto3/rockset");
6564
});
6665

67-
test("test isOSDCJob", () => {
68-
expect(isOSDCJob(undefined)).toBe(false);
69-
expect(isOSDCJob("")).toBe(false);
70-
// Not OSDC jobs
71-
expect(
72-
isOSDCJob(
73-
"linux-jammy-py3.10-clang12 / test (default, 1, 3, linux.c7i.2xlarge)"
74-
)
75-
).toBe(false);
76-
expect(isOSDCJob("linux-jammy-py3.10-clang12 / build")).toBe(false);
77-
// `osdc` substring inside an unrelated token must not match
78-
expect(isOSDCJob("some-osdc-prefixed-thing / build")).toBe(false);
79-
// OSDC variants
80-
expect(isOSDCJob("linux-jammy-py3.10-clang12 / test-osdc")).toBe(true);
81-
expect(
82-
isOSDCJob(
83-
"linux-jammy-py3.10-clang12 / test-osdc (default, 1, 3, mt-l-x86iavx512-8-64)"
84-
)
85-
).toBe(true);
86-
expect(isOSDCJob("test-osdc / something-else")).toBe(true);
87-
});
88-
8966
test("test isSameAuthor", async () => {
9067
const job: RecentWorkflowsData = getDummyJob({
9168
head_sha: "123",

0 commit comments

Comments
 (0)