Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Overlong agentName error from GitHub #23

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lambdas/delete-runner/index.ts
Expand Up @@ -34,13 +34,13 @@ exports.handler = async function (event: any) {
});

// find runner id
const runnerId = await getRunnerId(octokit, event.owner, event.repo, event.runnerName);
const runnerId = await getRunnerId(octokit, event.owner, event.repo, event.runnerName.slice(0, 63));
if (!runnerId) {
console.error(`Unable to find runner id for ${event.owner}/${event.repo}:${event.runnerName}`);
console.error(`Unable to find runner id for ${event.owner}/${event.repo}:${event.runnerName.slice(0, 63)}`);
return;
}

console.log(`Runner ${event.runnerName} has id #${runnerId}`);
console.log(`Runner ${event.runnerName.slice(0, 63)} has id #${runnerId}`);

// delete runner (it usually gets deleted by ./run.sh, but it stopped prematurely if we're here)
await octokit.request('DELETE /repos/{owner}/{repo}/actions/runners/{runnerId}', {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/docker-images/lambda/Dockerfile
@@ -1,4 +1,4 @@
FROM public.ecr.aws/lambda/nodejs:14
FROM public.ecr.aws/lambda/nodejs:14-x86_64

WORKDIR /runner

Expand Down
2 changes: 1 addition & 1 deletion src/providers/docker-images/lambda/runner.js
Expand Up @@ -8,7 +8,7 @@ exports.handler = async (event, context) => {
REPO: event.repo,
GITHUB_DOMAIN: event.githubDomain,
RUNNER_TOKEN: event.token,
RUNNER_NAME: event.runnerName,
RUNNER_NAME: event.runnerName.slice(0, 63),
RUNNER_LABEL: event.label,
},
});
Expand Down