Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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.

    • -0
    • +2
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  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

    • -12
    • +64
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  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

    • -86
    • +28
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  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 127.0.0.1.

+review REVIEW-6464

    • -2
    • +2
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
Use a guaranteed invalid hostname

+review REVIEW-6461

    • -2
    • +2
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
Fail the HttpBuildCache on UnknownHostException

We considered this recoverable and it is not.

+review REVIEW-6461

    • -0
    • +17
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  1. … 1 more file in changeset.
Fix HTTP build cache integration tests to not expect cached jars

+review REVIEW-6457

    • -48
    • +2
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
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

    • -2
    • +6
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  1. … 9 more files in changeset.
Add Accept headers to GET requests for the build cache service

+review REVIEW-6446

    • -18
    • +26
    ./http/internal/HttpBuildCacheServiceTest.groovy
  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

    • -11
    • +97
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  1. … 5 more files in changeset.
Nicer DSL in tests

+review REVIEW-6437

    • -2
    • +2
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  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

    • -7
    • +6
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
  1. … 40 more files in changeset.
Rename BuildCache to BuildCacheService

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

    • -249
    • +0
    ./http/internal/HttpBuildCacheIntegrationTest.groovy
    • -0
    • +249
    ./http/internal/HttpBuildCacheServiceIntegrationTest.groovy
    • -0
    • +176
    ./http/internal/HttpBuildCacheServiceTest.groovy
    • -176
    • +0
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 42 more files in changeset.
Use HttpStatus instead of int constants

+review REVIEW-6413

    • -9
    • +10
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 1 more file in changeset.
Handle build cache HTTP status codes as recoverable/non-recoverable

+review REVIEW-6413

    • -3
    • +78
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 1 more file in changeset.
Add "build" to description of HttpBuildCache

+review REVIEW-6406

    • -1
    • +1
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 1 more file in changeset.
Make incubating messages more useful for build cache

    • -1
    • +1
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 5 more files in changeset.
Check for password too

+review REVIEW-6404

Handle review items for BuildCacheException

+review REVIEW-6404

    • -1
    • +12
    ./http/internal/HttpBuildCacheIntegrationTest.groovy
    • -1
    • +2
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 9 more files in changeset.
Introduce BuildCacheException for BuildCache

- BuildCacheExceptions are considered non-fatal.

- When Gradle receives a BuildCacheException when retrieving something from the cache,

it will execute a task as normal.

- When Gradle receives a BuildCacheException when storing something into the cache, it

will log a failure, but allow the build to succeed.

- When Gradle receives any other kind of exception, the build will fail.

    • -2
    • +8
    ./http/internal/HttpBuildCacheTest.groovy
  1. … 13 more files in changeset.