From bb9cca5bdf4d8d73fd23016b86b1df41a2a71985 Mon Sep 17 00:00:00 2001 From: Julian Kobrynski Date: Thu, 4 Apr 2024 16:00:44 +0200 Subject: [PATCH 1/3] add logs to awaitStagingDeploys.ts --- .../awaitStagingDeploys/awaitStagingDeploys.ts | 9 ++++++--- .../actions/javascript/awaitStagingDeploys/index.js | 11 ++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts b/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts index c778187231d9..f8104aa07233 100644 --- a/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts +++ b/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts @@ -41,20 +41,23 @@ function run() { }), ]) .then((responses) => { + console.info('[awaitStagingDeploys] listWOrkflowRuns responses', responses); const workflowRuns = responses[0].data.workflow_runs; if (!tag && typeof responses[1] === 'object') { workflowRuns.push(...responses[1].data.workflow_runs); } + console.info('[awaitStagingDeploys] workflowRuns', workflowRuns); return workflowRuns; }) .then((workflowRuns) => (currentStagingDeploys = workflowRuns.filter((workflowRun) => workflowRun.status !== 'completed'))) - .then(() => + .then(() => { + console.info('[awaitStagingDeploys] currentStagingDeploys', currentStagingDeploys); console.log( !currentStagingDeploys.length ? 'No current staging deploys found' : `Found ${currentStagingDeploys.length} staging deploy${currentStagingDeploys.length > 1 ? 's' : ''} still running...`, - ), - ); + ); + }); console.info('[awaitStagingDeploys] run() throttleFunc', throttleFunc); return promiseDoWhile( diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 8eed3043fe20..0413bf5439f5 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12158,16 +12158,21 @@ function run() { }), ]) .then((responses) => { + console.info('[awaitStagingDeploys] listWOrkflowRuns responses', responses); const workflowRuns = responses[0].data.workflow_runs; if (!tag && typeof responses[1] === 'object') { workflowRuns.push(...responses[1].data.workflow_runs); } + console.info('[awaitStagingDeploys] workflowRuns', workflowRuns); return workflowRuns; }) .then((workflowRuns) => (currentStagingDeploys = workflowRuns.filter((workflowRun) => workflowRun.status !== 'completed'))) - .then(() => console.log(!currentStagingDeploys.length - ? 'No current staging deploys found' - : `Found ${currentStagingDeploys.length} staging deploy${currentStagingDeploys.length > 1 ? 's' : ''} still running...`)); + .then(() => { + console.info('[awaitStagingDeploys] currentStagingDeploys', currentStagingDeploys); + console.log(!currentStagingDeploys.length + ? 'No current staging deploys found' + : `Found ${currentStagingDeploys.length} staging deploy${currentStagingDeploys.length > 1 ? 's' : ''} still running...`); + }); console.info('[awaitStagingDeploys] run() throttleFunc', throttleFunc); return (0, promiseWhile_1.promiseDoWhile)(() => !!currentStagingDeploys.length, (0, throttle_1.default)(throttleFunc, // Poll every 60 seconds instead of every 10 seconds From f7d360981045fa4ca2d2b7acf719385ea2ee909d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Thu, 4 Apr 2024 16:12:12 +0100 Subject: [PATCH 2/3] Update .github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- .../javascript/awaitStagingDeploys/awaitStagingDeploys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts b/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts index f8104aa07233..7de78e257dc4 100644 --- a/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts +++ b/.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.ts @@ -41,7 +41,7 @@ function run() { }), ]) .then((responses) => { - console.info('[awaitStagingDeploys] listWOrkflowRuns responses', responses); + console.info('[awaitStagingDeploys] listWorkflowRuns responses', responses); const workflowRuns = responses[0].data.workflow_runs; if (!tag && typeof responses[1] === 'object') { workflowRuns.push(...responses[1].data.workflow_runs); From 5152cbd205f1d4b2d15e650f18ee9fbc1d2c6b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Thu, 4 Apr 2024 16:15:28 +0100 Subject: [PATCH 3/3] update generated action file --- .github/actions/javascript/awaitStagingDeploys/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index 0413bf5439f5..4b76cc962968 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -12158,7 +12158,7 @@ function run() { }), ]) .then((responses) => { - console.info('[awaitStagingDeploys] listWOrkflowRuns responses', responses); + console.info('[awaitStagingDeploys] listWorkflowRuns responses', responses); const workflowRuns = responses[0].data.workflow_runs; if (!tag && typeof responses[1] === 'object') { workflowRuns.push(...responses[1].data.workflow_runs);