Toolkit: Is it possible to use cache service URL as a HTTP cache?

Created on 6 Aug 2020  路  4Comments  路  Source: actions/toolkit

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

cache enhancement

All 4 comments

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

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

@fkorotkov , FYI: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1205#issue-701759426

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)

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamesIves picture JamesIves  路  5Comments

Piccirello picture Piccirello  路  3Comments

jhenstridge picture jhenstridge  路  6Comments

josephperrott picture josephperrott  路  6Comments

Ignigena picture Ignigena  路  6Comments