https://www.runatlantis.io/ logo
Title
o

oponomarov-tu

03/15/2023, 1:13 PM
Hey guys, has anyone faced an issue like this with Atlantis?
│ Error: <http://registry.terraform.io/hashicorp/aws|registry.terraform.io/hashicorp/aws>: the cached package for <http://registry.terraform.io/hashicorp/aws|registry.terraform.io/hashicorp/aws> 4.58.0 (in .terraform/providers) does not match any of the checksums recorded in the dependency lock file
Our repo does not contain committed
.terraform.lock.hcl
files
Stacktrace:
<http://github.com/runatlantis/atlantis/server/events.RunAndEmitStats|github.com/runatlantis/atlantis/server/events.RunAndEmitStats>
	<http://github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:77|github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:77>
<http://github.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).Plan|github.com/runatlantis/atlantis/server/events.(*InstrumentedProjectCommandRunner).Plan>
	<http://github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:38|github.com/runatlantis/atlantis/server/events/instrumented_project_command_runner.go:38>
<http://github.com/runatlantis/atlantis/server/events.runProjectCmds|github.com/runatlantis/atlantis/server/events.runProjectCmds>
	<http://github.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:48|github.com/runatlantis/atlantis/server/events/project_command_pool_executor.go:48>
<http://github.com/runatlantis/atlantis/server/events.(*PlanCommandRunner).runAutoplan|github.com/runatlantis/atlantis/server/events.(*PlanCommandRunner).runAutoplan>
	<http://github.com/runatlantis/atlantis/server/events/plan_command_runner.go:135|github.com/runatlantis/atlantis/server/events/plan_command_runner.go:135>
<http://github.com/runatlantis/atlantis/server/events.(*PlanCommandRunner).Run|github.com/runatlantis/atlantis/server/events.(*PlanCommandRunner).Run>
	<http://github.com/runatlantis/atlantis/server/events/plan_command_runner.go:288|github.com/runatlantis/atlantis/server/events/plan_command_runner.go:288>
<http://github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunAutoplanCommand|github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunAutoplanCommand>
	<http://github.com/runatlantis/atlantis/server/events/command_runner.go:174|github.com/runatlantis/atlantis/server/events/command_runner.go:174>
sometimes it works, sometimes it does not, not sure what's causing this
all right, i guess it's the same issue: https://github.com/runatlantis/atlantis/issues/2412
w

wby

03/15/2023, 2:15 PM
Yeah, do you have parallel plan enabled?
o

oponomarov-tu

03/15/2023, 2:16 PM
yup, i've ended up setting
TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE=true
; will see if it helps
w

wby

03/15/2023, 3:14 PM
@oponomarov-tu not the same issue
the env var you mentioned will help with situations where all of the following are true • the plugin cache is used • terraform version is >= 1.4.0 • lockfile is not checked in
o

oponomarov-tu

03/15/2023, 3:16 PM
yeah, all of these are true for my case
w

wby

03/15/2023, 3:16 PM
right, but it shouldn’t help with the parallel plan issue, and I think the error you’ll see will be a different one if you’re running into that one.
that said, the parallel plan issue should be pretty predictable, after the first run with a new version being updated (when the cache gets populated), it shouldn’t happen