Skip to content

Commit

Permalink
allow users to specify error to catch for on-damand failover
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Aug 23, 2023
1 parent 453fba9 commit b3bdd0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lambdas/functions/control-plane/src/pool/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export async function adjust(event: PoolEvent): Promise<void> {
const runnerOwner = process.env.RUNNER_OWNER;
const amiIdSsmParameterName = process.env.AMI_ID_SSM_PARAMETER_NAME;
const onDemandFailoverOnError = process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS
? (JSON.parse(process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS) as [string]) : [];
? (JSON.parse(process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS) as [string])
: [];

let ghesApiUrl = '';
if (ghesBaseUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ export async function scaleUp(eventSource: string, payload: ActionRequestMessage
const runnerNamePrefix = process.env.RUNNER_NAME_PREFIX || '';
const ssmConfigPath = process.env.SSM_CONFIG_PATH || '';
const onDemandFailoverOnError = process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS
? (JSON.parse(process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS) as [string]) : [];
? (JSON.parse(process.env.ENABLE_ON_DEMAND_FAILOVER_FOR_ERRORS) as [string])
: [];

if (ephemeralEnabled && payload.eventType !== 'workflow_job') {
logger.warn(`${payload.eventType} event is not supported in combination with ephemeral runners.`);
Expand Down

0 comments on commit b3bdd0e

Please sign in to comment.