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-03-09 17:45:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/terragrunt (Old) and /work/SRC/openSUSE:Factory/.terragrunt.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "terragrunt" Thu Mar 9 17:45:38 2023 rev:33 rq:1070258 version:0.44.5 Changes: -------- --- /work/SRC/openSUSE:Factory/terragrunt/terragrunt.changes 2023-03-03 22:31:40.076097955 +0100 +++ /work/SRC/openSUSE:Factory/.terragrunt.new.31432/terragrunt.changes 2023-03-09 17:45:52.374950362 +0100 @@ -1,0 +2,6 @@ +Wed Mar 08 14:37:34 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.44.5: + * #2471 Include in download directory tflint config (#2474) + +------------------------------------------------------------------- Old: ---- terragrunt-0.44.4.tar.gz New: ---- terragrunt-0.44.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ terragrunt.spec ++++++ --- /var/tmp/diff_new_pack.b4tlGy/_old 2023-03-09 17:45:53.418955919 +0100 +++ /var/tmp/diff_new_pack.b4tlGy/_new 2023-03-09 17:45:53.422955939 +0100 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: terragrunt -Version: 0.44.4 +Version: 0.44.5 Release: 0 Summary: Thin wrapper for Terraform for working with multiple Terraform modules License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.b4tlGy/_old 2023-03-09 17:45:53.458956131 +0100 +++ /var/tmp/diff_new_pack.b4tlGy/_new 2023-03-09 17:45:53.462956153 +0100 @@ -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.44.4</param> + <param name="revision">v0.44.5</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> @@ -16,7 +16,7 @@ <param name="compression">gz</param> </service> <service name="go_modules" mode="disabled"> - <param name="archive">terragrunt-0.44.4.tar.gz</param> + <param name="archive">terragrunt-0.44.5.tar.gz</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.b4tlGy/_old 2023-03-09 17:45:53.482956259 +0100 +++ /var/tmp/diff_new_pack.b4tlGy/_new 2023-03-09 17:45:53.486956281 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/gruntwork-io/terragrunt</param> - <param name="changesrevision">d360c6ca670e914b38cd6f5dc48433234064fea0</param></service></servicedata> + <param name="changesrevision">c85212fe2dc1bfb524396d08caca69f9124057e8</param></service></servicedata> (No newline at EOF) ++++++ terragrunt-0.44.4.tar.gz -> terragrunt-0.44.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.44.4/cli/download_source.go new/terragrunt-0.44.5/cli/download_source.go --- old/terragrunt-0.44.4/cli/download_source.go 2023-03-02 22:32:09.000000000 +0100 +++ new/terragrunt-0.44.5/cli/download_source.go 2023-03-08 14:37:13.000000000 +0100 @@ -22,6 +22,8 @@ // file to indicate that init should be executed const moduleInitRequiredFile = ".terragrunt-init-required" +const tfLintConfig = ".tflint.hcl" + // 1. Download the given source URL, which should use Terraform's module source syntax, into a temporary folder // 2. Check if module directory exists in temporary folder // 3. Copy the contents of terragruntOptions.WorkingDir into the temporary folder. @@ -44,6 +46,8 @@ if terragruntConfig.Terraform != nil && terragruntConfig.Terraform.IncludeInCopy != nil { includeInCopy = *terragruntConfig.Terraform.IncludeInCopy } + // Always include the .tflint.hcl file, if it exists + includeInCopy = append(includeInCopy, tfLintConfig) if err := util.CopyFolderContents(terragruntOptions.WorkingDir, terraformSource.WorkingDir, MODULE_MANIFEST_NAME, includeInCopy); err != nil { return nil, err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.44.4/test/integration_tflint_test.go new/terragrunt-0.44.5/test/integration_tflint_test.go --- old/terragrunt-0.44.4/test/integration_tflint_test.go 2023-03-02 22:32:09.000000000 +0100 +++ new/terragrunt-0.44.5/test/integration_tflint_test.go 2023-03-08 14:37:13.000000000 +0100 @@ -7,7 +7,9 @@ "bytes" "fmt" "io" + "io/ioutil" "os" + "regexp" "testing" "github.com/gruntwork-io/terragrunt/util" @@ -25,7 +27,9 @@ assert.NotContains(t, errOut.String(), "Error while running tflint with args:") assert.NotContains(t, errOut.String(), "Tflint found issues in the project. Check for the tflint logs above.") - assert.Contains(t, errOut.String(), fmt.Sprintf("--config %s/.tflint.hcl", modulePath)) + found, err := regexp.MatchString(fmt.Sprintf("--config %s/.terragrunt-cache/.*/.tflint.hcl", modulePath), errOut.String()) + assert.NoError(t, err) + assert.True(t, found) } func TestTflintFindsModule(t *testing.T) { @@ -84,3 +88,24 @@ } runTerragrunt(t, fmt.Sprintf("terragrunt run-all init --terragrunt-log-level debug --terragrunt-non-interactive --terragrunt-working-dir %s", runPath)) } + +func TestTflintFindsNoIssuesWithValidCodeDifferentDownloadDir(t *testing.T) { + out := new(bytes.Buffer) + errOut := new(bytes.Buffer) + + downloadDir, err := ioutil.TempDir("", "download-dir") + if err != nil { + t.Fatalf("Failed to create temp dir due to error: %v", err) + } + + rootPath := copyEnvironmentWithTflint(t, TEST_FIXTURE_TFLINT_NO_ISSUES_FOUND) + modulePath := util.JoinPath(rootPath, TEST_FIXTURE_TFLINT_NO_ISSUES_FOUND) + err = runTerragruntCommand(t, fmt.Sprintf("terragrunt plan --terragrunt-log-level debug --terragrunt-working-dir %s --terragrunt-download-dir %s", modulePath, downloadDir), out, errOut) + assert.NoError(t, err) + + assert.NotContains(t, errOut.String(), "Error while running tflint with args:") + assert.NotContains(t, errOut.String(), "Tflint found issues in the project. Check for the tflint logs above.") + found, err := regexp.MatchString(fmt.Sprintf("--config %s/.*/.tflint.hcl", downloadDir), errOut.String()) + assert.NoError(t, err) + assert.True(t, found) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/terragrunt-0.44.4/test/integration_windows_test.go new/terragrunt-0.44.5/test/integration_windows_test.go --- old/terragrunt-0.44.4/test/integration_windows_test.go 2023-03-02 22:32:09.000000000 +0100 +++ new/terragrunt-0.44.5/test/integration_windows_test.go 2023-03-08 14:37:13.000000000 +0100 @@ -8,6 +8,7 @@ "fmt" "os" "path/filepath" + "regexp" "strings" "testing" @@ -80,5 +81,7 @@ assert.NotContains(t, errOut.String(), "Error while running tflint with args:") assert.NotContains(t, errOut.String(), "Tflint found issues in the project. Check for the tflint logs above.") - assert.Contains(t, errOut.String(), fmt.Sprintf("--config %s/.tflint.hcl", modulePath)) + found, err := regexp.MatchString(fmt.Sprintf("--config %s/.terragrunt-cache/.*/.tflint.hcl", modulePath), errOut.String()) + assert.NoError(t, err) + assert.True(t, found) } ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/terragrunt/vendor.tar.gz /work/SRC/openSUSE:Factory/.terragrunt.new.31432/vendor.tar.gz differ: char 5, line 1