Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 2 additions & 5 deletions .github/scripts/comment_retry_on_pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,21 @@ module.exports = async ({ github, context, core }) => {
function isRetryableError(errorMessage) {
if (!errorMessage) return false;

// Only check for the specific self-hosted runner communication error
return errorMessage.includes('The self-hosted runner lost communication with the server.');
return errorMessage.includes('The self-hosted runner lost communication with the server.') ||
errorMessage.includes('The operation was canceled.');
}

// Count retryable jobs
let retryableJobsCount = 0;
let analyzedJobs = [];

for (const job of failedJobs) {
try {
// Get job details to access check_run_url
const { data: jobDetails } = await github.rest.actions.getJobForWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
job_id: job.id
});

// Get job annotations
const { data: annotations } = await github.rest.checks.listAnnotations({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/retry_failed_jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module.exports = async ({ github, context, core }) => {

function isRetryableError(errorMessage) {
if (!errorMessage) return false;
return errorMessage.includes('The self-hosted runner lost communication with the server.');
return errorMessage.includes('The self-hosted runner lost communication with the server.') ||
errorMessage.includes('The operation was canceled.');
}

const jobsToRetry = [];
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Retry Failed Workflow
on:
workflow_run:
workflows:
- "dev.yml"
- Dev
types:
- completed

Expand Down
Loading