Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies file is not found. Supported file pattern: go.sum #476

Open
2 of 5 tasks
fmunteanu opened this issue May 1, 2024 · 4 comments
Open
2 of 5 tasks

Dependencies file is not found. Supported file pattern: go.sum #476

fmunteanu opened this issue May 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@fmunteanu
Copy link

Description:
I'm getting this warning, on my workflow:

Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/hugo-test/hugo-test. Supported file pattern: go.sum

image

There is a previous issue #281, where the solution was to have the checkout executed prior setup-go, which is not the case for my workflow.

Action version:
setup-go@v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
go1.22.2 linux/amd64

Repro steps:
See the related Setup Go step, into workflow details.

Expected behavior:
No warnings should be generated.

Actual behavior:
Workflow output:

Run actions/setup-go@v5
  with:
    go-version: 1.22.x
    check-latest: false
    token: ***
    cache: true
Setup go version spec 1.22.x
Found in cache @ /opt/hostedtoolcache/go/1.22.2/x64
Added go to the path
Successfully set up Go version 1.22.x
/opt/hostedtoolcache/go/1.22.2/x64/bin/go env GOMODCACHE
/opt/hostedtoolcache/go/1.22.2/x64/bin/go env GOCACHE
/home/runner/.cache/go-build
/home/runner/go/pkg/mod
Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/hugo-test/hugo-test. Supported file pattern: go.sum
go version go1.22.2 linux/amd64
@fmunteanu fmunteanu added bug Something isn't working needs triage labels May 1, 2024
@fmunteanu
Copy link
Author

fmunteanu commented May 3, 2024

I'm not sure what effect has disabling the cache related to build time, but when I do this, the warning is gone. From my understanding, starting with v4, caching is enabled by default. New step, with cache disabled:

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          cache: false
          go-version: 1.22.x

Workflow build step has no more warnings:

image

@HarithaVattikuti
Copy link
Contributor

Hello @fmunteanu
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@peterbourgon
Copy link

See #478.

@fmunteanu
Copy link
Author

fmunteanu commented May 10, 2024

Setting the step to (docs reference):

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          cache: true
          cache-dependency-path: |
            **/go.mod
            **/go.sum

Produces another warning, see Post Setup Go step in workflow:

Post job cleanup.
/opt/hostedtoolcache/go/1.22.2/x64/bin/go env GOMODCACHE
/opt/hostedtoolcache/go/1.22.2/x64/bin/go env GOCACHE
/home/runner/go/pkg/mod
/home/runner/.cache/go-build
Warning: Cache folder path is retrieved but doesn't exist on disk: /home/runner/go/pkg/mod
Cache hit occurred on the primary key setup-go-Linux-ubuntu22-go-1.22.2-2e41450b046298d453631013dd695b7dd7b55d9f5c798193b859fd911bbdba7a, not saving cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants