You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Making an issue for tracking purposes, but I'm also starting on this right now.
Problem
When running automated tests in CI, the test job fails. The error message says that +90% of the tests could not succeed because of Terraform is missing from $PATH.
Error:
at <anonymous> (/home/runner/work/modules/modules/test.ts:206:16)
at runTerraformApply (/home/runner/work/modules/modules/test.ts:1[9](https://github.com/coder/modules/actions/runs/12982917241/job/36206463110?pr=388#step:6:10)5:3)
at <anonymous> (/home/runner/work/modules/modules/test.ts:158:11)
at <anonymous> (/home/runner/work/modules/modules/test.ts:157:28)
201 | const combinedEnv = env === undefined ? {} : { ...env };
202 | for (const [key, value] of Object.entries(vars)) {
203 | combinedEnv[`TF_VAR_${key}`] = String(value);
204 | }
205 |
206 | const proc = spawn(
^
error: Executable not found in $PATH: "terraform"
path: "terraform",
code: "ENOENT"
at <anonymous> (/home/runner/work/modules/modules/test.ts:206:16)
at runTerraformApply (/home/runner/work/modules/modules/test.ts:195:3)
at <anonymous> (/home/runner/work/modules/modules/test.ts:158:[11](https://github.com/coder/modules/actions/runs/12982917241/job/36206463110?pr=388#step:6:12))
at <anonymous> (/home/runner/work/modules/modules/test.ts:157:28)
(fail) git-clone > required variables [1.00ms]
Error: Expected to contain: "input variable \"agent_id\" is not set"
The above is basically repeated across all the tests that rely on spawn and Terraform
3 pass
146 fail
41 expect() calls
Ran 149 tests across 28 files. [14.22s]
Looking at the job history, it seems like CI only really started to break in the past three weeks. I'm going to see if there was some kind of change that might've broken things
The text was updated successfully, but these errors were encountered:
It looks like bun updated how the environment gets propagated through a spawn call: https://github.com/oven-sh/bun/pull/16067, might be why we're no longer seeing Terraform in the path.
Making an issue for tracking purposes, but I'm also starting on this right now.
Problem
When running automated tests in CI, the
test
job fails. The error message says that +90% of the tests could not succeed because of Terraform is missing from$PATH
.The above is basically repeated across all the tests that rely on
spawn
and TerraformLinks
Notes
The text was updated successfully, but these errors were encountered: