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

Is it possible to use cache service URL as a HTTP cache? #547

Open
vlsi opened this issue Aug 6, 2020 · 4 comments
Open

Is it possible to use cache service URL as a HTTP cache? #547

vlsi opened this issue Aug 6, 2020 · 4 comments
Labels
cache enhancement New feature or request

Comments

@vlsi
Copy link

vlsi commented Aug 6, 2020

Describe the enhancement

It would be nice if caching could be used as an HTTP service. Modern build systems like Gradle, Bazel, Pants can use a remote cache to avoid building the same tasks across different builds.

The current @actions/cache allows to cache files, however, there's no way to fetch data on demand, and it is hard to make incremental updates to the cache.

Can the HTTP cache service be exposed to the build scripts? For instance, read-only for pull-requests, and read-write for branch-based builds.

Additional information

See https://cirrus-ci.org/guide/writing-tasks/#http-cache

@vlsi vlsi added the enhancement New feature or request label Aug 6, 2020
@fkorotkov
Copy link

I wrote an action to start a proxy server that has the compatible API. See https://github.com/cirruslabs/http-cache-action

@vlsi
Copy link
Author

vlsi commented Sep 9, 2020

There's Gradle-tailored action as well: https://github.com/burrunan/gradle-cache-action :)

@vlsi
Copy link
Author

vlsi commented Sep 15, 2020

@fkorotkov , FYI: open-telemetry/opentelemetry-java-instrumentation#1205 (comment)

Error: commitCache failed: {"$id":"1","innerException":null,"message":"Request was blocked due to exceeding usage of resource 'Count' in namespace ''.","typeName":"Microsoft.TeamFoundation.Framework.Server.RequestBlockedException, Microsoft.TeamFoundation.Framework.Server","typeKey":"RequestBlockedException","errorCode":0,"eventId":3000}
    at /home/runner/work/_actions/burrunan/gradle-cache-action/v1.4/dist/cache-action-entrypoint.js:15662:11
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/burrunan/gradle-cache-action/v1.4/dist/cache-action-entrypoint.js:15615:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

@fkorotkov
Copy link

Will be great to get some official comments about concurrent usage of the API. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants