-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
feat: support merging the "skip" attribute from included files. #3225
Conversation
Signed-off-by: Rodrigo Fior Kuntzer <[email protected]>
|
Integration test
|
The `skip` flag must be set explicitly in terragrunt modules that should be skipped. If you set `skip = true` in a | ||
`terragrunt.hcl` file that is included by another `terragrunt.hcl` file, only the `terragrunt.hcl` file that explicitly | ||
set `skip = true` will be skipped. | ||
The `skip` flag can be inherited from an included `terragrunt.hcl` file if `skip` is defined there, unless it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think may be helpful to add an integration test for this case, when the skip flag is inherited from include
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestion @denis256 , I've updated the TestApplyAllSkipTrue
integration test to cover this scenario as well, it was already using an partial terragrunt file there with a skip = true
defined, so now one of the child modules is inheriting the skip
and the other is overwriting it.
…handle the case where skip is inherited from the included terragrunt file Signed-off-by: Rodrigo Fior Kuntzer <[email protected]>
Thanks for publishing the failed tests here @denis256 and sorry for not catching them initially, I've fixed them. |
Hi @denis256 , could you please share the reason why the |
Hi, 🍎 🪱 |
Hey @rodrigorfk , Do you mind rebasing this PR? I'd like to avoid having it go stale. |
# Conflicts: # config/config_test.go # config/dependency.go # config/include.go # config/include_test.go # configstack/module_test.go # test/integration_test.go
done @yhakbar, the latest changes from master were merged into this branch. |
Hey @rodrigorfk , The PR is failing CI checks. Did you run checks locally? You should be able to run We're working on making it easier to run tests locally. I know it's not as straightforward as it could be. If you could make sure to execute the tests that you're modifying though, that will speed up the process on this review. |
Signed-off-by: Rodrigo Fior Kuntzer <[email protected]>
Quality Gate passedIssues Measures |
Hey @yhakbar, Sorry for the issue, forgot to check it locally after the merge, mostly because as you said, it is pretty hard to run all the test suite locally, but anyway, it shouldn't be an excuse for not running focused ones, I've fixed it and I hope it works now. |
Looks like some tests are still failing: |
Sorry we haven't been able to get this PR merged, @rodrigorfk . To avoid having it stay stale, would you mind resolving conflicts, then ensure that the tests @denis256 mentioned pass locally? |
This pull request is still stale. I'm going to close it out. If you would like to open it again, please make sure to rebase, lint and test locally, then request re-review. |
# Conflicts: # config/include.go
Signed-off-by: Rodrigo Fior Kuntzer <[email protected]>
Hi @yhakbar, sorry for missing your request for rebase and failed tests before, I have done it right now and the branch was updated, do you mind re-opening the PR? or shall I create a new one? Thanks in advance. |
this feature is introducing a major breaking change for all existing setup, if the parent file has a |
It is a breaking change, and was called out in the release notes. Why does the included configuration define a |
We use a parent/child structure for our terragrunt config so we can centralize a lot of the shared logic in the parent file and then include it in all the child files. Each child file correspond to an actual infrastructure module, whereas the parent file is just there to be included and isn't tied to any infra code. Once I saw terragrunt was skipping all the work I looked at the most recent releases and noticed the changelog but the issue here is terragrunt version doesn't use the major flag of semver, only minor and patch. So as soon as 0.68.0 was released our CICD pipelines pulled down the latest version and our pipelines broke :( We're updating our version locks to |
Description
Fixes #3224.
This PR is introducing support for merging the content of the
skip
attribute frominclude
blocks, in the same way of many other attributes and blocks are already being merged.TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].