-
-
Notifications
You must be signed in to change notification settings - Fork 986
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: -detailed-exitcode
with run-all
commands
#3585
Conversation
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.
LGTM.
I think we need to have some documentation for indicating how this works. In a follow-up PR, could we add some notes to the run-all
docs indicating that when using the -detailed-exitcode
, Terragrunt will use information aggregated from all the runs to determine the final exit code, and how?
shell/detailed_exitcode.go
Outdated
) | ||
|
||
const ( | ||
DetailedExitCodeNoChanges int = iota |
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.
Unused constant 'DetailedExitCodeNoChanges'
shell/detailed_exitcode.go
Outdated
const ( | ||
DetailedExitCodeNoChanges int = iota | ||
DetailedExitCodeError | ||
DetailedExitCodeChangesPresent |
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.
Unused constant 'DetailedExitCodeChangesPresent'
grep -irn "DetailedExitCodeChangesPresent" .
./shell/detailed_exitcode.go:10: DetailedExitCodeChangesPresent
./test/integration_test.go:130:func TestDetailedExitCodeChangesPresentAll(t *testing.T) {
./test/integration_test.go:148:func TestDetailedExitCodeChangesPresentOne(t *testing.T) {
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.
Removed unused.
test/integration_test.go
Outdated
|
||
_, _, err := helpers.RunTerragruntCommandWithOutputWithContext(t, ctx, "terragrunt run-all plan --terragrunt-log-level debug --terragrunt-non-interactive -detailed-exitcode --terragrunt-working-dir "+rootPath) | ||
require.NoError(t, err) | ||
require.Equal(t, 2, exitCode.Get()) |
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.
hm, afaik, erorrs are checked with require.
, other checks are through assert.
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.
Fixed
Failed on pre-commit on fmt for terraform files
|
Sure, thanks. Could you please indicate where exactly in the documents this should be mentioned? Here? |
Fixed |
Ya. I'll write it up, though. Don't worry about it. I'm seeing that this can also be worded better:
|
Description
Fixes #1470.
For the case where a run-all is done with
-detailed-exitcode
flag, Terragrunt uses the following logic to return the appropriate exit code:TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added / Removed / Updated [X].
Migration Guide