Repository: gruntwork-io/terragrunt (language: go)

Issue:
Go vendoring broken in 0.58.3: no required module provides package github.com/gruntwork-io/terragrunt/terraform/getproviders/mocks
Preparing the vendored dependencies for the openSUSE package results in this error in 0.58.3:

```
INFO:obs-service-go_modules:Archive autodetected at /home/Buildservice/Branches/Branch_terraform/terragrunt/terragrunt-0.58.3.obscpio
INFO:obs-service-go_modules:Using archive terragrunt-0.58.3.obscpio
INFO:obs-service-go_modules:Extracting terragrunt-0.58.3.obscpio to /tmp/tmptd09ozuq
INFO:obs-service-go_modules:Switching to /tmp/tmptd09ozuq
INFO:obs-service-go_modules:Detected basename terragrunt-0.58.3 from archive
INFO:obs-service-go_modules:Using go.mod found at /tmp/tmptd09ozuq/terragrunt-0.58.3/go.mod
INFO:obs-service-go_modules:go mod download
INFO:obs-service-go_modules:go mod vendor
ERROR:obs-service-go_modules:go: github.com/gruntwork-io/terragrunt/terraform/getproviders tested by
        github.com/gruntwork-io/terragrunt/terraform/getproviders.test imports
        github.com/gruntwork-io/terragrunt/terraform/getproviders/mocks: no required module provides package github.com/gruntwork-io/terragrunt/terraform/getproviders/mocks; to add it:
        go get github.com/gruntwork-io/terragrunt/terraform/getproviders/mocks
ERROR:obs-service-go_modules:go mod vendor failed
Aborting: service call failed:  /usr/lib/obs/service/go_modules --outdir /home/Buildservice/Branches/Branch_terraform/terragrunt/tmpwhmdhhs_.go_modules.service
```


Discussion / hints:

Fix patch:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index f4ccfc8b0d..47b8cf60b5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -164,8 +164,8 @@ jobs:
       - run:
           name: generate mocks
           command: |
-            go install github.com/vektra/mockery/v2@v2.36.0
-            go generate ./...
+            make install-mockery
+            make generate-mocks
       - run:
           name: run lint
           command: |
diff --git a/Makefile b/Makefile
index c25d681482..34045b1345 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ install-pre-commit-hook:
 # source. See also: .circleci/config.yml
 build: terragrunt
 terragrunt: $(shell find . \( -type d -name 'vendor' -prune \) \
-                        -o \( -type f -name '*.go'   -print \) )
+                        -o \( -type f -name '*.go'   -print \) ) install-mockery generate-mocks
 	set -xe ;\
 	vtag_maybe_extra=$$(git describe --tags --abbrev=12 --dirty --broken) ;\
 	go build -o $@ -ldflags "-X github.com/gruntwork-io/go-commons/version.Version=$${vtag_maybe_extra} -extldflags '-static'" .
@@ -44,4 +44,10 @@ install-lint:
 run-lint:
 	golangci-lint run -v --timeout=5m ./...
 
+install-mockery:
+	go install github.com/vektra/mockery/v2@v2.36.0
+
+generate-mocks:
+	go generate ./...
+
 .PHONY: help fmtcheck fmt install-fmt-hook clean install-lint run-lint


Test patch: