Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 2fd1e16

Browse files
committed
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 955bd1d commit 2fd1e16

File tree

29 files changed

+235
-263
lines changed

29 files changed

+235
-263
lines changed

Diff for: .github/workflows/lambda-runner-binaries-syncer.yml

+3-22
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,6 @@ on:
1010

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

Diff for: .github/workflows/lambda-runners.yml

+3-26
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,6 @@ on:
1010

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

Diff for: .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

Diff for: .github/workflows/lambda-webhook.yml

+3-22
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,6 @@ on:
1010

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

Diff for: .github/workflows/release.yml

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

Diff for: README.md

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

412412
## Providers
413413

414414
| Name | Version |
415415
|------|---------|
416-
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.15 |
416+
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.41 |
417417
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.0 |
418418

419419
## Modules
@@ -477,9 +477,9 @@ We welcome any improvement to the standard module to make the default as secure
477477
| <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 |
478478
| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | Key pair name | `string` | `null` | no |
479479
| <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 |
480-
| <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 |
480+
| <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 |
481481
| <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 |
482-
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs16.x"` | no |
482+
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no |
483483
| <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 |
484484
| <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 |
485485
| <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 |

Diff for: 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.

Diff for: 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.

Diff for: 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.

Diff for: 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)