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

chore(gha): fix macos action/setup-go@v4 cache miss. #1417

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

i4ki
Copy link
Contributor

@i4ki i4ki commented Feb 2, 2024

What this PR does / why we need it:

Set the same Go version as specified in the go.mod
because of many similar issues related to the setup-go
cache unable to work when go.mod specifies a different
version.

Additionally, the rand.Seed() was updated to use
rand.New(rand.NewSource(seed)) because the former was
removed from Go1.20.

Which issue(s) this PR fixes:

no

Special notes for your reviewer:

Does this PR introduce a user-facing change?

no

@i4ki i4ki requested a review from a team as a code owner February 2, 2024 02:33
Copy link

netlify bot commented Feb 2, 2024

Deploy Preview for docs-terramate-io canceled.

Name Link
🔨 Latest commit e18418a
🔍 Latest deploy log https://app.netlify.com/sites/docs-terramate-io/deploys/65ca19461fa75000080433d0

@i4ki i4ki force-pushed the i4k-fix-macos-go-cache-miss branch 2 times, most recently from 1ec5ab9 to 71f30ad Compare February 2, 2024 02:46
Copy link

github-actions bot commented Feb 2, 2024

metric: time/op
CloudReadLines-4: old 977µs ± 2%: new 976µs ± 5%: delta: 0.00%
CloudReadLine-4: old 6.71ms ± 1%: new 6.72ms ± 1%: delta: 0.00%
ListFiles-4: old 51.2µs ± 1%: new 51.0µs ± 1%: delta: 0.00%
Generate-4: old 2.52s ± 1%: new 2.52s ± 1%: delta: 0.00%
GenerateRegex-4: old 1.79s ± 1%: new 1.79s ± 1%: delta: 0.00%
TokensForExpressionComplex-4: old 1.25ms ± 0%: new 1.25ms ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 902ns ± 1%: new 903ns ± 1%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 33.7µs ± 1%: new 33.7µs ± 1%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 1.44ms ± 0%: new 1.45ms ± 0%: delta: 0.13%
TokensForExpression-4: old 1.26ms ± 0%: new 1.26ms ± 0%: delta: 0.00%
PartialEvalComplex-4: old 427µs ± 1%: new 428µs ± 1%: delta: 0.22%
PartialEvalSmallString-4: old 3.55µs ± 1%: new 3.54µs ± 1%: delta: 0.00%
PartialEvalHugeString-4: old 1.84ms ± 0%: new 1.84ms ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 4.84ms ± 1%: new 4.86ms ± 1%: delta: 0.00%
PartialEvalObject-4: old 21.3µs ± 0%: new 21.4µs ± 1%: delta: 0.16%
TmAllTrueLiteralList-4: old 6.26ms ± 0%: new 6.25ms ± 0%: delta: -0.11%
TmAllTrueFuncall-4: old 160µs ± 0%: new 160µs ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 147ms ± 0%: new 147ms ± 0%: delta: -0.15%
TmAnyTrueFuncall-4: old 160µs ± 0%: new 160µs ± 0%: delta: 0.00%
TmTernary-4: old 2.65µs ± 0%: new 2.67µs ± 0%: delta: 0.48%
TmTry-4: old 53.0µs ± 1%: new 53.0µs ± 0%: delta: 0.00%
metric: alloc/op
CloudReadLines-4: old 3.12MB ± 0%: new 3.12MB ± 0%: delta: 0.00%
CloudReadLine-4: old 3.37MB ± 0%: new 3.37MB ± 0%: delta: 0.00%
ListFiles-4: old 22.0kB ± 0%: new 22.0kB ± 0%: delta: 0.00%
Generate-4: old 2.32GB ± 0%: new 2.32GB ± 0%: delta: 0.00%
GenerateRegex-4: old 951MB ± 0%: new 951MB ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 412kB ± 0%: new 412kB ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 592B ± 0%: new 592B ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 14.0kB ± 0%: new 14.0kB ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 402kB ± 0%: new 402kB ± 0%: delta: 0.00%
TokensForExpression-4: old 412kB ± 0%: new 412kB ± 0%: delta: 0.00%
PartialEvalComplex-4: old 353kB ± 0%: new 353kB ± 0%: delta: 0.00%
PartialEvalSmallString-4: old 1.74kB ± 0%: new 1.74kB ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 166kB ± 0%: new 166kB ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 4.38MB ± 0%: new 4.38MB ± 0%: delta: 0.00%
PartialEvalObject-4: old 20.4kB ± 0%: new 20.4kB ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 1.74MB ± 0%: new 1.74MB ± 0%: delta: 0.00%
TmAllTrueFuncall-4: old 45.5kB ± 0%: new 45.5kB ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 37.9MB ± 0%: new 37.9MB ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 45.6kB ± 0%: new 45.6kB ± 0%: delta: -0.00%
TmTernary-4: old 1.11kB ± 0%: new 1.11kB ± 0%: delta: 0.00%
TmTry-4: old 11.1kB ± 0%: new 11.1kB ± 0%: delta: 0.00%
metric: allocs/op
CloudReadLines-4: old 5.54k ± 0%: new 5.54k ± 0%: delta: 0.00%
CloudReadLine-4: old 60.0k ± 0%: new 60.0k ± 0%: delta: 0.00%
ListFiles-4: old 321 ± 0%: new 321 ± 0%: delta: 0.00%
Generate-4: old 25.9M ± 0%: new 25.9M ± 0%: delta: 0.00%
GenerateRegex-4: old 18.3M ± 0%: new 18.3M ± 0%: delta: 0.00%
TokensForExpressionComplex-4: old 4.93k ± 0%: new 4.93k ± 0%: delta: 0.00%
TokensForExpressionPlainStringNoNewline-4: old 21.0 ± 0%: new 21.0 ± 0%: delta: 0.00%
TokensForExpressionStringWith100Newlines-4: old 328 ± 0%: new 328 ± 0%: delta: 0.00%
TokensForExpressionObjectWith100KeysWithNumberValues-4: old 3.29k ± 0%: new 3.29k ± 0%: delta: 0.00%
TokensForExpression-4: old 4.93k ± 0%: new 4.93k ± 0%: delta: 0.00%
PartialEvalComplex-4: old 2.83k ± 0%: new 2.83k ± 0%: delta: 0.00%
PartialEvalSmallString-4: old 23.0 ± 0%: new 23.0 ± 0%: delta: 0.00%
PartialEvalHugeString-4: old 35.0 ± 0%: new 35.0 ± 0%: delta: 0.00%
PartialEvalHugeInterpolatedString-4: old 23.1k ± 0%: new 23.1k ± 0%: delta: 0.00%
PartialEvalObject-4: old 125 ± 0%: new 125 ± 0%: delta: 0.00%
TmAllTrueLiteralList-4: old 13.6k ± 0%: new 13.6k ± 0%: delta: -0.00%
TmAllTrueFuncall-4: old 460 ± 0%: new 460 ± 0%: delta: 0.00%
TmAnyTrueLiteralList-4: old 252k ± 0%: new 252k ± 0%: delta: 0.00%
TmAnyTrueFuncall-4: old 462 ± 0%: new 462 ± 0%: delta: 0.00%
TmTernary-4: old 26.0 ± 0%: new 26.0 ± 0%: delta: 0.00%
TmTry-4: old 144 ± 0%: new 144 ± 0%: delta: 0.00%

@i4ki i4ki force-pushed the i4k-fix-macos-go-cache-miss branch from 71f30ad to 0643d8d Compare February 2, 2024 03:08
wmalik
wmalik previously approved these changes Feb 7, 2024
@i4ki i4ki force-pushed the i4k-fix-macos-go-cache-miss branch 4 times, most recently from 12d4f05 to d74fd07 Compare February 8, 2024 13:03
@i4ki i4ki requested a review from wmalik February 8, 2024 23:07
@i4ki i4ki force-pushed the i4k-fix-macos-go-cache-miss branch from 93c384b to f33ce22 Compare February 9, 2024 21:18
@i4ki
Copy link
Contributor Author

i4ki commented Feb 9, 2024

Now Go cache is restored successfully for MacOS:

Setup go version spec 1.21
Found in cache @ /Users/runner/hostedtoolcache/go/1.21.6/x64
Added go to the path
Successfully set up Go version 1.21
/Users/runner/hostedtoolcache/go/1.21.6/x64/bin/go env GOMODCACHE
/Users/runner/hostedtoolcache/go/1.21.6/x64/bin/go env GOCACHE
/Users/runner/go/pkg/mod
/Users/runner/Library/Caches/go-build
Received 0 of 211095513 (0.0%), 0.0 MBs/sec
Received 6710[8](https://github.com/terramate-io/terramate/actions/runs/7849723026/job/21423661670?pr=1417#step:3:9)864 of 2110[9](https://github.com/terramate-io/terramate/actions/runs/7849723026/job/21423661670?pr=1417#step:3:10)5513 (31.8%), 31.9 MBs/sec
Received 163577856 of 21[10](https://github.com/terramate-io/terramate/actions/runs/7849723026/job/21423661670?pr=1417#step:3:11)95513 (77.5%), 51.9 MBs/sec
Cache Size: ~201 MB (2[11](https://github.com/terramate-io/terramate/actions/runs/7849723026/job/21423661670?pr=1417#step:3:12)0955[13](https://github.com/terramate-io/terramate/actions/runs/7849723026/job/21423661670?pr=1417#step:3:14) B)
Received 211095513 of 211095513 (100.0%), 48.8 MBs/sec
/usr/local/bin/gtar -xf /Users/runner/work/_temp/fd3dd7a8-09ca-45bc-969b-0c3fd836c97c/cache.tzst -P -C /Users/runner/work/terramate/terramate --delay-directory-restore --use-compress-program unzstd
Cache restored successfully

Copy link
Contributor

@soerenmartius soerenmartius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@i4ki i4ki merged commit d11ab6a into main Feb 12, 2024
13 checks passed
@i4ki i4ki deleted the i4k-fix-macos-go-cache-miss branch February 12, 2024 13:31
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.

3 participants