Skip to content

Post cache R package clean up warnings #13

Closed

Description

@imanuelcostigan

The post cache R package clean up seems to fail in different ways on different platforms:

On macOS:

Post job cleanup.
Cache hit occurred on the primary key macOS-r-3.6-9d6d6298c76f4d3f6969ba02e70924fc899df6ede745c821d69e7bc6c7583a2c, not saving cache.

On Windows:

Post job cleanup.
C:\Rtools\bin\tar.exe -cz --force-local -f d:/a/_temp/b77bb8ee-0267-4c3e-a392-f0271711ce95/cache.tgz -C d:/a/_temp/Library .
tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/Rtools/bin/tar: d\:/a/_temp/b77bb8ee-0267-4c3e-a392-f0271711ce95/cache.tgz: Cannot write: Broken pipe
/Rtools/bin/tar: Child returned status 2
/Rtools/bin/tar: Error is not recoverable: exiting now
##[warning]The process 'C:\Rtools\bin\tar.exe' failed with exit code 2

On Ubuntu:

Post job cleanup.
Cache hit occurred on the primary key Linux-r-3.6-9d6d6298c76f4d3f6969ba02e70924fc899df6ede745c821d69e7bc6c7583a2c, not saving cache

Activity

  1. jimhester commented on Nov 18, 2019

    @jimhester
    Member

    The macOS and Ubuntu ones are expected, the cache on GitHub Actions is immutable, once it has been created it can no longer be overwritten.

    Not positive on the Windows issue, though because the Rtools tar is in the PATH that might be messing things up, I will investigate it.

  2. jonkeane commented on Nov 27, 2019

    @jonkeane

    I can confirm that having tools where it is in the PATH on windows is causing this.

    I was running into this on a repo I was converting to actions. I tried excising the rtools paths and then updating the path with GH action's set-env command but couldn't get that to work, but putting C:\Program Files\Git\usr\bin\ at the front of the path at the end of my build has let my windows caches compress and work.

    This is very hacky, but got me unstuck:
    https://github.com/jonkeane/dittodb/blob/master/.github/workflows/check-windows.yaml#L90-L92

  3. jimhester commented on Nov 27, 2019

    @jimhester
    Member

    It seems to be an issue with the tar executable bundled with Rtools, it doesn't find the gzip executable when trying to compress the files even if it is on the PATH.

  4. added
    bug
    on Apr 3, 2020
  5. jimhester commented on Apr 3, 2020

    @jimhester
    Member

    I don't see a great way to solve this problem, we need the tools to be on the PATH during checking, but then we would have to somehow remove them before the cache is built...

  6. jimhester commented on Apr 3, 2020

    @jimhester
    Member

    I guess #21 (comment) has a fix that could work.

  7. jonkeane commented on Apr 4, 2020

    @jonkeane

    Yeah, FWIW, that fix has been working for me on my windows builds for the past few months as well.

  8. xihajun commented on Dec 10, 2021

    @xihajun

    May I ask what does this issue mean after setting the cache

    Cache Size: ~76 MB (79338730 B)
    
    /usr/bin/tar -xz -f /home/runner/work/_temp/41163c68-f007-4456-ae18-4b6b1951dfc0/cache.tgz -C /home/runner/work/_temp/Library
    
    Cache restored from key: r-
    
    
    Post job cleanup.
    
    Cache hit occurred on the primary key r-, not saving cache.
    
  9. gaborcsardi commented on Dec 10, 2021

    @gaborcsardi
    Member

    @xihajun I am not sure what mean, sorry.

  10. xihajun commented on Dec 11, 2021

    @xihajun

    @xihajun I am not sure what mean, sorry.

    Don't worry I figure it out. Thanks for replying :)

    "cache could not be clear, but will be able to change a path of saving"

  11. gaborcsardi commented on Dec 12, 2021

    @gaborcsardi
    Member

    You mean why the cache was not saved? As Jim said above, GHA caches are immutable.

    It is not possible to update a cache. If a proper cache hit happened, that means that all the packages were restored completely, so there is no need to save the packages to the cache, because they are there already.

  12. github-actions commented on Nov 6, 2022

    @github-actions

    This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

  13. locked as resolved and limited conversation to collaborators on Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions