Skip to content
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

fix(autoplan): modules for per-repo configs #3272

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

jukie
Copy link
Contributor

@jukie jukie commented Mar 28, 2023

what

  • Moves FindModuleProjects outside of conditional which was only being run if per-repo config wasn't present
  • Updates DetermineProjectsViaConfig to consume dependent module info
  • Fixes a bug in findModuleDependants where only parent dirs one level up would be matched.
    • e.g. project at /some/terraform/project/path and module at /modules/path/ wouldn't work as intended

why

Autoplanning on dependent modules when using per-repo configs

tests

Tested with a docker image build and self-hosted Gitlab

references

@jukie jukie requested a review from a team as a code owner March 28, 2023 05:29
@github-actions github-actions bot added dependencies PRs that update a dependency file go Pull requests that update Go code labels Mar 28, 2023
@jukie jukie changed the title Fix autoplan modules for per-repo configs Fix: autoplan modules for per-repo configs Mar 29, 2023
@jukie
Copy link
Contributor Author

jukie commented Mar 31, 2023

@nitrocode if you could check this on out please

go.mod Outdated Show resolved Hide resolved
@nitrocode nitrocode changed the title Fix: autoplan modules for per-repo configs fix(autoplan): modules for per-repo configs Mar 31, 2023
go.mod Outdated Show resolved Hide resolved
@jukie jukie force-pushed the jukie/fix-autoplan-modules branch from e430fbe to bc26fb3 Compare April 1, 2023 15:53
@github-actions github-actions bot removed the dependencies PRs that update a dependency file label Apr 1, 2023
@jukie jukie requested a review from nitrocode April 1, 2023 16:45
@nitrocode nitrocode added this to the v0.23.4 milestone Apr 3, 2023
@nitrocode nitrocode merged commit 089dc1a into runatlantis:main Apr 3, 2023
@nitrocode
Copy link
Member

Thanks again @jukie ! Please feel free to continue fixing stuff. It's very much appreciated!

@wyardley
Copy link
Contributor

wyardley commented Apr 3, 2023

Thanks @jukie!

@bobziuchkovski
Copy link

@nitrocode Any chance I could talk you into cutting a new Atlantis release with these changes? We'd absolutely love to enable the module autoplanning on our Atlantis instance using per-repo config.

@jukie jukie deleted the jukie/fix-autoplan-modules branch April 4, 2023 05:12
@nitrocode
Copy link
Member

@bobziuchkovski we plan to release 0.23.4 soon. For now, could you use the dev tagged release until the new release?

@wyardley
Copy link
Contributor

wyardley commented Apr 13, 2023

@jukie just wanted to say thanks for this! We needed this, and didn't get around to trying to fix it here.

We just rolled it out after the recent release, and can confirm that it seems to work perfectly as expected so far! Really simplifies our config and reduces the need to explicitly declare module dependencies.

ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* Fix autoplan modules for per-repo configs

* Use utils package for slices.Contains
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* Fix autoplan modules for per-repo configs

* Use utils package for slices.Contains
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autoplan modules functionality not working with per-repo config
5 participants