Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package digger-cli for openSUSE:Factory checked in at 2025-08-22 17:48:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/digger-cli (Old) and /work/SRC/openSUSE:Factory/.digger-cli.new.29662 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "digger-cli" Fri Aug 22 17:48:43 2025 rev:29 rq:1300859 version:0.6.119 Changes: -------- --- /work/SRC/openSUSE:Factory/digger-cli/digger-cli.changes 2025-08-20 13:28:03.999287222 +0200 +++ /work/SRC/openSUSE:Factory/.digger-cli.new.29662/digger-cli.changes 2025-08-22 17:49:45.916852515 +0200 @@ -1,0 +2,14 @@ +Fri Aug 22 04:48:46 UTC 2025 - Johannes Kastl <opensuse_buildserv...@ojkastl.de> + +- Update to version 0.6.119: + * paginate repo list, bug fix for issue #1941 by @jamesboi951 in + #2093 + * remove cli-cache-step by @motatoes in #2097 + * document caching strategies in digger by @motatoes in #2098 + * Digger UI bug fix by @jamesboi951 in #2103 + * remove forced lower case by @breardon2011 in #2104 + * report no projects impacted when REPORT_BEFORE_LOADING_CONFIG + is set by @motatoes in #2099 + * traverse nested directories by @breardon2011 in #2105 + +------------------------------------------------------------------- Old: ---- digger-cli-0.6.118.obscpio New: ---- digger-cli-0.6.119.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ digger-cli.spec ++++++ --- /var/tmp/diff_new_pack.kYJxIu/_old 2025-08-22 17:49:47.444916184 +0200 +++ /var/tmp/diff_new_pack.kYJxIu/_new 2025-08-22 17:49:47.448916350 +0200 @@ -19,7 +19,7 @@ %define executable_name digger Name: digger-cli -Version: 0.6.118 +Version: 0.6.119 Release: 0 Summary: CLI for the digger open source IaC orchestration tool License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.kYJxIu/_old 2025-08-22 17:49:47.484917850 +0200 +++ /var/tmp/diff_new_pack.kYJxIu/_new 2025-08-22 17:49:47.488918017 +0200 @@ -6,7 +6,7 @@ <param name="exclude">go.mod</param> <param name="exclude">go.work</param> <param name="exclude">go.work.sum</param> - <param name="revision">v0.6.118</param> + <param name="revision">v0.6.119</param> <param name="match-tag">v*</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.kYJxIu/_old 2025-08-22 17:49:47.512919017 +0200 +++ /var/tmp/diff_new_pack.kYJxIu/_new 2025-08-22 17:49:47.516919183 +0200 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/diggerhq/digger</param> - <param name="changesrevision">0e8db99568c5c69b792a416458d8d764445b4d18</param></service><service name="tar_scm"> + <param name="changesrevision">a6b42ee606f00534c652529ca02361312fb9100e</param></service><service name="tar_scm"> <param name="url">https://github.com/johanneskastl/digger</param> <param name="changesrevision">8fe377068e53e2050ff4c745388d8428d2b13bb0</param></service></servicedata> (No newline at EOF) ++++++ digger-cli-0.6.118.obscpio -> digger-cli-0.6.119.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/action.yml new/digger-cli-0.6.119/action.yml --- old/digger-cli-0.6.118/action.yml 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/action.yml 2025-08-22 02:23:32.000000000 +0200 @@ -383,15 +383,6 @@ shell: bash if: ${{ !startsWith(github.action_ref, 'v') }} - - uses: actions/cache@v4 - with: - path: | - ${{ steps.golang-env.outputs.build-cache-path }} - ${{ steps.golang-env.outputs.module-cache-path }} - key: digger-cli-cache-${{ hashFiles('.digger.go.sum') }} - restore-keys: digger-cli-cache- - if: ${{ !startsWith(github.action_ref, 'v') && inputs.cache-dependencies == 'true' }} - - name: Adding required env vars for next step uses: actions/github-script@v7 env: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/backend/controllers/github.go new/digger-cli-0.6.119/backend/controllers/github.go --- old/digger-cli-0.6.118/backend/controllers/github.go 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/backend/controllers/github.go 2025-08-22 02:23:32.000000000 +0200 @@ -6,8 +6,6 @@ "encoding/json" "errors" "fmt" - "github.com/diggerhq/digger/libs/digger_config/terragrunt/tac" - "github.com/diggerhq/digger/libs/git_utils" "log/slog" "math/rand" "net/http" @@ -21,6 +19,9 @@ "strings" "time" + "github.com/diggerhq/digger/libs/digger_config/terragrunt/tac" + "github.com/diggerhq/digger/libs/git_utils" + "github.com/diggerhq/digger/backend/ci_backends" config2 "github.com/diggerhq/digger/backend/config" "github.com/diggerhq/digger/backend/locking" @@ -540,7 +541,7 @@ } commentReporterManager := utils.InitCommentReporterManager(ghService, prNumber) - if _, exists := os.LookupEnv("DIGGER_REPORT_BEFORE_LOADING_CONFIG"); exists { + if os.Getenv("DIGGER_REPORT_BEFORE_LOADING_CONFIG") == "1" { _, err := commentReporterManager.UpdateComment(":construction_worker: Digger starting....") if err != nil { slog.Error("Error initializing comment reporter", @@ -596,7 +597,10 @@ "prNumber", prNumber, "repoFullName", repoFullName, ) - // This one is for aggregate reporting + if os.Getenv("DIGGER_REPORT_BEFORE_LOADING_CONFIG") == "1" { + // This one is for aggregate reporting + commentReporterManager.UpdateComment(":construction_worker: No projects impacted") + } err = utils.SetPRStatusForJobs(ghService, prNumber, jobsForImpactedProjects) return nil } @@ -1362,7 +1366,7 @@ } commentReporterManager := utils.InitCommentReporterManager(ghService, issueNumber) - if _, exists := os.LookupEnv("DIGGER_REPORT_BEFORE_LOADING_CONFIG"); exists { + if os.Getenv("DIGGER_REPORT_BEFORE_LOADING_CONFIG") == "1" { _, err := commentReporterManager.UpdateComment(":construction_worker: Digger starting....") if err != nil { slog.Error("Error initializing comment reporter", @@ -2453,9 +2457,31 @@ } func (d DiggerController) GithubAppCallbackPage(c *gin.Context) { - installationId := c.Request.URL.Query()["installation_id"][0] + installationIdParams, installationIdExists := c.Request.URL.Query()["installation_id"] + if !installationIdExists || len(installationIdParams) == 0 { + slog.Error("There was no installation_id in the url query parameters") + c.String(http.StatusBadRequest, "could not find the installation_id query parameter for github app") + return + } + installationId := installationIdParams[0] + if len(installationId) < 1 { + slog.Error("Installation_id parameter is empty") + c.String(http.StatusBadRequest, "installation_id parameter for github app is empty") + return + } //setupAction := c.Request.URL.Query()["setup_action"][0] - code := c.Request.URL.Query()["code"][0] + codeParams, codeExists := c.Request.URL.Query()["code"] + if !codeExists || len(codeParams) == 0 { + slog.Error("There was no code in the url query parameters") + c.String(http.StatusBadRequest, "could not find the code query parameter for github app") + return + } + code := codeParams[0] + if len(code) < 1 { + slog.Error("Code parameter is empty") + c.String(http.StatusBadRequest, "code parameter for github app is empty") + return + } appId := c.Request.URL.Query().Get("state") slog.Info("Processing GitHub app callback", "installationId", installationId, "appId", appId) @@ -2599,8 +2625,7 @@ // we get repos accessible to this installation slog.Debug("Listing repositories for installation", "installationId", installationId64) - opt := &github.ListOptions{Page: 1, PerPage: 100} - listRepos, _, err := client.Apps.ListRepos(context.Background(), opt) + repos, err := dg_github.ListGithubRepos(client) if err != nil { slog.Error("Failed to list existing repositories", "installationId", installationId64, @@ -2609,12 +2634,6 @@ c.String(http.StatusInternalServerError, "Failed to list existing repos: %v", err) return } - repos := listRepos.Repositories - - slog.Info("Retrieved repositories for installation", - "installationId", installationId64, - "repoCount", len(repos), - ) // resets all existing installations (soft delete) slog.Debug("Resetting existing GitHub installations", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/docs/ce/howto/caching-strategies.mdx new/digger-cli-0.6.119/docs/ce/howto/caching-strategies.mdx --- old/digger-cli-0.6.118/docs/ce/howto/caching-strategies.mdx 1970-01-01 01:00:00.000000000 +0100 +++ new/digger-cli-0.6.119/docs/ce/howto/caching-strategies.mdx 2025-08-22 02:23:32.000000000 +0200 @@ -0,0 +1,41 @@ +--- +title: "Caching providers" +--- + +In order to speed up your terraform runs it is great to cache providers so that each workflow run does not have to download the provider again. Digger provides +an easy way to cache providers with a single argument as follows: + +``` + - uses: diggerhq/digger@vLatest + with: + cache-dependencies: true +``` + +This will do the following: + +- When each job starts: it will attempt to restore cache from the github cache +- After terraform runs it will download all the necessary providers into a cache directory +- Once it is done it will store the cache back into github cache -- using the hash of the directory appended to the key + +The hashing of directories ensures that the cache is only saved if the contents of the directory has changed. Note that github +cache is immutable so new caches will be new entries in the cache. Digger currently does not prune older caches so you may need +to clean up older caches using a certain cycle. + +## Self-hosted runners and volumes caching + +If you are using self-hosted runners with github it might be overkill on your bandwidth to load and restore from cache. In this case it might be better to mount +a common volume for all the runners to read and write to. Digger provides an argument to control the location for the terraform (or terragrunt) provider cache directory: + +``` + - uses: diggerhq/digger@vLatest + with: + terraform-cache-dir: /home/myuser/mnt/terraform-cache +``` + +Where this path points to the location of a mounted volume that all the runners can read and write to. With this configuration in place, all runners will update the provider cache in place +which means there is no need to re-download providers or upload them back to github cache each time. + +<Note> + We are currently looking into cases where there might be conflicts between [different runners](https://terragrunt.gruntwork.io/docs/features/provider-cache-server/#why-opentofuterraforms-built-in-provider-caching-doesnt-work) + writing to the same cache directory. It seems that recent versions of opentofu and terraform have improved their cache handling to avoid this issue. But it is an area we hope to document better for digger in the near future. +</Note> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/docs/ce/howto/custom-commands.mdx new/digger-cli-0.6.119/docs/ce/howto/custom-commands.mdx --- old/digger-cli-0.6.118/docs/ce/howto/custom-commands.mdx 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/docs/ce/howto/custom-commands.mdx 2025-08-22 02:23:32.000000000 +0200 @@ -54,10 +54,10 @@ - run: terraform plan -input=false -refresh -no-color -out $DIGGER_PLANFILE ``` -Note that you need to use the -out flag to write the output to the $DIGGER_PLANFILE env variable, since this will be used in postprocessing steps by digger. +Note that you need to use the -out flag to write the output to the `$DIGGER_PLANFILE` env variable, since this will be used in postprocessing steps by digger. -Similarly for the apply step you can use the $DIGGER_PLANFILE env variable to point to the plan file to apply. Note that this will only work when you have the [plan persistence](/ce/howto/store-plans-in-a-bucket) -configured. If plan persistence is not configured, the $DIGGER_PLANFILE environment variable will not be set during the apply step. Here is an example with both plan and apply commands overriden: +Similarly for the apply step you can use the `$DIGGER_PLANFILE` env variable to point to the plan file to apply. Note that this will only work when you have the [plan persistence](/ce/howto/store-plans-in-a-bucket) +configured. If plan persistence is not configured, the `$DIGGER_PLANFILE` environment variable will not be set during the apply step. Here is an example with both plan and apply commands overriden: ``` workflows: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/docs/mint.json new/digger-cli-0.6.119/docs/mint.json --- old/digger-cli-0.6.118/docs/mint.json 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/docs/mint.json 2025-08-22 02:23:32.000000000 +0200 @@ -82,6 +82,7 @@ "pages": [ "ce/howto/managing-state", "ce/howto/specify-terraform-version", + "ce/howto/caching-strategies", "ce/howto/apply-on-merge", "ce/howto/apply-requirements", "ce/howto/auto-merge", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/libs/ci/generic/comment_utils.go new/digger-cli-0.6.119/libs/ci/generic/comment_utils.go --- old/digger-cli-0.6.118/libs/ci/generic/comment_utils.go 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/libs/ci/generic/comment_utils.go 2025-08-22 02:23:32.000000000 +0200 @@ -3,9 +3,9 @@ import ( "flag" "fmt" - "github.com/google/shlex" "strconv" "strings" + "github.com/google/shlex" ) type CommentParts struct { @@ -50,7 +50,7 @@ // validates that the right number of flags are specified // Does not validate the "digger plan" part of the command that is left to a prior function func ParseDiggerCommentFlags(comment string) (*CommentParts, bool, error) { - comment = strings.TrimSpace(strings.ToLower(comment)) + comment = strings.TrimSpace(comment) args, err := shlex.Split(comment) if err != nil { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/libs/ci/github/github_utils.go new/digger-cli-0.6.119/libs/ci/github/github_utils.go --- old/digger-cli-0.6.118/libs/ci/github/github_utils.go 1970-01-01 01:00:00.000000000 +0100 +++ new/digger-cli-0.6.119/libs/ci/github/github_utils.go 2025-08-22 02:23:32.000000000 +0200 @@ -0,0 +1,46 @@ +package github + +import ( + "context" + "fmt" + "log/slog" + + "github.com/google/go-github/v61/github" +) + +func ListGithubRepos(client *github.Client) ([]*github.Repository, error) { + allRepos := make([]*github.Repository, 0) + //err := c.BindJSON(&request) + opts := &github.ListOptions{PerPage: 100} + + pageLimit := 0 + for { + listRepos, resp, err := client.Apps.ListRepos(context.Background(), opts) + if err != nil { + // Check specifically for rate limit errors + if _, ok := err.(*github.RateLimitError); ok { + slog.Error("GitHub API rate limit exceeded", + "error", err, + ) + // Wait and retry after a delay or return a specific error + // For now, we'll just return with the rate limit error + return nil, err + } + slog.Error("Failed to list existing repositories", + "error", err, + ) + return nil, err + } + allRepos = append(allRepos, listRepos.Repositories...) + pageLimit++ + if pageLimit == 20 { + slog.Error("Exceeded maximum number of pages (20) when listing repositories, results may be incomplete") + return nil, fmt.Errorf("exceeded maximum number of pages (20) when listing repositories, results may be incomplete") + } + if resp.NextPage == 0 { + break + } + opts.Page = resp.NextPage + } + return allRepos, nil +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/libs/ci/github/github_utils_test.go new/digger-cli-0.6.119/libs/ci/github/github_utils_test.go --- old/digger-cli-0.6.118/libs/ci/github/github_utils_test.go 1970-01-01 01:00:00.000000000 +0100 +++ new/digger-cli-0.6.119/libs/ci/github/github_utils_test.go 2025-08-22 02:23:32.000000000 +0200 @@ -0,0 +1,55 @@ +package github + +import ( + "encoding/base64" + "fmt" + net "net/http" + "os" + "strconv" + "testing" + + "github.com/bradleyfalzon/ghinstallation/v2" + "github.com/google/go-github/v61/github" + "github.com/stretchr/testify/assert" +) + +func TestListRepositoriesReturnsAllReposities(t *testing.T) { + if os.Getenv("CI") != "" { + t.Skip("skipping in CI") + } + githubAppPrivateKeyB64 := os.Getenv("GITHUB_APP_PRIVATE_KEY_BASE64") + decodedBytes, err := base64.StdEncoding.DecodeString(githubAppPrivateKeyB64) + if err != nil { + fmt.Printf("Failed to decode GITHUB_APP_PRIVATE_KEY_BASE64, error: %v\n", err) + t.Error(err) + } + githubAppPrivateKey := string(decodedBytes) + tr := net.DefaultTransport + var githubAppId = os.Getenv("GITHUB_APP_ID") + var installationId = os.Getenv("INSTALLATION_ID") + + githubAppIdintValue, err := strconv.ParseInt(githubAppId, 10, 64) + if err != nil { + fmt.Printf("Error converting environment variable to int64: %v\n", err) + t.Fatalf("Failed to parse GITHUB_APP_ID: %v", err) + } + installationIdintValue, err := strconv.ParseInt(installationId, 10, 64) + if err != nil { + fmt.Printf("Error converting environment variable to int64: %v\n", err) + t.Fatalf("Failed to parse INSTALLATION_ID: %v", err) + } + + itr, err := ghinstallation.New(tr, githubAppIdintValue, installationIdintValue, []byte(githubAppPrivateKey)) + if err != nil { + fmt.Printf("Failed to initialize GitHub app installation: githubAppId=%s, installationId=%s, error=%v\n", githubAppId, installationId, err) + t.Error(err) + } + + client := github.NewClient(&net.Client{Transport: itr}) + + allRepos, err := ListGithubRepos(client) + fmt.Println("err is", err) + assert.Nil(t, err) + // Currently Digger has 388 repositories, Update the hardcoded value to the expected number of repositories if the number changes in the future. + assert.Equal(t, 388, len(allRepos)) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/libs/digger_config/digger_config.go new/digger-cli-0.6.119/libs/digger_config/digger_config.go --- old/digger-cli-0.6.118/libs/digger_config/digger_config.go 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/libs/digger_config/digger_config.go 2025-08-22 02:23:32.000000000 +0200 @@ -3,7 +3,6 @@ import ( "errors" "fmt" - "github.com/diggerhq/digger/libs/digger_config/terragrunt/tac" "log/slog" "os" "path" @@ -11,6 +10,8 @@ "regexp" "strings" + "github.com/diggerhq/digger/libs/digger_config/terragrunt/tac" + "github.com/samber/lo" "github.com/dominikbraun/graph" @@ -926,7 +927,11 @@ includePatterns := project.IncludePatterns excludePatterns := project.ExcludePatterns - includePatterns = append(includePatterns, filepath.Join(project.Dir, "*")) + if !project.Terragrunt { + includePatterns = append(includePatterns, filepath.Join(project.Dir, "**", "*")) + } else { + includePatterns = append(includePatterns, filepath.Join(project.Dir, "*")) + } // all our patterns are the globale dir pattern + the include patterns specified by user if MatchIncludeExcludePatternsToFile(changedFile, includePatterns, excludePatterns) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/digger-cli-0.6.118/libs/digger_config/digger_config_test.go new/digger-cli-0.6.119/libs/digger_config/digger_config_test.go --- old/digger-cli-0.6.118/libs/digger_config/digger_config_test.go 2025-08-20 01:26:42.000000000 +0200 +++ new/digger-cli-0.6.119/libs/digger_config/digger_config_test.go 2025-08-22 02:23:32.000000000 +0200 @@ -1317,9 +1317,24 @@ Projects: projects, } //expectedImpactingLocations := map[string]ProjectToSourceMapping{} + // TODO: this behaviour doesn't make much sense, we should re-evaluate when we make it configurable + impactedProjects, _ := c.GetModifiedProjects(changedFiles) + assert.Equal(t, 1, len(impactedProjects)) +} +func TestShouldDetectNestedFilesAsImpacted(t *testing.T) { + changedFiles := []string{"services/backend/files/config.json"} + projects := []Project{ + Project{ + Name: "services_backend", + Dir: "services/backend", + }, + } + c := DiggerConfig{ + Projects: projects, + } impactedProjects, _ := c.GetModifiedProjects(changedFiles) - assert.Equal(t, 0, len(impactedProjects)) + assert.Equal(t, 1, len(impactedProjects)) } func TestGetModifiedProjectsReturnsCorrectSourceMapping(t *testing.T) { ++++++ digger-cli.obsinfo ++++++ --- /var/tmp/diff_new_pack.kYJxIu/_old 2025-08-22 17:49:49.292993187 +0200 +++ /var/tmp/diff_new_pack.kYJxIu/_new 2025-08-22 17:49:49.296993353 +0200 @@ -1,5 +1,5 @@ name: digger-cli -version: 0.6.118 -mtime: 1755646002 -commit: 0e8db99568c5c69b792a416458d8d764445b4d18 +version: 0.6.119 +mtime: 1755822212 +commit: a6b42ee606f00534c652529ca02361312fb9100e ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/digger-cli/vendor.tar.gz /work/SRC/openSUSE:Factory/.digger-cli.new.29662/vendor.tar.gz differ: char 133, line 1