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

ci: fix setup-go build cache warnings. #1376

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

cpu
Copy link
Member

@cpu cpu commented Jul 27, 2023

Since v4 of the actions/setup-go action, caching is enabled by default, When a go.sum can't be found in the root of the project, a warning is logged of the form:

Restore cache failed: Dependencies file is not found in /home/runner/work/rustls/rustls. Supported file pattern: go.sum

Since we don't have a go.sum in the project root, this warning was being issued by both tasks that used the setup-go action:

  • The BoGo test suite task
  • The code coverage task

For the first of these, this commit disables caching for the setup-go action to avoid the warning. I tried setting cache-dependency-path to bogo/bogo/go.sum or bogo/go.sum but in each case the action reported not being able to find the file (probably because of the way we clone the upstream repo on-demand). It might be possible to get this working with more effort, but in the meantime disabling caching leaves us no worse off and squelches a warning.

For the second of these, it's not clear why we were installing the Go toolchain. The BoGo test suite is not being run by this task and so Go is not required. Removing setup-go from this task fixes the warning.

Since v4 of the `actions/setup-go` action, caching is enabled by default
and when a `go.sum` can't be found in the root of the project, a warning
is logged.

Since we don't have a `go.sum` in the project root, this warning was
being issued by both tasks that used the `setup-go` action:

* The BoGo test suite task
* The code coverage task

For the first of these, caching is disabled to avoid the warning - we
weren't benefiting from this to begin with and setting
`cache-dependency-path` to `bogo/bogo/go.sum` or `bogo/go.sum` wasn't
working.

For the second of these, it's not clear _why_ we were installing the Go
toolchain. The BoGo test suite is not being run by this task and so Go
is not required. Removing it fixes the warning.
@cpu cpu self-assigned this Jul 27, 2023
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #1376 (df4f237) into main (ad62b2c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1376   +/-   ##
=======================================
  Coverage   96.35%   96.35%           
=======================================
  Files          62       62           
  Lines       14580    14580           
=======================================
  Hits        14049    14049           
  Misses        531      531           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cpu cpu added this pull request to the merge queue Jul 28, 2023
Merged via the queue into rustls:main with commit 763a17e Jul 28, 2023
21 checks passed
@cpu cpu deleted the cpu-silence-ci-cache-warns branch July 28, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants