hello :wave: did terraform backend stop supporting...
# general
b
hello 👋 did terraform backend stop supporting the check goal in 2.18.0 or is it just me? In 2.17.0 it was running and failing due to an issue, in 2.18.0 it does not run at all.
b
Sorry for the trouble, can you create a reduced example that demonstrates what you mean?
b
certainly in this repo, the following work as expected
Copy code
pants fmt ::
22:25:35.90 [INFO] Completed: pants.backend.terraform.lint.tffmt.tffmt.tffmt_fmt - terraform-fmt made no changes.
Copy code
pants lint ::
22:25:42.99 [INFO] Completed: pants.backend.terraform.lint.tffmt.tffmt.tffmt_fmt - terraform-fmt made no changes.
On the other hand,
pants check ::
exits without any log (exit code is 0). Adding debug logs has no effect. If I run the same using v2.17.0, I'm getting the correct output as well
Copy code
pants check ::
Bootstrapping Pants 2.17.0
Installing pantsbuild.pants==2.17.0 into a virtual environment at /home/dimitris/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.17.0
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 14.4 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 1.4 MB/s eta 0:00:00
New virtual environment successfully created at /home/dimitris/.cache/nce/3d6643e46b53e4cc0b2a0d5c768866226ddce3de1f57f80c4a02d8d39800fa8e/bindings/venvs/2.17.0.
22:28:15.32 [INFO] waiting for pantsd to start...
22:28:17.23 [INFO] pantsd started
22:28:17.32 [INFO] Initializing scheduler...
22:28:17.59 [INFO] Scheduler initialized.
22:28:17.84 [INFO] Completed: pants.backend.terraform.goals.check.terraform_check - terraform-validate succeeded.
Success! The configuration is valid.
b
Thanks! can you file an issue?
b
will do 🙏
on the same topic: I made some progress with the help of @careful-address-89803, thank you for that. I think there might be another issue regarding transitive dependencies. Specifically, if a (non-root) module has dependencies, these are not copied over to the sandbox when check is run against the root module, unless explicitly declared in the root module's deployment. I updated my example to illustrate this; the root module uses the test module, the latter is declared in the dependencies. I need to explicitly add the test module's dependencies for the validation to succeed, leaving them out will cause an error as the test module's file cannot be found. Is that expected behavior or should I create another issue?
c
transitive deps not being included is definitely a bug