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

Handle empty args for get_terraform_cli_args function #1215

Merged

Conversation

camlow325
Copy link
Contributor

@camlow325 camlow325 commented Jun 8, 2020

Closes #1214

When the get_terraform_cli_args() function is called and the list of CLI args is empty, the function previously caused Terragrunt to crash. With the change in this MR, the function would now just return an empty list to the caller when the list of CLI args is empty.

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. However, before merging, it would be nice to have a regression test that reproduces the error and verifies it works. If you need ideas on how to implement one, check out the TestResolveTerragruntInterpolation unit test.

@camlow325 camlow325 force-pushed the handle-empty-terraform-cli-args branch from 6c89537 to 0d0f9ee Compare June 9, 2020 17:15
@camlow325
Copy link
Contributor Author

Thanks for the review and comments, @yorinasub17. I added a unit test for the fix. Locally, the new test fails with the "must not call ListVal with empty" error without the fix and passes with the fix. Please let me know if you see anything else that you would like for me to update for this. Thanks again!

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a test! LGTM! Will kick off a build and if it passes we can merge this in.

@yorinasub17
Copy link
Contributor

Build passed, so will go ahead and merge + release this. Thanks again for your contribution!

@yorinasub17 yorinasub17 merged commit 0281f29 into gruntwork-io:master Jun 11, 2020
@yorinasub17
Copy link
Contributor

Released as https://github.com/gruntwork-io/terragrunt/releases/tag/v0.23.25 . Binaries will show up shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terragrunt_cli_args call crashes terragrunt for *-all commands
2 participants