Skip to content

Modified Dr. CI so it could detect runner disconnection failures #6542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all 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
28 changes: 26 additions & 2 deletions torchci/lib/drciUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,25 @@ export function formDrciComment(
owner: string = OWNER,
repo: string = REPO,
pr_results: string = "",
sevs: string = ""
sevs: string = "",
runnerDisconnectionJobs: RecentWorkflowsData[] = []
): string {
const header = formDrciHeader(owner, repo, pr_num);
const comment = `${DRCI_COMMENT_START}
let comment = `${DRCI_COMMENT_START}
${header}
${sevs}
${pr_results}
${DRCI_COMMENT_END}`;

if (runnerDisconnectionJobs.length > 0) {
comment += `\n\n## :warning: Runner Disconnection Failures\n`;
comment += runnerDisconnectionJobs
.map(
(job) =>
`- [${job.name}](${job.html_url}): Runner disconnection detected.`
)
.join("\n");
}
return comment;
}

Expand Down Expand Up @@ -553,3 +564,16 @@ export async function isSameAuthor(
// * Cherry picking
return isSameEmail || isSameCommitUsername || isSamePrUsername;
}

export function isRunnerDisconnectionFailure(job: RecentWorkflowsData): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see this function actually called anywhere?

It would probably also be a better idea to do something similar as isInfraFlakyJob and add it to the flakyJobs list with the relevant info about runner disconnection so you don't have to make a new section

const runnerDisconnectionPatterns = [
/The runner has received a shutdown signal/i,
/The operation was canceled/i,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jobs can be cancelled for other reasons and I think it still ends up saying this

Suggested change
/The operation was canceled/i,

/The runner could not connect to the server/i,
/The runner is offline/i,
];

return runnerDisconnectionPatterns.some((pattern) =>
job.failure_lines.some((line) => pattern.test(line))
);
}