OutputFilesTaskStateChangesTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Separate snapshotting and comparing task executions (#2735)

This way we have all the snapshotting logic in one place, and the comparison logic in another. Makes the code much simpler and easier to extend and test.

    • -53
    • +0
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 42 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.

    • -1
    • +1
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 35 more files in changeset.
Bust up OutputFileSnapshotter

Moved relevant pieces closer to where they are actually used. This allowed simplifying the code somewhat.

+review REVIEW-6547

    • -7
    • +5
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 14 more files in changeset.
Rename org.gradle{.api.resources -> }.normalization

+review REVIEW-6540

    • -1
    • +1
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 49 more files in changeset.
Rename ResourceNormalization to InputNormalization

+review REVIEW-6540

    • -2
    • +2
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 42 more files in changeset.
Polish resource normalization implementation

+review REVIEW-6250

    • -3
    • +3
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 26 more files in changeset.
Pass immutable normalization strategies object

Instead of passing around the mutable configuration for resource

normalization we create an immutable container for the

normalization strategies and use this instead.

+review REVIEW-6520

    • -3
    • +3
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 35 more files in changeset.
Can ignore files in directories

    • -2
    • +4
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 32 more files in changeset.
Introduce FileCollectionSnapshotterRegistry

This will allow us to register special file collection snapshotters.

+review REVIEW-6303

    • -4
    • +8
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 27 more files in changeset.
Simplify code: OutputFilesSnapshotter

This class doesn't need to be a bona fide FileCollectionSnapshotter - all it did anyway was to delegate those methods to a real FileCollectionSnapshotter. Untie this.

+review REVIEW-6303

    • -4
    • +6
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 9 more files in changeset.
Reorganize test code

+review REVIEW-6303

    • -0
    • +47
    ./OutputFilesTaskStateChangesTest.groovy
  1. … 3 more files in changeset.