Skip to content

feat!: Set default lambda node runtime to 18x on arm64 #2763

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

Merged
merged 2 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 3 additions & 22 deletions .github/workflows/lambda-runner-binaries-syncer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
container:
image: node:${{ matrix.node }}
defaults:
run:
working-directory: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run prettier
run: yarn format-check
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test
- name: Build distribution
run: yarn build
uses: ./.github/workflows/lambda-template.yml
with:
working-directory: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer
29 changes: 3 additions & 26 deletions .github/workflows/lambda-runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,6 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
container:
image: node:${{ matrix.node }}
defaults:
run:
working-directory: modules/runners/lambdas/runners

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run prettier
run: yarn format-check
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test
- name: Run two tests in isolation
run: |
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
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
- name: Build distribution
run: yarn build
uses: ./.github/workflows/lambda-template.yml
with:
working-directory: modules/runners/lambdas/runners
32 changes: 32 additions & 0 deletions .github/workflows/lambda-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lambda Syncer
on:
workflow_call:
inputs:
working-directory:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to make this an input?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once needed. Preferable only one version.

container:
image: node:${{ matrix.node }}
defaults:
run:
working-directory: ${{ inputs.working-directory }}/${{ inputs.image }}

steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
- name: Install dependencies
run: yarn install
- name: Run prettier
run: yarn format-check
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test
- name: Build distribution
run: yarn build
25 changes: 3 additions & 22 deletions .github/workflows/lambda-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ on:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
container:
image: node:${{ matrix.node }}
defaults:
run:
working-directory: modules/webhook/lambdas/webhook

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: yarn install
- name: Run prettier
run: yarn format-check
- name: Run linter
run: yarn lint
- name: Run tests
run: yarn test
- name: Build distribution
run: yarn build
uses: ./.github/workflows/lambda-template.yml
with:
working-directory: modules/webhook/lambdas/webhook
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
prepare:
name: Create dist
runs-on: ubuntu-latest
container: node:16
container: node:18
strategy:
matrix:
lambda: ["modules/webhook/lambdas/webhook", "modules/runner-binaries-syncer/lambdas/runner-binaries-syncer", "modules/runners/lambdas/runners"]
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,14 @@ We welcome any improvement to the standard module to make the default as secure
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.15 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.41 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.0 |

## Providers

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

## Modules
Expand Down Expand Up @@ -474,9 +474,9 @@ We welcome any improvement to the standard module to make the default as secure
| <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 |
| <a name="input_key_name"></a> [key\_name](#input\_key\_name) | Key pair name | `string` | `null` | no |
| <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 |
| <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 |
| <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 |
| <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 |
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs16.x"` | no |
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | AWS Lambda runtime. | `string` | `"nodejs18.x"` | no |
| <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 |
| <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 |
| <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 |
Expand Down
37 changes: 19 additions & 18 deletions examples/arm64/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions examples/default/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions examples/ephemeral/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 29 additions & 29 deletions examples/lambdas-download/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading