terramate: [BUG][0.11.3] `panic: abspath "/opt/actions-runner/_work/a/b/c" does not start with root "/opt/actions-runner/_work/a/a"`
Describe the bug
After updating the version from 0.11.2 to 0.11.3 ,
terramate create --all-terragrunt --tags dev
command started to fail with the weird error:
panic: abspath "/opt/actions-runner/_work/a/b/c" does not start with root "/opt/actions-runner/_work/a/a"
goroutine 1 [running]:
github.com/terramate-io/terramate/project.PrjAbsPath({0xc000b0c2d0, 0x2d}, {0xc001aaf480, 0x39})
/home/runner/work/terramate/terramate/project/project.go:126 +0x1b9
github.com/terramate-io/terramate/tg.ScanModules({0xc000b0c2d0, 0x2d}, {{0xc000178aed?, 0x3c?}}, 0x1)
/home/runner/work/terramate/terramate/tg/tg_module.go:183 +0x2031
github.com/terramate-io/terramate/cmd/terramate/cli.(*cli).initTerragrunt(0xc000c9a000)
/home/runner/work/terramate/terramate/cmd/terramate/cli/cli.go:1454 +0x73
github.com/terramate-io/terramate/cmd/terramate/cli.(*cli).scanCreate(0xc000c9a000)
/home/runner/work/terramate/terramate/cmd/terramate/cli/cli.go:1447 +0x2c5
github.com/terramate-io/terramate/cmd/terramate/cli.(*cli).run(0xc000c9a000)
/home/runner/work/terramate/terramate/cmd/terramate/cli/cli.go:706 +0x4f3
github.com/terramate-io/terramate/cmd/terramate/cli.Exec({0x19ac959, 0x6}, {0xc000142010, 0x4, 0x4}, {0x200a8a0, 0xc00012c040}, {0x200a8c0, 0xc00012c048}, {0x200a8c0, ...})
/home/runner/work/terramate/terramate/cmd/terramate/cli/cli.go:388 +0xfc
main.main()
/home/runner/work/terramate/terramate/cmd/terramate/main.go:20 +0x89
I’m wondering why the root is set to /opt/actions-runner/_work/a/a (The directory a is repeated)
Expected behavior
don’t fail.
Environment (please complete the following information):
Operating System
Distribution: Ubuntu 22.04.5 LTS
Architecture: x86_64
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (10 by maintainers)
Commits related to this issue
- fix: warn if Terragrunt dependency is outside project. (#1983) ## What this PR does / why we need it: Fix panic in the case of a Terragrunt module references a dependency outside of the Terramate... — committed to terramate-io/terramate by i4ki 2 years ago
- fix: incorrect detected paths in Terragrunt modules. (#1993) ## What this PR does / why we need it: Due to an incorrect assumption in the Terragrunt module detection, the dependency paths were wr... — committed to terramate-io/terramate by i4ki 2 years ago
Hi @i4ki, we are working on the same project at the moment as coworkers.
We are not using symlinks in the project. We are just using git sources to define our terragrunt stacks terraform source.
No, we use terramate create --all-terragrunt
In the CI we are using ubuntu x86 24.04 and locally apple silicon m2
Yes, this is the error trace:
hey @LittleWat
can you check if this PR fixes the problem in your real repository? https://github.com/terramate-io/terramate/pull/1993
you can install this branch with:
Thanks for the help!