CachedTaskIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add test

Change more tests.

  1. … 40 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 50 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 50 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Fix tests

  1. … 11 more files in changeset.
Address review feedback

  1. … 12 more files in changeset.
Fix tests

  1. … 3 more files in changeset.
Fix core usages of output test fixtures

  1. … 9 more files in changeset.
Address review feedback

  1. … 2 more files in changeset.
De-incubate the build cache

  1. … 11 more files in changeset.
Allow enabling build cache in all integration tests

Signed-off-by: Lóránt Pintér <lorant@gradle.com>

  1. … 27 more files in changeset.
Fix tests

Signed-off-by: Lóránt Pintér <lorant@gradle.com>

  1. … 5 more files in changeset.
Fix other tests that did not expect targetSize for local cache

  1. … 1 more file in changeset.
Simplify output file detection if there are no overlapping outputs (#2490)

If there are no overlapping outputs, we can just use all the declared

outputs as output files and do not need to filter since the task under

question has exclusive access to the directory/files.

We now ignore missing files in output properties, for these two ways

of snapshotting a directory (output file detection and regular snapshotting)

to be identical.

  1. … 40 more files in changeset.
Improve error feedback for build cache errors (#2473)

We shouldn't fail the build when we can't package a task's outputs. We should also not fail the build when unpacking some already downloaded outputs.

If there was a failure during unpacking, we can expect the task's output files to be in a messed up state. If this happens, we explicitly clean all of the task's outputs, update the pre-execution output file snapshots, and force the task to execute in non-incremental mode.

This commit also removes the retry logic we had previously when "recoverable" errors were encountered while downloading or uploading cached results. Instead, all errors (except for the aforementioned failed unpacking cleanup errors) are recoverable, and we simply switch off the cache for the build after the first such error.

  1. … 26 more files in changeset.
Store task state even if task has failed (#2383)

Previously when a failing task created new files, those files would be recognized as overlapping outputs from some unknown source. Overlapping outputs would then cause task output caching to be disabled for the task.

We now persist the task's state even after a failed execution. But in the failure case we only persist the snapshots if there was a change to the outputs. When we do this, we also record that the execution failed. However, if the failing task didn't change its outputs, there is no need to persist its state. This will allow the task to run in incremental mode the next time it's executed.

For tasks that do modify their outputs incremental execution was always disabled the next time they were executed, and this change preserves that behavior.

    • -15
    • +78
    ./CachedTaskIntegrationTest.groovy
  1. … 35 more files in changeset.
Store artifacts from the remote cache in the local cache

When the default local directory build cache is used, we use an optimized

way to store the downloaded artifact in the cache. Using a custom local

cache, or with the local cache disabled, a temporary file will be used

to store the downloaded artifact.

Packing is also separated from uploading to the remote cache. Again,

when the default directory cache is used to store the cached artifact in

the local cache before uploading it to the remote cache. With a custom

local cache, or when a local cache is not enabled, task outputs will be

stored in a temporary file before uploading.

Build operations are emitted separately for packing, unpacking,

uploading and downloading the cache artifact.

  1. … 56 more files in changeset.
Log build cache configuration on `--info`

+review REVIEW-6545

  1. … 3 more files in changeset.
Fix integration test

Fix integration test

Revert "Fix integration tests"

This reverts commit 0cb871df611096494ae24cd9b3a57ab8d1d9e3b1.

  1. … 4 more files in changeset.
Fix integration tests

  1. … 4 more files in changeset.
Fix integration test

+review REVIEW-6525

Nicer way to log build cache description

+review REVIEW-6525

  1. … 4 more files in changeset.
Fix integration tests

+review REVIEW-6525

  1. … 1 more file in changeset.
Merge remote-tracking branch 'origin/master' into ff-finalize-build-cache-configuration

Conflicts:

subprojects/core/src/integTest/groovy/org/gradle/api/tasks/CachedTaskExecutionErrorHandlingIntegrationTest.groovy

subprojects/core/src/main/java/org/gradle/caching/internal/BuildCacheServiceProvider.java

subprojects/core/src/test/groovy/org/gradle/caching/internal/AbstractRoleAwareBuildCacheServiceDecoratorTest.groovy

  1. … 6 more files in changeset.
Consolidate the build cache description responsibility to the service factory.

  1. … 20 more files in changeset.