Commit 404785e
fix(runners): wire job_retry.lambda_memory_size and lambda_timeout (github-aws-runners#5120)
## Description
Both `var.job_retry` (in `modules/multi-runner/variables.tf` and
`modules/runners/variables.tf`) declare `lambda_memory_size` and
`lambda_timeout` as documented configuration fields, but
`local.job_retry` in
[`modules/runners/job-retry.tf`](https://github.com/github-aws-runners/terraform-aws-github-runner/blob/main/modules/runners/job-retry.tf#L5-L33)
never copies either field into the `config` map passed to the inner
`job-retry` / `lambda` sub-modules. The inner lambda module then falls
back to its defaults (`memory_size = 256`, `timeout = 60`), so
user-supplied values are silently dropped — `tofu plan` shows no diff
and the running Lambda keeps its defaults.
The fix is a two-line addition to the `local.job_retry` map. It mirrors
the pattern `modules/runners/ssm-housekeeper.tf` already uses for
`local.ssm_housekeeper.lambda_memory_size` /
`local.ssm_housekeeper.lambda_timeout` — that Lambda correctly threads
the values through.
## Motivation
Discovered in production: I pinned `lambda_memory_size = 512` in
`multi_runner_config[*].runner_config.job_retry` after observing the
job-retry Lambdas at 87% memory utilisation (223 MB peak on the 256 MB
default), and got `No changes` from `tofu plan`. Tracing the wiring
confirmed the value never reaches the resource.
## Reproduction
```hcl
module "runners" {
source = "github-aws-runners/github-runner/aws//modules/multi-runner"
version = "7.6.0"
# …
multi_runner_config = {
"example" = {
matcherConfig = { … }
runner_config = merge(local.default_config, {
# … other config …
job_retry = {
enable = true
lambda_memory_size = 512 # ← silently ignored before this PR
lambda_timeout = 60 # ← silently ignored before this PR
}
})
}
}
}
```
After this fix, `tofu plan` shows the expected `memory_size: 256 -> 512`
change on the job-retry Lambda.
## Verification
- `tofu fmt` clean.
- The variable type definition on both `modules/runners/variables.tf`
and `modules/multi-runner/variables.tf` already declares
`lambda_memory_size = optional(number, 256)` and `lambda_timeout =
optional(number, 30)`, so no public surface changes.
- The inner `modules/runners/modules/lambda` accepts `memory_size` and
`timeout` on its `lambda` input object (with the same defaults), so when
the wiring is restored the values flow through naturally.
## No-impact when not set
Defaults remain `memory_size = 256` (per the variable declaration) and
`timeout = 30` — same as today's effective values when nothing is
overridden.
Co-authored-by: Brend Smits <brend.smits@philips.com>1 parent 94c4e12 commit 404785e
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments