Skip to content

Commit 7d8652f

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/lambdas/typescript-eslint/parser-8.8.0
2 parents 4176cb1 + fb67693 commit 7d8652f

File tree

36 files changed

+931
-992
lines changed

36 files changed

+931
-992
lines changed

.github/workflows/lambda.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
working-directory: ./lambdas
2020

2121
steps:
22-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2323
- name: Install dependencies
2424
run: yarn install --frozen-lockfile
2525
- name: Run prettier

.github/workflows/packer-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
working-directory: images/${{ matrix.image }}
2626
steps:
2727
- name: "Checkout"
28-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2929
- name: packer init
3030
run: packer init .
3131
- name: check packer formatting

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
1818
with:
1919
node-version: 20
20-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
20+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2121
- name: Build dist
2222
working-directory: lambdas
2323
run: yarn install --frozen-lockfile && yarn run test && yarn dist

.github/workflows/semantic-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Semantic Commit Message Check
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1717
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
1818
name: Check PR for Semantic Commit Message
1919
env:

.github/workflows/terraform.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
image: hashicorp/terraform:${{ matrix.terraform }}
2424
steps:
2525
- name: "Checkout"
26-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2727
- name: "Fake zip files" # Validate will fail if it cannot find the zip files
2828
run: |
2929
touch lambdas/functions/webhook/webhook.zip
@@ -89,7 +89,7 @@ jobs:
8989
container:
9090
image: hashicorp/terraform:${{ matrix.terraform }}
9191
steps:
92-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
92+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
9393
- name: terraform init
9494
run: terraform init -get -backend=false -input=false
9595
- if: contains(matrix.terraform, '1.3.')
@@ -147,7 +147,7 @@ jobs:
147147
container:
148148
image: hashicorp/terraform:${{ matrix.terraform }}
149149
steps:
150-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
150+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
151151
- name: terraform init
152152
run: terraform init -get -backend=false -input=false
153153
- if: contains(matrix.terraform, '1.5.')

.github/workflows/update-docs.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout with GITHUB Action token
19-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
19+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2020
with:
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222

2323
# use an app to ensure CI is triggered
2424
- name: Generate TF docs
2525
if: github.repository_owner == 'philips-labs'
26-
uses: terraform-docs/gh-actions@cca78c27ac9e2b6545debf2ecae9df930fd3461c # v1.2.2
26+
uses: terraform-docs/gh-actions@aeae0038ed47a547e0c0fca5c059d3335f48fb25 # v1.3.0
2727
with:
2828
find-dir: .
2929
git-commit-message: "docs: auto update terraform docs"
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Generate TF docs (forks)
3535
if: github.repository_owner != 'philips-labs'
36-
uses: terraform-docs/gh-actions@cca78c27ac9e2b6545debf2ecae9df930fd3461c # v1.2.2
36+
uses: terraform-docs/gh-actions@aeae0038ed47a547e0c0fca5c059d3335f48fb25 # v1.3.0
3737
with:
3838
find-dir: .
3939
git-commit-message: "docs: auto update terraform docs"
@@ -56,7 +56,7 @@ jobs:
5656
needs: [docs]
5757
runs-on: ubuntu-latest
5858
steps:
59-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
59+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
6060
- name: Configure Git Credentials
6161
run: |
6262
git config user.name github-actions[bot]

README.md

+23-23
Large diffs are not rendered by default.

docs/index.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A pertinent question may arise: why not opt for Kubernetes? The current strategy
1515

1616
## Overview
1717

18-
The module is designed to be used in a GitHub organization. It can also be used in a GitHub repository, but this not supports all features. The module is receiving GitHub webhook events for the `workflow_job` event. The module will create a new runner if the event is for a workflow that requires a runner, and no runner is available. Alteratively the module can be configured as ephemeral runners. In this case the module will create a new runner for each workflow job event.
18+
The module is designed to be used in a GitHub organization. It can also be used in a GitHub repository, but this does not supports all features. The module is receiving GitHub webhook events for the `workflow_job` event. The module will create a new runner if the event is for a workflow that requires a runner, and no runner is available. Alternatively the module can be configured as ephemeral runners. In this case the module will create a new runner for each workflow job event.
1919

2020
For ephemeral runners a pool is can be configured. The pool maintains a minimum number of runners based on a schedule. The pool works only for org level runners.
2121

@@ -46,7 +46,7 @@ The "Scale Up Runner" Lambda actively monitors the SQS queue, processing incomin
4646

4747
The Lambda first requests a JIT configuration or registration token from GitHub, which is needed later by the runner to register itself. This avoids the case that the EC2 instance, which later in the process will install the agent, needs administration permissions to register the runner. Next, the EC2 spot instance is created via the launch template. The launch template defines the specifications of the required instance and contains a [`user_data`](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) script. This script will install the required software and configure it. The configuration for the runner is shared via EC2 tags and the parameter store (SSM), from which the user data script will fetch it and delete it once it has been retrieved. Once the user data script is finished, the action runner should be online, and the workflow will start in seconds.
4848

49-
The current method for scaling down runners employs a straightforward approach: at predefined intervals, the Lambda conducts a thorough examination of each runner (instance) to assess its activity. If a runner is found to be idle, it is deregistered from GitHub, and the associated AWS instance is terminated. For ephemeral runners the the instance is terminated immediately after the workflow is finished. Instances not registered in GitHub as a runner after a minimal boot time will be marked orphan and removed in a next cycle. To avoid orphaned runners the scale down lambda is active in this cae as well.
49+
The current method for scaling down runners employs a straightforward approach: at predefined intervals, the Lambda conducts a thorough examination of each runner (instance) to assess its activity. If a runner is found to be idle, it is deregistered from GitHub, and the associated AWS instance is terminated. For ephemeral runners the instance is terminated immediately after the workflow is finished. Instances not registered in GitHub as a runner after a minimal boot time will be marked orphan and removed in a next cycle. To avoid orphaned runners the scale down lambda is active in this case as well.
5050

5151
### Pool
5252

@@ -79,18 +79,19 @@ The Instance Termination Watcher is creating log and optional metrics for termin
7979

8080
This feature is Beta, changes will not trigger a major release as long in beta.
8181

82-
The Job Retry will allow you to retry scaling when a job is not started. When enabled the scale up lambda will send a retry message to the a SQS queue. The job retry lambda will check after a delay if the job is still queued. And if so it will send a retry command de the scale up lambda via SQS. The feature is designed to be used with ephemeral runners. The feature is opt in, it will not be created by default.
82+
The Job Retry will allow you to retry scaling when a job is not started. When enabled the scale up lambda will send a retry message to the a SQS queue. The Job Retry lambda will check after a delay if the job is still queued, and if so, it will send a retry command to the scale up lambda via SQS. The feature is designed to be used with ephemeral runners. The feature is opt in, it will not be created by default.
8383

8484
Consequences of enabling the feature are:
85+
8586
- Increase of calls to the GitHub API, could cause reaching the rate limit.
86-
- Could create new instance when job are not started caused by other failures, resulting in more costs and useless instance creation.
87+
- Could create new instance when jobs are not started caused by other failures, resulting in more costs and useless instance creation.
8788

8889

8990
### Security
9091

91-
Sensitive information such as secrets and private keys is stored securely in the SSM Parameter Store. These values undergo encryption using either the default KMS key for SSM or a custom KMS key, depending on the specified configuration.
92+
Sensitive information such as secrets and private keys are stored securely in the SSM Parameter Store. These values undergo encryption using either the default KMS key for SSM or a custom KMS key, depending on the specified configuration.
9293

93-
Permission are managed in several places. Below are the most important ones. For details check the Terraform sources.
94+
Permissions are managed in several places. Below are the most important ones. For details check the Terraform sources.
9495

9596
- The GitHub App requires access to actions and to publish `workflow_job` events to the AWS webhook (API gateway).
9697
- The scale up lambda should have access to EC2 for creating and tagging instances.
@@ -112,5 +113,5 @@ Both modules are built on top of the same base modules. When using the multi-run
112113
The module contains a lot of configuration options. The default values are a good starting point. But you may want to tweak some of the values. Below are some recommendations. We suggest the following configuration for the runners:
113114

114115
- Use the multi-runner module to create multiple runners in one go.
115-
- Use the ephemeral runners for org level runners. To improve the security of your runners.
116+
- Use the ephemeral runners for org level runners to improve the security of your runners.
116117
- Use pre-built AMIs to speed up the startup of your runners.

examples/arm64/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ terraform output -raw webhook_secret
6262

6363
| Name | Description | Type | Default | Required |
6464
|------|-------------|------|---------|:--------:|
65-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub App for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
65+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub App for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
6666

6767
## Outputs
6868

examples/default/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ terraform output -raw webhook_secret
6464
|------|-------------|------|---------|:--------:|
6565
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no |
6666
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name, used as prefix. | `string` | `null` | no |
67-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
67+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
6868

6969
## Outputs
7070

examples/ephemeral/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ terraform output webhook_secret
6363
|------|-------------|------|---------|:--------:|
6464
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region. | `string` | `"eu-west-1"` | no |
6565
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name, used as prefix | `string` | `null` | no |
66-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
66+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
6767

6868
## Outputs
6969

examples/multi-runner/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ terraform output -raw webhook_secret
8282
|------|-------------|------|---------|:--------:|
8383
| <a name="input_aws_region"></a> [aws\_region](#input\_aws\_region) | AWS region to deploy to | `string` | `"eu-west-1"` | no |
8484
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name, used as prefix | `string` | `null` | no |
85-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
85+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
8686

8787
## Outputs
8888

examples/permissions-boundary/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ terraform apply
6767

6868
| Name | Description | Type | Default | Required |
6969
|------|-------------|------|---------|:--------:|
70-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
70+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
7171

7272
## Outputs
7373

examples/prebuilt/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ terraform output webhook_secret
9292
| Name | Description | Type | Default | Required |
9393
|------|-------------|------|---------|:--------:|
9494
| <a name="input_ami_name_filter"></a> [ami\_name\_filter](#input\_ami\_name\_filter) | AMI name filter for the action runner AMI. By default amazon linux 2 is used. | `string` | `"github-runner-al2023-x86_64-*"` | no |
95-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
95+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
9696
| <a name="input_runner_os"></a> [runner\_os](#input\_runner\_os) | The EC2 Operating System type to use for action runner instances (linux,windows). | `string` | `"linux"` | no |
9797

9898
## Outputs

examples/ubuntu/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ terraform output webhook_secret
6565

6666
| Name | Description | Type | Default | Required |
6767
|------|-------------|------|---------|:--------:|
68-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
68+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
6969

7070
## Outputs
7171

examples/windows/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ terraform output webhook_secret
6868

6969
| Name | Description | Type | Default | Required |
7070
|------|-------------|------|---------|:--------:|
71-
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br> id = string<br> key_base64 = string<br> })</pre> | n/a | yes |
71+
| <a name="input_github_app"></a> [github\_app](#input\_github\_app) | GitHub for API usages. | <pre>object({<br/> id = string<br/> key_base64 = string<br/> })</pre> | n/a | yes |
7272

7373
## Outputs
7474

lambdas/functions/ami-housekeeper/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"dependencies": {
4040
"@aws-github-runner/aws-powertools-util": "*",
4141
"@aws-github-runner/aws-ssm-util": "*",
42-
"@aws-sdk/client-ec2": "^3.657.0",
43-
"@aws-sdk/client-ssm": "^3.654.0",
44-
"@aws-sdk/types": "^3.654.0",
42+
"@aws-sdk/client-ec2": "^3.662.0",
43+
"@aws-sdk/client-ssm": "^3.662.0",
44+
"@aws-sdk/types": "^3.662.0",
4545
"cron-parser": "^4.9.0",
4646
"typescript": "^5.5.4"
4747
},

lambdas/functions/control-plane/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
"@aws-github-runner/aws-powertools-util": "*",
4242
"@aws-github-runner/aws-ssm-util": "*",
4343
"@aws-lambda-powertools/parameters": "^2.8.0",
44-
"@aws-sdk/client-ec2": "^3.657.0",
45-
"@aws-sdk/client-sqs": "^3.654.0",
46-
"@aws-sdk/types": "^3.654.0",
44+
"@aws-sdk/client-ec2": "^3.662.0",
45+
"@aws-sdk/client-sqs": "^3.662.0",
46+
"@aws-sdk/types": "^3.662.0",
4747
"@middy/core": "^4.7.0",
4848
"@octokit/auth-app": "6.1.2",
4949
"@octokit/core": "5.2.0",
5050
"@octokit/plugin-throttling": "8.2.0",
5151
"@octokit/rest": "20.1.1",
52-
"@octokit/types": "^13.5.0",
52+
"@octokit/types": "^13.6.0",
5353
"cron-parser": "^4.9.0",
5454
"typescript": "^5.5.4"
5555
},

lambdas/functions/gh-agent-syncer/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
},
3838
"dependencies": {
3939
"@aws-github-runner/aws-powertools-util": "*",
40-
"@aws-sdk/client-s3": "^3.657.0",
41-
"@aws-sdk/lib-storage": "^3.657.0",
42-
"@aws-sdk/types": "^3.654.0",
40+
"@aws-sdk/client-s3": "^3.662.0",
41+
"@aws-sdk/lib-storage": "^3.662.0",
42+
"@aws-sdk/types": "^3.662.0",
4343
"@middy/core": "^4.7.0",
4444
"@octokit/rest": "20.1.1",
45-
"axios": "^1.7.5"
45+
"axios": "^1.7.7"
4646
},
4747
"nx": {
4848
"includedScripts": [

lambdas/functions/termination-watcher/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
},
3737
"dependencies": {
3838
"@aws-github-runner/aws-powertools-util": "*",
39-
"@aws-sdk/client-ec2": "^3.657.0",
40-
"@aws-sdk/types": "^3.654.0",
39+
"@aws-sdk/client-ec2": "^3.662.0",
40+
"@aws-sdk/types": "^3.662.0",
4141
"@middy/core": "^4.7.0",
4242
"typescript": "^5.5.4"
4343
},

lambdas/functions/webhook/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
"dependencies": {
4040
"@aws-github-runner/aws-powertools-util": "*",
4141
"@aws-github-runner/aws-ssm-util": "*",
42-
"@aws-sdk/client-sqs": "^3.654.0",
42+
"@aws-sdk/client-sqs": "^3.662.0",
4343
"@middy/core": "^4.7.0",
4444
"@octokit/rest": "20.1.1",
45-
"@octokit/types": "^13.5.0",
45+
"@octokit/types": "^13.6.0",
4646
"@octokit/webhooks": "^12.2.0",
4747
"aws-lambda": "^1.0.7"
4848
},

lambdas/libs/aws-ssm-util/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
},
3737
"dependencies": {
3838
"@aws-github-runner/aws-powertools-util": "*",
39-
"@aws-sdk/client-ssm": "^3.654.0",
40-
"@aws-sdk/types": "^3.654.0"
39+
"@aws-sdk/client-ssm": "^3.662.0",
40+
"@aws-sdk/types": "^3.662.0"
4141
},
4242
"nx": {
4343
"includedScripts": [

0 commit comments

Comments
 (0)