From 16341bfade0dac85819e660068018869f81a2525 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 21 Jun 2025 01:09:50 +0800 Subject: [PATCH 1/2] ci: fix retry on dev workflow_run --- .github/workflows/retry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/retry.yml b/.github/workflows/retry.yml index dd4df1fddce22..7dba265a99077 100644 --- a/.github/workflows/retry.yml +++ b/.github/workflows/retry.yml @@ -3,7 +3,7 @@ name: Retry Failed Workflow on: workflow_run: workflows: - - "dev.yml" + - Dev types: - completed From 3dff9091490f328cadd1868455e513c6e4a467f6 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sat, 21 Jun 2025 01:14:38 +0800 Subject: [PATCH 2/2] z --- .github/scripts/comment_retry_on_pr.js | 7 ++----- .github/scripts/retry_failed_jobs.js | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/scripts/comment_retry_on_pr.js b/.github/scripts/comment_retry_on_pr.js index 28d0b997bb93f..b6e5249b5ef0f 100644 --- a/.github/scripts/comment_retry_on_pr.js +++ b/.github/scripts/comment_retry_on_pr.js @@ -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, diff --git a/.github/scripts/retry_failed_jobs.js b/.github/scripts/retry_failed_jobs.js index af8b185a5bea7..2e1aac2385230 100644 --- a/.github/scripts/retry_failed_jobs.js +++ b/.github/scripts/retry_failed_jobs.js @@ -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 = [];