GithubHelp home page GithubHelp logo

Comments (3)

joschi avatar joschi commented on July 28, 2024

This might be related to actions/cache#1361.

from actions.

bigdaz avatar bigdaz commented on July 28, 2024

Thanks for your report.

What you're seeing is the result of access restrictions applied by GitHub Actions on cache entries. Read here for the details, but note in particular that Workflow runs also cannot restore caches created for different tag names.
There is more context in the setup-gradle docs.

You said:

The action apparently only tries to download gradle-home-v1|Linux|test-product-components[5d434b537dd905dcf51d5f2bd5e8022e]-7fb4e5a6a4f5a839b7a360204248ab6117a28e15 which fails but never tries the other restore keys (which would succeed)

This is incorrect. You can see from the logs that the action actually passes all of the keys including the restore keys in it's request.

This logging comes from the action:

  Requesting Gradle User Home with
      key:gradle-home-v1|Linux|test-product-components[5d434b537dd905dcf51d5f2bd5e8022e]-7fb4e5a6a4f5a839b7a360204248ab6117a28e15
      restoreKeys:[gradle-home-v1|Linux|test-product-components[5d434b537dd905dcf51d5f2bd5e8022e],gradle-home-v1|Linux|test-product-components,gradle-home-v1|Linux]

This logging comes from the GitHub Actions caching infrastructure:

  ##[debug]Resolved Keys:
  ##[debug]["gradle-home-v1|Linux|test-product-components[5d434b537dd905dcf51d5f2bd5e8022e]-7fb4e5a6a4f5a839b7a360204248ab6117a28e15","gradle-home-v1|Linux|test-product-components[5d434b537dd905dcf51d5f2bd5e8022e]","gradle-home-v1|Linux|test-product-components","gradle-home-v1|Linux"]

In both cases, you can see that the restore keys are being passed. As explained, the cache misses are due to cache access restrictions, not due to the incorrect keys being used.

The setup-gradle action has no control over these access restrictions or over the branch/tag that is bound to a cache entry.

from actions.

joschi avatar joschi commented on July 28, 2024

@bigdaz Thanks for the explanation! Too bad it doesn't work in our setup, but I see why now. 😄

from actions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.