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

Commit 160c299

Browse files
authored
Merge pull request #2499 from philips-labs/develop
chore: Release
2 parents a21158a + 69578e0 commit 160c299

File tree

12 files changed

+1034
-933
lines changed

12 files changed

+1034
-933
lines changed

Diff for: .github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
stale:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/stale@v5
15+
- uses: actions/stale@v6
1616
with:
1717
stale-issue-message: >
1818
This issue has been automatically marked as stale because it has not had

Diff for: README.md

+2
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ In case the setup does not work as intended follow the trace of events:
452452
| <a name="input_runner_architecture"></a> [runner\_architecture](#input\_runner\_architecture) | The platform architecture of the runner instance\_type. | `string` | `"x64"` | no |
453453
| <a name="input_runner_as_root"></a> [runner\_as\_root](#input\_runner\_as\_root) | Run the action runner under the root user. Variable `runner_run_as` will be ignored. | `bool` | `false` | no |
454454
| <a name="input_runner_binaries_s3_sse_configuration"></a> [runner\_binaries\_s3\_sse\_configuration](#input\_runner\_binaries\_s3\_sse\_configuration) | Map containing server-side encryption configuration for runner-binaries S3 bucket. | `any` | `{}` | no |
455+
| <a name="input_runner_binaries_s3_logging_bucket"></a> [runner\_binaries\_s3\_logging\_bucket](#input\_runner\_binaries\_s3\_logging\_bucket) | Bucket for action runner distribution bucket access logging. | `string` | `null` | no |
456+
| <a name="input_runner_binaries_s3_logging_bucket_prefix"></a> [runner\_binaries\_s3\_logging\_bucket\_prefix](#input\_runner\_binaries\_s3\logging\_bucket\_prefix) | Bucket prefix for action runner distribution bucket access logging. | `string` | `null` | no |
455457
| <a name="input_runner_binaries_syncer_lambda_timeout"></a> [runner\_binaries\_syncer\_lambda\_timeout](#input\_runner\_binaries\_syncer\_lambda\_timeout) | Time out of the binaries sync lambda in seconds. | `number` | `300` | no |
456458
| <a name="input_runner_binaries_syncer_lambda_zip"></a> [runner\_binaries\_syncer\_lambda\_zip](#input\_runner\_binaries\_syncer\_lambda\_zip) | File location of the binaries sync lambda zip file. | `string` | `null` | no |
457459
| <a name="input_runner_boot_time_in_minutes"></a> [runner\_boot\_time\_in\_minutes](#input\_runner\_boot\_time\_in\_minutes) | The minimum time for an EC2 runner to boot and register as a runner. | `number` | `5` | no |

Diff for: main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ module "runner_binaries" {
238238
tags = local.tags
239239

240240
distribution_bucket_name = "${var.prefix}-dist-${random_string.random.result}"
241+
s3_logging_bucket = var.runner_binaries_s3_logging_bucket
242+
s3_logging_bucket_prefix = var.runner_binaries_s3_logging_bucket_prefix
241243

242244
runner_os = var.runner_os
243245
runner_architecture = var.runner_architecture

Diff for: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
"@octokit/rest": "^19.0.4",
1919
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
2020
"@types/jest": "^27.5.0",
21-
"@types/node": "^18.7.18",
21+
"@types/node": "^18.8.2",
2222
"@types/request": "^2.48.8",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
2424
"@typescript-eslint/parser": "^4.33.0",
2525
"@vercel/ncc": "^0.34.0",
26-
"aws-sdk": "^2.1219.0",
26+
"aws-sdk": "^2.1230.0",
2727
"eslint": "^7.32.0",
2828
"eslint-plugin-prettier": "4.2.1",
2929
"jest": "^27.5.1",
30-
"jest-mock": "^29.0.3",
30+
"jest-mock": "^29.1.2",
3131
"prettier": "2.7.1",
3232
"ts-jest": "^27.1.4",
3333
"ts-node-dev": "^2.0.0",
34-
"typescript": "^4.8.3"
34+
"typescript": "^4.8.4"
3535
},
3636
"dependencies": {
3737
"axios": "^0.27.2",

Diff for: modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock

+34-21
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,10 @@
654654
"@types/yargs" "^16.0.0"
655655
chalk "^4.0.0"
656656

657-
"@jest/types@^29.0.3":
658-
version "29.0.3"
659-
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.0.3.tgz#0be78fdddb1a35aeb2041074e55b860561c8ef63"
660-
integrity sha512-coBJmOQvurXjN1Hh5PzF7cmsod0zLIOXpP8KD161mqNlroMhLcwpODiEzi7ZsRl5Z/AIuxpeNm8DCl43F4kz8A==
657+
"@jest/types@^29.1.2":
658+
version "29.1.2"
659+
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.1.2.tgz#7442d32b16bcd7592d9614173078b8c334ec730a"
660+
integrity sha512-DcXGtoTykQB5jiwCmVr8H4vdg2OJhQex3qPkG+ISyDO7xQXbt/4R6dowcRyPemRnkH7JoHvZuxPBdlq+9JxFCg==
661661
dependencies:
662662
"@jest/schemas" "^29.0.0"
663663
"@types/istanbul-lib-coverage" "^2.0.0"
@@ -994,10 +994,10 @@
994994
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
995995
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
996996

997-
"@types/node@*", "@types/node@^18.7.18":
998-
version "18.7.18"
999-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154"
1000-
integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==
997+
"@types/node@*", "@types/node@^18.8.2":
998+
version "18.8.2"
999+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.8.2.tgz#17d42c6322d917764dd3d2d3a10d7884925de067"
1000+
integrity sha512-cRMwIgdDN43GO4xMWAfJAecYn8wV4JbsOGHNfNUIDiuYkUYAR5ec4Rj7IO2SAhFPEfpPtLtUTbbny/TCT7aDwA==
10011001

10021002
"@types/prettier@^2.1.5":
10031003
version "2.4.2"
@@ -1274,10 +1274,10 @@ available-typed-arrays@^1.0.5:
12741274
resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
12751275
integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
12761276

1277-
aws-sdk@^2.1219.0:
1278-
version "2.1219.0"
1279-
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1219.0.tgz#96d056fc4ebfd8417308f18a34f127dbaafc022e"
1280-
integrity sha512-KOGA0E3wZ/Zom1VDAd4ttsaq2LAVECXdHUs/i8OyJkuR3vSvmKQa/BOH4baIBNt4VMS062FhPA29UtT1YPTlwQ==
1277+
aws-sdk@^2.1230.0:
1278+
version "2.1230.0"
1279+
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1230.0.tgz#d7ebf384f2cb9b312325c537d38bec47e5ba8087"
1280+
integrity sha512-7Y260dvzr7b8/lZhg6A7h5WyHvfCgdFL0NiBgCuT3/xlw9rvq9b08JNYErEpaJSmo+A5hW35n6wtzii4/FUSTA==
12811281
dependencies:
12821282
buffer "4.9.2"
12831283
events "1.1.1"
@@ -2796,13 +2796,14 @@ jest-mock@^27.5.1:
27962796
"@jest/types" "^27.5.1"
27972797
"@types/node" "*"
27982798

2799-
jest-mock@^29.0.3:
2800-
version "29.0.3"
2801-
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.0.3.tgz#4f0093f6a9cb2ffdb9c44a07a3912f0c098c8de9"
2802-
integrity sha512-ort9pYowltbcrCVR43wdlqfAiFJXBx8l4uJDsD8U72LgBcetvEp+Qxj1W9ZYgMRoeAo+ov5cnAGF2B6+Oth+ww==
2799+
jest-mock@^29.1.2:
2800+
version "29.1.2"
2801+
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.1.2.tgz#de47807edbb9d4abf8423f1d8d308d670105678c"
2802+
integrity sha512-PFDAdjjWbjPUtQPkQufvniXIS3N9Tv7tbibePEjIIprzjgo0qQlyUiVMrT4vL8FaSJo1QXifQUOuPH3HQC/aMA==
28032803
dependencies:
2804-
"@jest/types" "^29.0.3"
2804+
"@jest/types" "^29.1.2"
28052805
"@types/node" "*"
2806+
jest-util "^29.1.2"
28062807

28072808
jest-pnp-resolver@^1.2.2:
28082809
version "1.2.2"
@@ -2942,6 +2943,18 @@ jest-util@^27.0.0, jest-util@^27.5.1:
29422943
graceful-fs "^4.2.9"
29432944
picomatch "^2.2.3"
29442945

2946+
jest-util@^29.1.2:
2947+
version "29.1.2"
2948+
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.1.2.tgz#ac5798e93cb6a6703084e194cfa0898d66126df1"
2949+
integrity sha512-vPCk9F353i0Ymx3WQq3+a4lZ07NXu9Ca8wya6o4Fe4/aO1e1awMMprZ3woPFpKwghEOW+UXgd15vVotuNN9ONQ==
2950+
dependencies:
2951+
"@jest/types" "^29.1.2"
2952+
"@types/node" "*"
2953+
chalk "^4.0.0"
2954+
ci-info "^3.2.0"
2955+
graceful-fs "^4.2.9"
2956+
picomatch "^2.2.3"
2957+
29452958
jest-validate@^27.5.1:
29462959
version "27.5.1"
29472960
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067"
@@ -3975,10 +3988,10 @@ typedarray-to-buffer@^3.1.5:
39753988
dependencies:
39763989
is-typedarray "^1.0.0"
39773990

3978-
typescript@^4.8.3:
3979-
version "4.8.3"
3980-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88"
3981-
integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==
3991+
typescript@^4.8.4:
3992+
version "4.8.4"
3993+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
3994+
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
39823995

39833996
unbox-primitive@^1.0.2:
39843997
version "1.0.2"

Diff for: modules/runner-binaries-syncer/main.tf

+6-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ resource "aws_s3_bucket_lifecycle_configuration" "bucket-config" {
2828
days = 35
2929
storage_class = "INTELLIGENT_TIERING"
3030
}
31-
32-
3331
}
3432
}
3533

@@ -64,7 +62,13 @@ resource "aws_s3_bucket_public_access_block" "action_dist" {
6462
restrict_public_buckets = true
6563
}
6664

65+
resource "aws_s3_bucket_logging" "action_dist_logging" {
66+
count = var.s3_logging_bucket != null ? 1 : 0
6767

68+
bucket = aws_s3_bucket.action_dist.id
69+
target_bucket = var.s3_logging_bucket
70+
target_prefix = var.s3_logging_bucket_prefix != null ? var.s3_logging_bucket_prefix : var.distribution_bucket_name
71+
}
6872

6973
data "aws_iam_policy_document" "action_dist_sse_policy" {
7074
count = try(var.server_side_encryption_configuration.rule.apply_server_side_encryption_by_default, null) != null ? 1 : 0

Diff for: modules/runner-binaries-syncer/variables.tf

+25
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,31 @@ variable "distribution_bucket_name" {
3636
condition = can(regex("^[a-z0-9-]*$", var.distribution_bucket_name))
3737
}
3838
}
39+
40+
variable "s3_logging_bucket" {
41+
description = "Bucket for action runner distribution bucket access logging."
42+
type = string
43+
default = null
44+
45+
# Make sure the bucket name only contains legal characters
46+
validation {
47+
error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name."
48+
condition = var.s3_logging_bucket == null || can(regex("^[a-z0-9-]*$", var.s3_logging_bucket))
49+
}
50+
}
51+
52+
variable "s3_logging_bucket_prefix" {
53+
description = "Bucket prefix for action runner distribution bucket access logging."
54+
type = string
55+
default = null
56+
57+
# Make sure the bucket name only contains legal characters
58+
validation {
59+
error_message = "Only lowercase alphanumeric characters and hyphens allowed in the bucket name."
60+
condition = var.s3_logging_bucket_prefix == null || can(regex("^[a-z0-9-]*$", var.s3_logging_bucket_prefix))
61+
}
62+
}
63+
3964
variable "lambda_schedule_expression" {
4065
description = "Scheduler expression for action runner binary syncer."
4166
type = string

Diff for: modules/runners/lambdas/runners/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
20-
"@types/aws-lambda": "^8.10.104",
20+
"@types/aws-lambda": "^8.10.106",
2121
"@types/express": "^4.17.14",
2222
"@types/jest": "^27.5.0",
2323
"@typescript-eslint/eslint-plugin": "^4.33.0",
@@ -26,7 +26,7 @@
2626
"eslint": "^7.32.0",
2727
"eslint-plugin-prettier": "4.2.1",
2828
"jest": "27.5.1",
29-
"jest-mock": "^29.0.3",
29+
"jest-mock": "^29.1.2",
3030
"jest-mock-extended": "^3.0.1",
3131
"moment-timezone": "^0.5.37",
3232
"nock": "^13.2.9",
@@ -36,16 +36,16 @@
3636
"ts-node-dev": "^2.0.0"
3737
},
3838
"dependencies": {
39-
"@aws-sdk/client-ssm": "^3.171.0",
40-
"@octokit/auth-app": "4.0.5",
39+
"@aws-sdk/client-ssm": "^3.183.0",
40+
"@octokit/auth-app": "4.0.6",
4141
"@octokit/rest": "^19.0.4",
42-
"@octokit/types": "^7.5.0",
43-
"@types/aws-lambda": "^8.10.104",
42+
"@octokit/types": "^7.5.1",
43+
"@types/aws-lambda": "^8.10.106",
4444
"@types/express": "^4.17.14",
45-
"@types/node": "^18.7.18",
46-
"aws-sdk": "^2.1221.0",
45+
"@types/node": "^18.8.2",
46+
"aws-sdk": "^2.1229.0",
4747
"cron-parser": "^4.6.0",
4848
"tslog": "^3.3.4",
49-
"typescript": "^4.8.3"
49+
"typescript": "^4.8.4"
5050
}
5151
}

0 commit comments

Comments
 (0)