-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoplan modules functionality not working with per-repo config #3122
Comments
Thanks for creating this issue - this mirrors / confirms what we're seeing as well -- we've been tearing our hair out to figure out why it didn't work. note: we also explicitly set |
FWIW, the only reason this isn't supported is because I didn't have a per-repo atlantis.yml setup to dev and test on. I don't know of any reason it shouldn't be possible. |
Ah that makes sense. For now, I suppose we'll have to document the limitation. If anyone feels like contributing this change, it could be as simple as duplicating this block or encapsulating this block into a function and executing the call in both the "if" and "else" conditions (or before the if/else block). It will probably require changes to This block atlantis/server/events/project_command_builder.go Lines 388 to 394 in 892a43b
Is in the atlantis/server/events/project_command_builder.go Lines 354 to 380 in 892a43b
so if there are more than zero projects defined, the |
Since this is closed, shouldn't we revert the doc changes from #3166? |
I'm running into this issue again in version 0.26.0 #3897 |
I've also noticed that autoplan-modules doesn't work when skip-clone-no-changes is set (it can decide there's no changes because it doesn't take the modules stuff into account). |
Community Note
Overview of the Issue
We're running Atlantis v0.22.3 with:
ATLANTIS_AUTOPLAN_MODULES=true
Unfortunately, when we make changes to any of the local modules, the projects in repo atlantis.yml that are dependent on those modules don't register as updated/autoplanned.
We traced the code that invokes
FindModuleProjects
inserver/events/project_command_builder.go
and it looks like this is part of a conditional that is only executed when per-repo config is not present. We couldn't find any other calls to the dependent module resolution.Is this expected, or is there a way to enable the dependent module auto-planning for per-repo config projects/stacks?
Reproduction Steps
terraform/app
as a project, whereterraform/app
depends on../modules/ecs
as a module.terraform/modules/ecs/ecs.tf
Environment details
Repo
atlantis.yaml
file:Additional Context
We're using the per-repo atlantis.yml config in order to skip planning for the
default
workspace when other workspaces exist. In cases where only the default workspace exists, we use it.We'd love to avoid using the per-repo config if it'd be possible to replicate that behavior without it. Particularly if it means missing-out on functionality like module autoplanning.
The text was updated successfully, but these errors were encountered: