From da9b7f91ca82e07ab174a5e9fc57b9e582ab0689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Test=C3=A9?= Date: Thu, 28 Nov 2024 10:49:55 +0100 Subject: [PATCH] chore(slab): log details and waiting on the instance --- dist/index.js | 9 +++++++++ src/index.js | 6 ++++++ src/slab.js | 3 +++ 3 files changed, 18 insertions(+) diff --git a/dist/index.js b/dist/index.js index b535055..0d2406f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -49776,11 +49776,14 @@ async function startInstanceRequest() { } async function waitForInstance(taskId, taskName) { + core.info(`Wait for instance to ${taskName} (task ID: ${taskId})`) + // while (true) equivalent to please ESLint for (;;) { await utils.sleep(15) try { + core.info('Checking...') const response = await getTask(taskId) if (response.ok) { @@ -51857,6 +51860,12 @@ function setOutput(label) { async function start() { const start_instance_response = await slab.startInstanceRequest() + core.info( + `${provider} instance details: ${JSON.stringify( + start_instance_response.details + )}` + ) + const wait_instance_response = await slab.waitForInstance( start_instance_response.task_id, 'start' diff --git a/src/index.js b/src/index.js index c3ec1d9..0f57bdc 100644 --- a/src/index.js +++ b/src/index.js @@ -9,6 +9,12 @@ function setOutput(label) { async function start() { const start_instance_response = await slab.startInstanceRequest() + core.info( + `${provider} instance details: ${JSON.stringify( + start_instance_response.details + )}` + ) + const wait_instance_response = await slab.waitForInstance( start_instance_response.task_id, 'start' diff --git a/src/slab.js b/src/slab.js index faee347..8c562c4 100644 --- a/src/slab.js +++ b/src/slab.js @@ -68,11 +68,14 @@ async function startInstanceRequest() { } async function waitForInstance(taskId, taskName) { + core.info(`Wait for instance to ${taskName} (task ID: ${taskId})`) + // while (true) equivalent to please ESLint for (;;) { await utils.sleep(15) try { + core.info('Checking...') const response = await getTask(taskId) if (response.ok) {