Skip to content

Commit 06f511f

Browse files
authored
feat!: Set default lambda node runtime to 18x on arm64 (#2763)
* feat!: Set default lambda node runtime to 18x on arm64 - Update node runtime to node18.x (LTS) - Update default runtime to ARM * upgrade terrafrom versions
1 parent 08c4ca9 commit 06f511f

File tree

29 files changed

+235
-263
lines changed

29 files changed

+235
-263
lines changed

.github/workflows/lambda-runner-binaries-syncer.yml

+3-22
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node: [16]
18-
container:
19-
image: node:${{ matrix.node }}
20-
defaults:
21-
run:
22-
working-directory: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer
23-
24-
steps:
25-
- uses: actions/checkout@v3
26-
- name: Install dependencies
27-
run: yarn install
28-
- name: Run prettier
29-
run: yarn format-check
30-
- name: Run linter
31-
run: yarn lint
32-
- name: Run tests
33-
run: yarn test
34-
- name: Build distribution
35-
run: yarn build
14+
uses: ./.github/workflows/lambda-template.yml
15+
with:
16+
working-directory: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer

.github/workflows/lambda-runners.yml

+3-26
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node: [16]
18-
container:
19-
image: node:${{ matrix.node }}
20-
defaults:
21-
run:
22-
working-directory: modules/runners/lambdas/runners
23-
24-
steps:
25-
- uses: actions/checkout@v3
26-
- name: Install dependencies
27-
run: yarn install
28-
- name: Run prettier
29-
run: yarn format-check
30-
- name: Run linter
31-
run: yarn lint
32-
- name: Run tests
33-
run: yarn test
34-
- name: Run two tests in isolation
35-
run: |
36-
yarn run test src/scale-runners/scale-up.test.ts -t 'scaleUp with GHES on org level creates a runner with labels in s specific group' --coverage=false
37-
yarn run test src/scale-runners/scale-up.test.ts -t 'scaleUp with public GH on org level creates a runner with labels in s specific group' --coverage=false
38-
- name: Build distribution
39-
run: yarn build
14+
uses: ./.github/workflows/lambda-template.yml
15+
with:
16+
working-directory: modules/runners/lambdas/runners

.github/workflows/lambda-template.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lambda Syncer
2+
on:
3+
workflow_call:
4+
inputs:
5+
working-directory:
6+
required: true
7+
type: string
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node: [18]
15+
container:
16+
image: node:${{ matrix.node }}
17+
defaults:
18+
run:
19+
working-directory: ${{ inputs.working-directory }}/${{ inputs.image }}
20+
21+
steps:
22+
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
23+
- name: Install dependencies
24+
run: yarn install
25+
- name: Run prettier
26+
run: yarn format-check
27+
- name: Run linter
28+
run: yarn lint
29+
- name: Run tests
30+
run: yarn test
31+
- name: Build distribution
32+
run: yarn build

.github/workflows/lambda-webhook.yml

+3-22
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
node: [16]
18-
container:
19-
image: node:${{ matrix.node }}
20-
defaults:
21-
run:
22-
working-directory: modules/webhook/lambdas/webhook
23-
24-
steps:
25-
- uses: actions/checkout@v3
26-
- name: Install dependencies
27-
run: yarn install
28-
- name: Run prettier
29-
run: yarn format-check
30-
- name: Run linter
31-
run: yarn lint
32-
- name: Run tests
33-
run: yarn test
34-
- name: Build distribution
35-
run: yarn build
14+
uses: ./.github/workflows/lambda-template.yml
15+
with:
16+
working-directory: modules/webhook/lambdas/webhook

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
prepare:
1010
name: Create dist
1111
runs-on: ubuntu-latest
12-
container: node:16
12+
container: node:18
1313
strategy:
1414
matrix:
1515
lambda: ["modules/webhook/lambdas/webhook", "modules/runner-binaries-syncer/lambdas/runner-binaries-syncer", "modules/runners/lambdas/runners"]

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,14 @@ We welcome any improvement to the standard module to make the default as secure
402402
| Name | Version |
403403
|------|---------|
404404
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
405-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.15 |
405+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.41 |
406406
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.0 |
407407

408408
## Providers
409409

410410
| Name | Version |
411411
|------|---------|
412-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.15 |
412+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.41 |
413413
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.0 |
414414

415415
## Modules
@@ -473,9 +473,9 @@ We welcome any improvement to the standard module to make the default as secure
473473
| <a name="input_job_queue_retention_in_seconds"></a> [job\_queue\_retention\_in\_seconds](#input\_job\_queue\_retention\_in\_seconds) | The number of seconds the job is held in the queue before it is purged | `number` | `86400` | no |
474474
| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | Key pair name | `string` | `null` | no |
475475
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | Optional CMK Key ARN to be used for Parameter Store. This key must be in the current account. | `string` | `null` | no |
476-
| <a name="input_lambda_architecture"></a> [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"x86_64"` | no |
476+
| <a name="input_lambda_architecture"></a> [lambda\_architecture](#input\_lambda\_architecture) | AWS Lambda architecture. Lambda functions using Graviton processors ('arm64') tend to have better price/performance than 'x86\_64' functions. | `string` | `"arm64"` | no |
477477
| <a name="input_lambda_principals"></a> [lambda\_principals](#input\_lambda\_principals) | (Optional) add extra principals to the role created for execution of the lambda, e.g. for local testing. | <pre>list(object({<br> type = string<br> identifiers = list(string)<br> }))</pre> | `[]` | no |
478-
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs16.x"` | no |
478+
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no |
479479
| <a name="input_lambda_s3_bucket"></a> [lambda\_s3\_bucket](#input\_lambda\_s3\_bucket) | S3 bucket from which to specify lambda functions. This is an alternative to providing local files directly. | `string` | `null` | no |
480480
| <a name="input_lambda_security_group_ids"></a> [lambda\_security\_group\_ids](#input\_lambda\_security\_group\_ids) | List of security group IDs associated with the Lambda function. | `list(string)` | `[]` | no |
481481
| <a name="input_lambda_subnet_ids"></a> [lambda\_subnet\_ids](#input\_lambda\_subnet\_ids) | List of subnets in which the action runners will be launched, the subnets needs to be subnets in the `vpc_id`. | `list(string)` | `[]` | no |

examples/arm64/.terraform.lock.hcl

+19-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/default/.terraform.lock.hcl

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/ephemeral/.terraform.lock.hcl

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/lambdas-download/.terraform.lock.hcl

+29-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)