Skip to content

Conversation

sayboras
Copy link
Member

Fixes #14

Testing

https://github.com/sayboras/golangci-lint-action/runs/698981324?check_suite_focus=true

Restore cache
prepare environment
  Finding needed golangci-lint version...
  Setup go stable version spec 1
  A version satisfying 1 not found locally, attempting to download ...
  Requested golangci-lint 'v1.26', using 'v1.26.0', calculation took 286ms
  Installing golangci-lint v1.26.0...
  Downloading https://github.com/golangci/golangci-lint/releases/download/v1.26.0/golangci-lint-1.26.0-linux-amd64.tar.gz ...
  Downloading from https://storage.googleapis.com/golang/go1.14.3.linux-amd64.tar.gz
  Cache Size: ~0 MB (28191 B)
  /bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/55990ecc-a52b-42fb-928d-26f56fe0343f/cache.tzst -P -C /home/runner/work/golangci-lint-action/golangci-lint-action
  Writing patch to /tmp/tmp-2722-n5jtq19CBJj1/pull.patch
  Restored cache for golangci-lint from key 'golangci-lint.cache-2629-c44fb3d8f525e6bb1b453fa82b0f85dd991994c8' in 390ms
  /bin/tar xz --warning=no-unknown-keyword -C /home/runner -f /home/runner/work/_temp/99660000-eead-464d-b15f-53111516907c
  Installed golangci-lint into /home/runner/golangci-lint-1.26.0-linux-amd64/golangci-lint in 689ms
  Extracting ...
  /bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/8b9176f0-4db7-494e-8d86-85de3c1c65fd -f /home/runner/work/_temp/666ada13-4b87-4f67-87c9-e3a6372c4e60
Save cache
Post job cleanup.
/bin/tar --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/golangci-lint-action/golangci-lint-action --files-from manifest.txt
Cache saved successfully
Saved cache for golangci-lint from paths '/home/runner/.cache/golangci-lint, /home/runner/.cache/go-build, /home/runner/go/pkg' in 410ms

....
Post job cleanup.
[warning] reserveCache failed: Cache already exists. Scope: refs/pull/1/merge, Key: golangci-lint.cache-2629-c44fb3d8f525e6bb1b453fa82b0f85dd991994c8, Version: 0f79570b790d0689c186c2d92be94cb909971c6643d398173c3c5a0ecd5cf601

@sayboras sayboras marked this pull request as ready for review May 22, 2020 10:58
@jirfag
Copy link
Contributor

jirfag commented May 22, 2020

hi, thank you!

shouldn't we implement the same logic as in @actions/cache? E.g. I see that we didn't implement this check and it lead to [warning] reserveCache failed: Cache already exists. Scope: refs/pull/1/merge, Key: golangci-lint.cache-2629-c44fb3d8f525e6bb1b453fa82b0f85dd991994c8, Version: 0f79570b790d0689c186c2d92be94cb909971c6643d398173c3c5a0ecd5cf601

@sayboras
Copy link
Member Author

hi, thank you!

shouldn't we implement the same logic as in @actions/cache? E.g. I see that we didn't implement this check and it lead to [warning] reserveCache failed: Cache already exists. Scope: refs/pull/1/merge, Key: golangci-lint.cache-2629-c44fb3d8f525e6bb1b453fa82b0f85dd991994c8, Version: 0f79570b790d0689c186c2d92be94cb909971c6643d398173c3c5a0ecd5cf601

Oh right, let me make an update.

@sayboras sayboras marked this pull request as draft May 22, 2020 13:28
@sayboras sayboras requested a review from jirfag May 22, 2020 14:01
@sayboras sayboras marked this pull request as ready for review May 22, 2020 14:01
@sayboras
Copy link
Member Author

I have created one dummy PR for verifying again, please find below details:

// Store the matched cache key
utils.setCacheState(cacheKey)
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey)
utils.setCacheHitOutput(isExactKeyMatch)
Copy link
Contributor

Choose a reason for hiding this comment

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

please, remove it: I don't want this to be a part of an exported interface of our GitHub action

Copy link
Contributor

@jirfag jirfag left a comment

Choose a reason for hiding this comment

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

looks great!

@jirfag jirfag merged commit 3395f77 into golangci:master May 23, 2020
@jirfag
Copy link
Contributor

jirfag commented May 23, 2020

thank you very much!

jirfag added a commit that referenced this pull request May 23, 2020
@jirfag jirfag mentioned this pull request May 23, 2020
jirfag added a commit that referenced this pull request May 23, 2020
@sayboras sayboras deleted the feature/cache branch May 25, 2020 12:13
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.

Use npm package actions/cache
2 participants