Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package terragrunt for openSUSE:Factory checked in at 2023-05-19 11:55:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/terragrunt (Old) and /work/SRC/openSUSE:Factory/.terragrunt.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "terragrunt" Fri May 19 11:55:52 2023 rev:46 rq:1087870 version:0.45.14 Changes: -------- --- /work/SRC/openSUSE:Factory/terragrunt/terragrunt.changes 2023-05-18 15:19:39.881979001 +0200 +++ /work/SRC/openSUSE:Factory/.terragrunt.new.1533/terragrunt.changes 2023-05-19 11:56:23.779563398 +0200 @@ -1,0 +2,6 @@ +Fri May 19 04:57:29 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.45.14: + * #2566 Update error message to include module directory (#2574) + +------------------------------------------------------------------- Old: ---- terragrunt-0.45.13.obscpio New: ---- terragrunt-0.45.14.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ terragrunt.spec ++++++ --- /var/tmp/diff_new_pack.W02hzY/_old 2023-05-19 11:56:24.723568795 +0200 +++ /var/tmp/diff_new_pack.W02hzY/_new 2023-05-19 11:56:24.727568817 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: terragrunt -Version: 0.45.13 +Version: 0.45.14 Release: 0 Summary: Thin wrapper for Terraform for working with multiple Terraform modules License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.W02hzY/_old 2023-05-19 11:56:24.779569115 +0200 +++ /var/tmp/diff_new_pack.W02hzY/_new 2023-05-19 11:56:24.783569137 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/gruntwork-io/terragrunt</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.45.13</param> + <param name="revision">v0.45.14</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.W02hzY/_old 2023-05-19 11:56:24.807569275 +0200 +++ /var/tmp/diff_new_pack.W02hzY/_new 2023-05-19 11:56:24.811569298 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/gruntwork-io/terragrunt</param> - <param name="changesrevision">9015f781c2ffae79d8bace26e45ca20b86b99bbb</param></service></servicedata> + <param name="changesrevision">2f4ca34f74fe25ba7df16127b076fabb62499d79</param></service></servicedata> (No newline at EOF) ++++++ terragrunt-0.45.13.obscpio -> terragrunt-0.45.14.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/shell/run_shell_cmd.go new/terragrunt-0.45.14/shell/run_shell_cmd.go --- old/terragrunt-0.45.13/shell/run_shell_cmd.go 2023-05-17 18:49:48.000000000 +0200 +++ new/terragrunt-0.45.14/shell/run_shell_cmd.go 2023-05-18 19:00:44.000000000 +0200 @@ -137,9 +137,10 @@ if err != nil { err = ProcessExecutionError{ - Err: err, - StdOut: stdoutBuf.String(), - Stderr: stderrBuf.String(), + Err: err, + StdOut: stdoutBuf.String(), + Stderr: stderrBuf.String(), + WorkingDir: cmd.Dir, } } @@ -257,13 +258,15 @@ // ProcessExecutionError - error returned when a command fails, contains StdOut and StdErr type ProcessExecutionError struct { - Err error - StdOut string - Stderr string + Err error + StdOut string + Stderr string + WorkingDir string } func (err ProcessExecutionError) Error() string { - return err.Err.Error() + // Include in error message the working directory where the command was run, so it's easier for the user to + return fmt.Sprintf("[%s] %s", err.WorkingDir, err.Err.Error()) } func (err ProcessExecutionError) ExitStatus() (int, error) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/shell/run_shell_cmd_unix_test.go new/terragrunt-0.45.14/shell/run_shell_cmd_unix_test.go --- old/terragrunt-0.45.13/shell/run_shell_cmd_unix_test.go 2023-05-17 18:49:48.000000000 +0200 +++ new/terragrunt-0.45.14/shell/run_shell_cmd_unix_test.go 2023-05-18 19:00:44.000000000 +0200 @@ -140,6 +140,6 @@ syscall.Kill(os.Getpid(), syscall.SIGINT) }) - expectedErr := fmt.Sprintf("exit status %d", expectedWait) + expectedErr := fmt.Sprintf("[.] exit status %d", expectedWait) assert.EqualError(t, <-errCh, expectedErr) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/shell/run_shell_cmd_windows_test.go new/terragrunt-0.45.14/shell/run_shell_cmd_windows_test.go --- old/terragrunt-0.45.13/shell/run_shell_cmd_windows_test.go 2023-05-17 18:49:48.000000000 +0200 +++ new/terragrunt-0.45.14/shell/run_shell_cmd_windows_test.go 2023-05-18 19:00:44.000000000 +0200 @@ -99,6 +99,6 @@ process.Signal(os.Kill) }) - expectedErr := fmt.Sprintf("exit status %d", expectedWait) + expectedErr := fmt.Sprintf("[.] exit status %d", expectedWait) assert.EqualError(t, <-errCh, expectedErr) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/test/fixture-module-path-in-error/app/terragrunt.hcl new/terragrunt-0.45.14/test/fixture-module-path-in-error/app/terragrunt.hcl --- old/terragrunt-0.45.13/test/fixture-module-path-in-error/app/terragrunt.hcl 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.45.14/test/fixture-module-path-in-error/app/terragrunt.hcl 2023-05-18 19:00:44.000000000 +0200 @@ -0,0 +1,8 @@ +dependency "d1" { + config_path = "../d1" + + mock_outputs = { + d1 = "d1-value" + } +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/test/fixture-module-path-in-error/d1/terragrunt.hcl new/terragrunt-0.45.14/test/fixture-module-path-in-error/d1/terragrunt.hcl --- old/terragrunt-0.45.13/test/fixture-module-path-in-error/d1/terragrunt.hcl 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.45.14/test/fixture-module-path-in-error/d1/terragrunt.hcl 2023-05-18 19:00:44.000000000 +0200 @@ -0,0 +1,3 @@ +include "common" { + path = find_in_parent_folders() +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/test/fixture-module-path-in-error/terragrunt.hcl new/terragrunt-0.45.14/test/fixture-module-path-in-error/terragrunt.hcl --- old/terragrunt-0.45.13/test/fixture-module-path-in-error/terragrunt.hcl 1970-01-01 01:00:00.000000000 +0100 +++ new/terragrunt-0.45.14/test/fixture-module-path-in-error/terragrunt.hcl 2023-05-18 19:00:44.000000000 +0200 @@ -0,0 +1,21 @@ +generate "provider" { + path = "provider.tf" + if_exists = "overwrite" + contents = <<EOF + +provider "aws" { + region = "ca-central-1" +} + +terraform { + backend "s3" { + encrypt = true + bucket = "test-bucket-666" + dynamodb_table = "test-666" + region = "ca-central-1" + key = "terraform.tfstate" + } +} + +EOF +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.13/test/integration_test.go new/terragrunt-0.45.14/test/integration_test.go --- old/terragrunt-0.45.13/test/integration_test.go 2023-05-17 18:49:48.000000000 +0200 +++ new/terragrunt-0.45.14/test/integration_test.go 2023-05-18 19:00:44.000000000 +0200 @@ -144,6 +144,7 @@ TEST_FIXTURE_TFLINT_NO_TF_SOURCE_PATH = "fixture-tflint/no-tf-source" TEST_FIXTURE_PARALLEL_RUN = "fixture-parallel-run" TEST_FIXTURE_INIT_ERROR = "fixture-init-error" + TEST_FIXTURE_MODULE_PATH_ERROR = "fixture-module-path-in-error" TERRAFORM_BINARY = "terraform" TERRAFORM_FOLDER = ".terraform" TERRAFORM_STATE = "terraform.tfstate" @@ -5368,6 +5369,34 @@ assert.Contains(t, explanation, "Check your credentials and permissions") } +func TestModulePathInPlanErrorMessage(t *testing.T) { + t.Parallel() + + tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_MODULE_PATH_ERROR) + rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_MODULE_PATH_ERROR, "app") + + stdout := bytes.Buffer{} + stderr := bytes.Buffer{} + + err := runTerragruntCommand(t, fmt.Sprintf("terragrunt plan -no-color --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr) + assert.Error(t, err) + assert.Contains(t, err.Error(), fmt.Sprintf("[%s] exit status 1", util.JoinPath(tmpEnvPath, TEST_FIXTURE_MODULE_PATH_ERROR, "d1"))) +} + +func TestModulePathInRunAllPlanErrorMessage(t *testing.T) { + t.Parallel() + + tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_MODULE_PATH_ERROR) + rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_MODULE_PATH_ERROR) + + stdout := bytes.Buffer{} + stderr := bytes.Buffer{} + + err := runTerragruntCommand(t, fmt.Sprintf("terragrunt run-all plan -no-color --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr) + assert.Error(t, err) + assert.Contains(t, err.Error(), fmt.Sprintf("[%s] exit status 1", util.JoinPath(tmpEnvPath, TEST_FIXTURE_MODULE_PATH_ERROR, "d1"))) +} + func validateOutput(t *testing.T, outputs map[string]TerraformOutput, key string, value interface{}) { t.Helper() output, hasPlatform := outputs[key] ++++++ terragrunt.obsinfo ++++++ --- /var/tmp/diff_new_pack.W02hzY/_old 2023-05-19 11:56:25.631573986 +0200 +++ /var/tmp/diff_new_pack.W02hzY/_new 2023-05-19 11:56:25.635574009 +0200 @@ -1,5 +1,5 @@ name: terragrunt -version: 0.45.13 -mtime: 1684342188 -commit: 9015f781c2ffae79d8bace26e45ca20b86b99bbb +version: 0.45.14 +mtime: 1684429244 +commit: 2f4ca34f74fe25ba7df16127b076fabb62499d79 ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/terragrunt/vendor.tar.gz /work/SRC/openSUSE:Factory/.terragrunt.new.1533/vendor.tar.gz differ: char 5, line 1