log specific warning when no builder instances are available (#2)

This commit is contained in:
Aayush Shah 2024-09-16 22:26:04 -04:00 committed by GitHub
parent c2b089ee1e
commit 79167f5d18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,7 +95,11 @@ async function getRemoteBuilderAddr(inputs: context.Inputs): Promise<string | nu
await client.post(`/${stateHelper.blacksmithBuildTaskId}/abandon`);
return null;
} catch (error) {
core.warning(`Error in getBuildkitdAddr: ${error.message}`);
if (error.response && error.response.status === 404) {
core.warning('No builder instances were available, falling back to a local build');
} else {
core.warning(`Error in getBuildkitdAddr: ${error.message}`);
}
return null;
} finally {
clearTimeout(timeoutId);