From f52bcb0b4d388497ea6ccbc681cdd0965bf9be67 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 8 Nov 2023 20:17:20 +0100 Subject: [PATCH 1/2] git-artifacts: be more patient while waiting for `tag-git` to finish It is important for the `git-artifacts` job to wait for the `tag-git` job to finish because it requires the latter's build artifacts, yet it is started before the latter actually finishes. However, polling every second, up to 30 times, is way too impatient. There are sometimes glitches that make `tag-git` take longer to spin down, and we can just look every 10 seconds, it does not make much difference to the overall run time, and for good measure let's wait up to ~10 minutes. Signed-off-by: Johannes Schindelin --- workflow-runs.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow-runs.js b/workflow-runs.js index da3a1ad6..27f13ea0 100644 --- a/workflow-runs.js +++ b/workflow-runs.js @@ -20,11 +20,11 @@ const waitForWorkflowRunToFinish = async (context, token, owner, repo, workflowR return res } if (context.log) context.log(`Waiting for workflow run ${workflowRunId} (current status: ${res.status})`) - if (counter++ > 30) throw new Error(`Times out waiting for workflow run ${workflowRunId}?`) - await sleep(1000) + if (counter++ > 60) throw new Error(`Times out waiting for workflow run ${workflowRunId}?`) + await sleep(10000) } } module.exports = { waitForWorkflowRunToFinish -} \ No newline at end of file +} From 684f4d683b4692d1829db344d4a29c5ae300036a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 10 Nov 2023 11:16:11 +0100 Subject: [PATCH 2/2] workflow-runs: fix typo Pointed out in https://github.com/git-for-windows/git-for-windows-automation/pull/57#discussion_r1387507828 Signed-off-by: Johannes Schindelin --- workflow-runs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-runs.js b/workflow-runs.js index 27f13ea0..0cd08b2c 100644 --- a/workflow-runs.js +++ b/workflow-runs.js @@ -20,7 +20,7 @@ const waitForWorkflowRunToFinish = async (context, token, owner, repo, workflowR return res } if (context.log) context.log(`Waiting for workflow run ${workflowRunId} (current status: ${res.status})`) - if (counter++ > 60) throw new Error(`Times out waiting for workflow run ${workflowRunId}?`) + if (counter++ > 60) throw new Error(`Timed out waiting for workflow run ${workflowRunId}?`) await sleep(10000) } }