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

add option ephemeral runners #1374

Merged
merged 31 commits into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0b5d97f
add option ephemeral runners
npalm Dec 10, 2021
585d5ed
fix tests
npalm Nov 3, 2021
89e3a37
Add retry mechanisme for scaling errors
npalm Nov 30, 2021
d70e338
Add retry mechanisme for scaling errors
npalm Dec 10, 2021
4c982e5
Add tests for lamda handler
npalm Dec 1, 2021
e9f360e
Add basic test for ephemeral case
npalm Dec 1, 2021
f26673a
Add basic test for scale down in lambda wrapper
npalm Dec 1, 2021
ad16d80
Ensure check_runs are ignored for ephemeral runners
npalm Dec 10, 2021
5fb7237
limit termination to only the instance itself
npalm Dec 2, 2021
b6b4fa3
fix: add logging context to runner lambda (#1399)
npalm Dec 10, 2021
14ac0db
feat: Add hooks for prebuilt images (AMI), including amazon linux pac…
npalm Dec 22, 2021
4687395
add option ephemeral runners
npalm Dec 10, 2021
0b6a8e7
Add retry mechanisme for scaling errors
npalm Dec 10, 2021
99399a1
add dead letter queue, and refactor
npalm Dec 22, 2021
3f46be8
cleanup
npalm Dec 10, 2021
4eb82ac
cleanup
npalm Dec 10, 2021
bfff210
sync develop
npalm Dec 10, 2021
f0e9880
review fix
npalm Dec 10, 2021
5cda294
review fix
npalm Dec 10, 2021
4acb137
review vfix
npalm Dec 10, 2021
7b074c8
review vfix
npalm Dec 10, 2021
3b8f28a
fix review
npalm Dec 10, 2021
2dd5848
process review comments
npalm Dec 13, 2021
6c66965
process review comments
npalm Dec 13, 2021
abeac1a
review comment
npalm Dec 13, 2021
17dba00
process review comments
npalm Dec 14, 2021
ec7af4c
Update examples/ephemeral/README.md
npalm Dec 14, 2021
e08bd36
Process review comments
npalm Dec 14, 2021
7c9f512
Add docs
npalm Dec 22, 2021
49f15a0
review comments
npalm Dec 22, 2021
3269019
update docs
npalm Dec 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comment
  • Loading branch information
npalm committed Dec 22, 2021
commit abeac1a206d4551ee5ff56fc7716deafeb94e63b
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ describe('scaleUp with public GH', () => {
it('creates a ephemeral runner.', async () => {
process.env.ENABLE_EPHEMERAL_RUNNERS = 'true';
await scaleUpModule.scaleUp('aws:sqs', TEST_DATA);
expectedRunnerParams.runnerServiceConfig = expectedRunnerParams.runnerServiceConfig + ` --ephemeral`;
expectedRunnerParams.runnerServiceConfig = expectedRunnerParams.runnerServiceConfig + ` --ephemeral`;
expect(createRunner).toBeCalledWith(expectedRunnerParams, LAUNCH_TEMPLATE);
});

Expand Down
10 changes: 5 additions & 5 deletions modules/runners/lambdas/runners/src/scale-runners/scale-up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ export async function scaleUp(eventSource: string, payload: ActionRequestMessage
});
const token = registrationToken.data.token;

const labelsArgument = runnerExtraLabels !== undefined ? `--labels ${runnerExtraLabels}` : '';
const runnerGroupArgument = runnerGroup !== undefined ? `--runnergroup ${runnerGroup}` : '';
const labelsArgument = runnerExtraLabels !== undefined ? `--labels ${runnerExtraLabels} ` : '';
const runnerGroupArgument = runnerGroup !== undefined ? `--runnergroup ${runnerGroup} ` : '';
const configBaseUrl = ghesBaseUrl ? ghesBaseUrl : 'https://github.com';
const ephemeralArgument = ephemeral ? '--ephemeral' : '';
const runnerArgs = `--token ${token} ${labelsArgument} ${ephemeralArgument}`.trim();
const ephemeralArgument = ephemeral ? '--ephemeral ' : '';
const runnerArgs = `--token ${token} ${labelsArgument}${ephemeralArgument}`;
npalm marked this conversation as resolved.
Show resolved Hide resolved
npalm marked this conversation as resolved.
Show resolved Hide resolved

await createRunnerLoop({
environment,
runnerServiceConfig: enableOrgLevel
? `--url ${configBaseUrl}/${payload.repositoryOwner} ${runnerArgs} ${runnerGroupArgument}`.trim()
? `--url ${configBaseUrl}/${payload.repositoryOwner} ${runnerArgs}${runnerGroupArgument}`.trim()
: `--url ${configBaseUrl}/${payload.repositoryOwner}/${payload.repositoryName} ${runnerArgs}`.trim(),
runnerOwner,
runnerType,
Expand Down