Skip to content

Commit

Permalink
[EZ] Correct the repo that's used when logging the scale-config used (#…
Browse files Browse the repository at this point in the history
…5792)

It was incorrectly assuming that the repo that was requesting the new
job was from the same repo as the one where scale-config lives.

Fixing that bad assumption.
  • Loading branch information
ZainRizvi authored Oct 21, 2024
1 parent 82093fe commit 881a1af
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ export async function scaleUp(

getGitHubRateLimit(repo, Number(payload.installationId), metrics);

const runnerTypes = await getRunnerTypes(
{
owner: repo.owner,
repo: Config.Instance.scaleConfigRepo || repo.repo,
},
metrics,
);
const scaleConfigRepo = {
owner: repo.owner,
repo: Config.Instance.scaleConfigRepo || repo.repo,
};
const runnerTypes = await getRunnerTypes(scaleConfigRepo, metrics);
/* istanbul ignore next */
const runnerLabels = payload?.runnerLabels ?? Array.from(runnerTypes.keys());

Expand All @@ -74,7 +72,7 @@ export async function scaleUp(
if (runnerType === undefined) {
console.info(
`Runner label '${runnerLabel}' was not found in config at ` +
`${repo.owner}/${repo.repo}/${Config.Instance.scaleConfigRepoPath}`,
`${scaleConfigRepo.owner}/${scaleConfigRepo.repo}/${Config.Instance.scaleConfigRepoPath}`,
);
continue;
}
Expand Down

0 comments on commit 881a1af

Please sign in to comment.