-
-
Notifications
You must be signed in to change notification settings - Fork 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
Provide ability to disable backend init so that validate-all can be run without a backend #761
Provide ability to disable backend init so that validate-all can be run without a backend #761
Conversation
config/config.go
Outdated
@@ -520,10 +521,15 @@ func convertToTerragruntConfig(terragruntConfigFromFile *terragruntConfigFile, c | |||
} | |||
|
|||
remoteState := &remote.RemoteState{} | |||
remoteState.FillDefaults() |
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.
It appeared to me that FillDefaults
should probably be called before setting any attributes? It was unused so was not fully sure of it's intention, I moved it up to execute earlier so that I could default Enabled to true when not present in config.
that the backend will not be initialized and -backend=false will be passed to the terraform init command.
f65fba3
to
6cd8793
Compare
I changed my original approach and moved from adding an attribute on remote_state and moving it up to the backend itself but am finding there is some test pain going around and setting I will hold off doing that for now incase this approach is not how we want to tackle this issue. |
I am a little confused by what is supposed to happen when If so, I might rename the Would love a second opinion from one of the codeowners though: @autero1 @brikis98 @eak12913 |
Agreed @yorinasub17 on second glance myself I can see the confusion and agree that |
@yorinasub17 I went ahead and moved to |
Sorry for the radio silence here, got pulled away to other things. Did a quick review of the new things and it looks good except for the Going to kick off the build now since that doesn't depend on that binary. |
Oops @yorinasub17 the binary has been removed! |
You might want to rebase/amend the commit that added the binary, instead. Or a maintainer can squash/rebase when merging. Otherwise the binary will end up in the repo commit history anyway... |
@lorengordon Yup will squash when merging. The only reason why I wanted the additional commit was so that I can see the build status show up on 61f5345 . Otherwise, the commit squashing will create a new history and I will have to dig up the build status. Looks like the build passed, so going to go ahead and merge + release this. Thanks for the contribution! |
Woops looks like there was a merge conflict that git failed to detect, due to the change in signature. Fixing it now... |
I hope I did not mess you up @yorinasub17, I must have pushed my rebase just as you clicked merge on your side. |
Sorry! I was trying to help keep the repo clean of binaries, but apparently you had it under control and I just made the merge more complicated! 🤦 |
No worries! The merge conflict wasn't actually because of the squashing or anything, but rather because of feature conflicts (the GCS initializer feature wasn't updated to match the new function signatures introduced here). These are harder to catch because they don't show up as conflicts in git. I have a branch that fixes it here: #769 |
Thanks @yorinasub17 my bad there I should have picked up on this too. |
Should not readme.md be updated? I do not see |
Good idea @cpxPratik I will add it to my list of things to tackle this week. |
Good suggestion @cpxPratik ! That would be great if you can handle that @stefansedich . Looking forward to the PR! |
As an attempt to solve #597 and #732 this change provides the abilty to disable a backend using something like this, I set DISABLE_BACKEND in my CI process when running validate-all.
@yorinasub17 I ran with your idea but ended up in a slightly different direction, would appreicate some feedback on if this is close to what we want or if I should consider another solution as I would love to get this working so I can add an validate-all step to our CI process that does not require a backend.