question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warnings in caching steps

See original GitHub issue

First off, I love your actions. I just wanted to have said that 😄

With the new GitHub Actions Summary window, warnings are more visible. We noticed we get two warnings during cached run-vcpkg runs on Windows only (Mac doesn’t have this issue, it seems).

  1. Warning: restoreCache() failed once: 'Error: Tar failed with error: The process 'C:\windows\System32\tar.exe' failed with exit code 1' , retrying... Caused by:
  c:/vcpkg/.git/objects/pack/pack-7330effa4c511288dc38e7d7971f203d2a4a3a23.idx: Can't unlink already-existing object
  c:/vcpkg/.git/objects/pack/pack-7330effa4c511288dc38e7d7971f203d2a4a3a23.pack: Can't unlink already-existing object

(and this error repeats a second time)

  1. Warning: reserveCache failed: Cache already exists. Scope: refs/heads/master, Key: submodGitId=0a457099416a843f442b6c2275b2ec57239b50d9-args=-2010035955-os=1553167195-appendedKey=42-triplet=867608379, Version: e596d9224b0d5487c49893de7ad8700f61714e1ba95b948df70e6f4d9d37eb16

Is there anything you could do to mute those warnings by any chance? 😄

Cheers!

(see https://github.com/TrueBrain/OpenTTD/actions/runs/419062991 for an example of how this looks in the Summary)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
lukkacommented, Dec 13, 2020

@TrueBrain right, I even already seen this problem in the past but totally forgot about it.

By reading various open issues, in particular this one on the GitHub runner OS images and this other on @action/cache, the solution is to change the @actions/cache’s NPM package to use the GNU tar rather than the BSD one on Windows environments. And also passing in “–force-local” flag.

Whether there is anything sensible that can be done on run-vcpkg until this is fixed upstream, I am open to suggestions.

One potential hack is to rename the BSD tar.exe to anything: running the restore of the cache will then use the GNU one in the Git’s bin directory. Then revert the renaming.

1reaction
lukkacommented, Dec 22, 2020

@Shatur95 as soon a workaround is found and known to not have side effects, I would then include it in the action. I’d try by prepending to the path the GNU tar contained in the Git’s bin directory. I haven’t yet, anyone can beat me to it and create a PR for making this change 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP/1.1: Caching in HTTP
HTTP/1.0 caches will cache all Warnings in responses, without deleting the ones in the first category. Warnings in responses that are passed to...
Read more >
How to Fix the "Specify a Cache Validator" Warning - Kinsta
Follow the steps below on how to fix the “Specify a cache validator” warning. Experience the power of Kinsta's cloud hosting.
Read more >
How to Fix the Warning of Specify a Cache Validator?
Why warning of Specifying a Cache Validator occurs? ... This arises due to missing HTTP cache headers which need to be included on...
Read more >
How to Fix the Leverage Browser Caching Warning ... - YouTube
If you use performance testing tools on your website, there is a high chance that the "Leverage Browser Caching " warning isn't new...
Read more >
Warnings can be thrown during plungin cache clears - Drupal
The "issue" is that during certain processes, Drupal will clear various caches and in this process The following code which we have in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found