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-09 13:08:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/terragrunt (Old) and /work/SRC/openSUSE:Factory/.terragrunt.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "terragrunt" Tue May 9 13:08:50 2023 rev:43 rq:1085615 version:0.45.10 Changes: -------- --- /work/SRC/openSUSE:Factory/terragrunt/terragrunt.changes 2023-05-05 15:59:36.684884806 +0200 +++ /work/SRC/openSUSE:Factory/.terragrunt.new.1533/terragrunt.changes 2023-05-09 13:08:55.949590459 +0200 @@ -1,0 +2,6 @@ +Tue May 09 05:41:30 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.45.10: + * fix: avoid double-rendering `terraform init` output (#2558) + +------------------------------------------------------------------- Old: ---- terragrunt-0.45.9.obscpio New: ---- terragrunt-0.45.10.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ terragrunt.spec ++++++ --- /var/tmp/diff_new_pack.GjHB7z/_old 2023-05-09 13:08:57.209597958 +0200 +++ /var/tmp/diff_new_pack.GjHB7z/_new 2023-05-09 13:08:57.213597982 +0200 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: terragrunt -Version: 0.45.9 +Version: 0.45.10 Release: 0 Summary: Thin wrapper for Terraform for working with multiple Terraform modules License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.GjHB7z/_old 2023-05-09 13:08:57.257598244 +0200 +++ /var/tmp/diff_new_pack.GjHB7z/_new 2023-05-09 13:08:57.261598268 +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.9</param> + <param name="revision">v0.45.10</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.GjHB7z/_old 2023-05-09 13:08:57.289598435 +0200 +++ /var/tmp/diff_new_pack.GjHB7z/_new 2023-05-09 13:08:57.293598458 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/gruntwork-io/terragrunt</param> - <param name="changesrevision">0652685815e3a319a1c4e54d5b7bf10e52c44f8c</param></service></servicedata> + <param name="changesrevision">be4aac786bf155e57e22f7ae3ce5a631c52b1708</param></service></servicedata> (No newline at EOF) ++++++ terragrunt-0.45.9.obscpio -> terragrunt-0.45.10.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.9/cli/cli_app.go new/terragrunt-0.45.10/cli/cli_app.go --- old/terragrunt-0.45.9/cli/cli_app.go 2023-05-05 12:00:09.000000000 +0200 +++ new/terragrunt-0.45.10/cli/cli_app.go 2023-05-08 19:34:38.000000000 +0200 @@ -12,6 +12,7 @@ "github.com/gruntwork-io/terragrunt/tflint" + "github.com/gruntwork-io/gruntwork-cli/collections" "github.com/hashicorp/go-multierror" "github.com/mattn/go-zglob" "github.com/sirupsen/logrus" @@ -105,17 +106,21 @@ optTerragruntModulesThatInclude, } -const CMD_INIT = "init" -const CMD_INIT_FROM_MODULE = "init-from-module" -const CMD_PROVIDERS = "providers" -const CMD_LOCK = "lock" -const CMD_TERRAGRUNT_INFO = "terragrunt-info" -const CMD_TERRAGRUNT_VALIDATE_INPUTS = "validate-inputs" -const CMD_TERRAGRUNT_GRAPH_DEPENDENCIES = "graph-dependencies" -const CMD_TERRAGRUNT_READ_CONFIG = "terragrunt-read-config" -const CMD_HCLFMT = "hclfmt" -const CMD_AWS_PROVIDER_PATCH = "aws-provider-patch" -const CMD_RENDER_JSON = "render-json" +const ( + CMD_INIT = "init" + CMD_INIT_FROM_MODULE = "init-from-module" + CMD_PLAN = "plan" + CMD_APPLY = "apply" + CMD_PROVIDERS = "providers" + CMD_LOCK = "lock" + CMD_TERRAGRUNT_INFO = "terragrunt-info" + CMD_TERRAGRUNT_VALIDATE_INPUTS = "validate-inputs" + CMD_TERRAGRUNT_GRAPH_DEPENDENCIES = "graph-dependencies" + CMD_TERRAGRUNT_READ_CONFIG = "terragrunt-read-config" + CMD_HCLFMT = "hclfmt" + CMD_AWS_PROVIDER_PATCH = "aws-provider-patch" + CMD_RENDER_JSON = "render-json" +) // START: Constants useful for multimodule command handling const CMD_RUN_ALL = "run-all" @@ -1100,7 +1105,7 @@ // // If terraformSource is specified, then arguments to download the terraform source will be appended to the init command. // -// This method will return an error and NOT run terraform init if the user has disabled Auto-Init +// This method will return an error and NOT run terraform init if the user has disabled Auto-Init. // // This method takes in the "original" terragrunt options which has the unmodified 'WorkingDir' from before downloading the code from the source URL, // and the "updated" terragrunt options that will contain the updated 'WorkingDir' into which the code has been downloaded @@ -1137,8 +1142,12 @@ initOptions.WorkingDir = terragruntOptions.WorkingDir initOptions.TerraformCommand = CMD_INIT - // Don't pollute stdout with the stdout from Auto Init - initOptions.Writer = initOptions.ErrWriter + initOutputForCommands := []string{CMD_PLAN, CMD_APPLY} + terraformCommand := util.FirstArg(terragruntOptions.TerraformCliArgs) + if !collections.ListContainsElement(initOutputForCommands, terraformCommand) { + // Since some command can return a json string, it is necessary to suppress output to stdout of the `terraform init` command. + initOptions.Writer = io.Discard + } return initOptions, nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.45.9/test/integration_test.go new/terragrunt-0.45.10/test/integration_test.go --- old/terragrunt-0.45.9/test/integration_test.go 2023-05-05 12:00:09.000000000 +0200 +++ new/terragrunt-0.45.10/test/integration_test.go 2023-05-08 19:34:38.000000000 +0200 @@ -3050,27 +3050,15 @@ ) err := runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr) - erroutput := stderr.String() - - if err != nil { - t.Errorf("Did not expect to get an error: %s", err.Error()) - } - - assert.Contains(t, erroutput, "Initializing provider plugins") - - var ( - stdout2 bytes.Buffer - stderr2 bytes.Buffer - ) - - err = runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout2, &stderr2) - erroutput2 := stderr2.String() + require.NoError(t, err) + assert.Contains(t, stdout.String(), "Initializing provider plugins") - if err != nil { - t.Errorf("Did not expect to get an error: %s", err.Error()) - } + stdout = bytes.Buffer{} + stderr = bytes.Buffer{} - assert.NotContains(t, erroutput2, "Initializing provider plugins") + err = runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", rootPath), &stdout, &stderr) + require.NoError(t, err) + assert.NotContains(t, stdout.String(), "Initializing provider plugins") } func TestReadTerragruntConfigWithDependency(t *testing.T) { @@ -4637,8 +4625,7 @@ err := runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", testPath), &stdout, &stderr) require.NoError(t, err) // providers initialization during first plan - errout := string(stderr.Bytes()) - assert.Equal(t, 1, strings.Count(errout, "Terraform has been successfully initialized!")) + assert.Equal(t, 1, strings.Count(stdout.String(), "Terraform has been successfully initialized!")) stdout = bytes.Buffer{} stderr = bytes.Buffer{} @@ -4647,8 +4634,7 @@ require.NoError(t, err) // no initialization expected for second plan run // https://github.com/gruntwork-io/terragrunt/issues/1921 - errout = string(stderr.Bytes()) - assert.Equal(t, 0, strings.Count(errout, "Terraform has been successfully initialized!")) + assert.Equal(t, 0, strings.Count(stdout.String(), "Terraform has been successfully initialized!")) } func TestAutoInitWhenSourceIsChanged(t *testing.T) { @@ -4672,8 +4658,7 @@ err = runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", testPath), &stdout, &stderr) require.NoError(t, err) // providers initialization during first plan - errout := string(stderr.Bytes()) - assert.Equal(t, 1, strings.Count(errout, "Terraform has been successfully initialized!")) + assert.Equal(t, 1, strings.Count(stdout.String(), "Terraform has been successfully initialized!")) updatedHcl = strings.Replace(contents, "__TAG_VALUE__", "v0.35.2", -1) require.NoError(t, ioutil.WriteFile(terragruntHcl, []byte(updatedHcl), 0444)) @@ -4684,8 +4669,7 @@ err = runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-non-interactive --terragrunt-working-dir %s", testPath), &stdout, &stderr) require.NoError(t, err) // auto initialization when source is changed - errout = string(stderr.Bytes()) - assert.Equal(t, 1, strings.Count(errout, "Terraform has been successfully initialized!")) + assert.Equal(t, 1, strings.Count(stdout.String(), "Terraform has been successfully initialized!")) } func TestRenderJsonAttributesMetadata(t *testing.T) { ++++++ terragrunt.obsinfo ++++++ --- /var/tmp/diff_new_pack.GjHB7z/_old 2023-05-09 13:08:58.053602982 +0200 +++ /var/tmp/diff_new_pack.GjHB7z/_new 2023-05-09 13:08:58.061603029 +0200 @@ -1,5 +1,5 @@ name: terragrunt -version: 0.45.9 -mtime: 1683280809 -commit: 0652685815e3a319a1c4e54d5b7bf10e52c44f8c +version: 0.45.10 +mtime: 1683567278 +commit: be4aac786bf155e57e22f7ae3ce5a631c52b1708 ++++++ 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