Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Expose Build Cache Configuration through a Build Operation.

    • -0
    • +181
  1. … 7 more files in changeset.
Clean up cache integration tests

  1. … 3 more files in changeset.
Extract test fixture for HttpBuildCache

    • -0
    • +62
  1. … 19 more files in changeset.
Report cache key for loading failure

  1. … 2 more files in changeset.
Use recoverable/non-recoverable in error messages

  1. … 2 more files in changeset.
Do not fail when storing to the cache fails

    • -0
    • +95
  1. … 9 more files in changeset.
Add redirect integration test for http build cache connector

+review REVIEW-6491

Add timeout to integration tests

The tests have been seen hanging on CI.

  1. … 1 more file in changeset.
Keep isValid() internal for build cache keys for now

There is no need to add this to the public API at this point.

+review REVIEW-6471

  1. … 2 more files in changeset.
Use DefaultHttpBuildCacheServiceFactory to create a build cache in test

+review REVIEW-6478

  1. … 1 more file in changeset.
Enable preemptive authentication for build cache

+review REVIEW-6479

  1. … 1 more file in changeset.
Add authentication support to HttpServerFixture

This allows to enable authentication on the BuildCache for

integration tests.

+review REVIEW-6479

  1. … 13 more files in changeset.
Add test for build cache preemptive authentication

+review REVIEW-6479

Use the same HttpClient configuration for the HTTP build cache

+review REVIEW-6478

  1. … 9 more files in changeset.
Rework description use

+review REVIEW-6464

  1. … 9 more files in changeset.
Make sure we get an UnknownHostException

On my computer I got NoRouteToHostException instead, because for some reason `invalid` resolved to

+review REVIEW-6464

Use a guaranteed invalid hostname

+review REVIEW-6461

Fail the HttpBuildCache on UnknownHostException

We considered this recoverable and it is not.

+review REVIEW-6461

  1. … 1 more file in changeset.
Fix HTTP build cache integration tests to not expect cached jars

+review REVIEW-6457

Use BuildCacheServiceFactory to instantiate BuildCacheService

This restores the BuildCacheServiceFactory and allows authors of build cache

implementations to create their instance as they need to.

This keeps some of the features of the previous change (direct creation of

BuildCacheService) by changing the register() to similar (requiring types

vs instances).

+review REVIEW-6448

  1. … 15 more files in changeset.
Initial implementation of composite build cache

We add a composite build cache which can be used to pull

from multiple caches and push to one cache. Currently, it

will be used to pull from local and remote caches and

push to one of the two.

+review REVIEW-6450

  1. … 9 more files in changeset.
Add Accept headers to GET requests for the build cache service

+review REVIEW-6446

  1. … 1 more file in changeset.
Remove BuildCacheServiceFactory and inject into the BuildCacheService

Instead of allowing a user to specify a user-created BuildCacheServiceFactory and then

allowing them to create their own BuildCacheService implementation, add a register method

to BuildCacheConfiguration that takes the configuration type and build cache service

implementation type.

We control the creation of all the necessary pieces and injection of dependencies.

The main side effect of this is that the build cache implementation's constructor must be

done in a particular way and annotated with @Inject.

+review REVIEW-6448

  1. … 17 more files in changeset.
Send build cache content type and gradle version

In the HTTP build cache, send along extra diagnostic information (like Gradle version)

and the version of the cache entry that is being uploaded (Content-Type).

+review REVIEW-6446

  1. … 2 more files in changeset.
Allow setting credentials for HTTP build cache

+review REVIEW-6441

  1. … 5 more files in changeset.
Nicer DSL in tests

+review REVIEW-6437

  1. … 1 more file in changeset.
Remove InvalidTaskOutputCachingBuildCacheKey

+review REVIEW-6435

  1. … 9 more files in changeset.
Introduce build cache configuration DSL

This introduces a public DSL available via Settings that allows the user to configure their build cache:

buildCache {

remote(HttpBuildCache) {

url = "http://localhost:8080/cache/"



The current implementation allows the configuration of a local _or_ a remote cache. This will later be changed so a local cache can be used in tandem with a remote cache. Currently if a remote cache is specified and enabled, then the local cache is ignored. If a remote cache is specified via `remote(Class)` or `remote(Class, Action)`, then the previously specified remote is forgotten completely.

The local cache is by default enabled and allows pushing data to it when the `org.gradle.cache.tasks` system property is set to true. This will later be replaced by a command-line switch.

Plugins can use an SPI to register further build cache types (i.e. subtypes of BuildCache). Build cache implementations can expose their own configration options via properties and methods on the BuildCache subtype.

+review REVIEW-6437

  1. … 40 more files in changeset.
Rename BuildCache to BuildCacheService

BuildCache will be used as the suffix for the configuration objects.

    • -0
    • +249
  1. … 42 more files in changeset.
Use HttpStatus instead of int constants

+review REVIEW-6413

  1. … 1 more file in changeset.