Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Calculate Merkle hashes for PhysicalSnapshots

    • -1
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 21 more files in changeset.
Retain hierarchical structure in file system mirror (#5844)

The `FileSystemSnapshotter` now returns a root for each snapshotted file, possible containing all the children in hierarchy as the directory would no the file system.

This PR also contains some performance related changes:

- Stop interning path segments: That was only necessary when we stored the same path segments in many RelativePath objects. We don't do this any more, so interning should not be necessary and make things faster.

Actually, up-to-date assemble on largeMonolithicJavaProject (parallel false)

is about 40ms faster with this change (2.5 %).

- Don't use IndexedNormalizedFileSnapshots: It seems like there are no real performance gains by using IndexedNormalizedFileSnapshots.

    • -24
    • +21
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -18
    • +23
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 130 more files in changeset.
Mark files accessed when storing them

Prior to this commit files were only marked accessed when loading them.

This relied on the implicit knowledge that the file's modification

timestamp was used to keep track of access. Now that we use a separate

journal we need to mark it accessed when it's created as well.

    • -5
    • +67
    ./local/internal/DirectoryBuildCacheServiceTest.groovy
  1. … 1 more file in changeset.
Use file access time journal for build cache

Reuse `DefaultFileAccessTimeJournal` in for tracking file access in

`DirectoryBuildCacheServiceFactory` for consistency with other caches

and to reduce the number of file operations.

Resolves gradle/gradle-private#1337.

    • -1
    • +3
    ./local/internal/DirectoryBuildCacheServiceFactoryTest.groovy
  1. … 2 more files in changeset.
Remove FileCollectionSnapshot.getFiles

    • -2
    • +0
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 4 more files in changeset.
Clean up least recently used entries in artifacts file store

The files in the artifacts file store cache are now automatically

cleaned up based on a least recently used strategy. The structure in

the cache is as follows:

- modules-2

- files-2.1

- groupId

- artifactId

- version

- hash1 (*)

- file

- hash2 (*)

- file

The cache now keeps track of files accessed inside the marked hash

directories. The cleanup action then deletes all such files that have

not been accessed in the last 30 days.

    • -1
    • +3
    ./local/internal/DirectoryBuildCacheServiceTest.groovy
  1. … 15 more files in changeset.
Dogfood ImmutableFileCollection in tests (#4972)

Reduce the number of static factory methods from ImmutableFileCollection

Use layout.fileFor() in a smoke test

    • -2
    • +2
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 32 more files in changeset.
Allow build cache to be enabled programatically for non root builds (#4936)

    • -1
    • +18
    ./internal/controller/BuildCacheControllerFactoryTest.groovy
    • -1
    • +1
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
  1. … 9 more files in changeset.
Fix non-detected stale output file removal (#4264)

    • -5
    • +5
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 20 more files in changeset.
Initial implementation of load()

    • -0
    • +75
    ./BuildCacheService2Test.groovy
  1. … 21 more files in changeset.
Extract AbvstractLoadCommand

    • -3
    • +3
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -3
    • +3
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
    • -2
    • +2
    ./internal/tasks/TaskOutputPackerUtilsTest.groovy
  1. … 30 more files in changeset.
Expose only local state to cache load command

    • -14
    • +3
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 2 more files in changeset.
Remove some wrong timing loggings (#3860)

* Remove some wrong timing loggings

The time which was captured for up-to-date checks is wrong, since it

did not include actual snapshotting any more.

The time captured how long it took to load/unpack from the cache now

would have included the time it took to snapshot the inputs, too.

These timings are much better captured by the corresponding build

operations, so we remove the log entries for now.

Signed-off-by: Stefan Wolf <wolf@gradle.com>

    • -3
    • +3
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 7 more files in changeset.
Use age-based strategy to clean local build cache

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

    • -2
    • +2
    ./local/internal/DirectoryBuildCacheServiceFactoryTest.groovy
  1. … 13 more files in changeset.
Emit the origin build invocation ID and execution time of tasks reusing outputs (#3846)

Previously, we emitted the build invocation ID for both up-to-date and from-cache,

but emitted the original execution time only for from-cache. This is now unified.

Moreover, these values now reflect the true origin when from-cache outputs are reused as part of incremental build. Previously, the values from the first build to consider the task up-to-date after a from cache was considered as the origin for subsequent executions. Now, the origin information is kept from the from-cache execution.

    • -5
    • +0
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
    • -4
    • +4
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 45 more files in changeset.
Support rich task inputs (#3720)

@Nested inputs are now discovered based on the runtime type instead of the static type.

    • -12
    • +9
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 150 more files in changeset.
Move creating CleanupAction back to user

    • -2
    • +2
    ./local/internal/DirectoryBuildCacheServiceFactoryTest.groovy
  1. … 4 more files in changeset.
Relax property name requirements (#3739)

Previously, property names for file inputs and outputs had to be valid Java

identifiers, and nested properties were allowed to use dots ('.') to separate

the elements of the property's name. This was required so outputs could be

easily represented as file and directory names inside TAR archives.

This change removes this restriction, and instead escapes property names when

archiving the task outputs.

    • -2
    • +39
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 5 more files in changeset.
Clean up partial files after errors and during GC

Previously '.part' files were left behind after local cache failures, because we expected they would be useful in debugging these cases. That never happened, so we are now removing them even if there's an error, and also during garbage collection.

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

    • -2
    • +2
    ./local/internal/DirectoryBuildCacheServiceTest.groovy
  1. … 5 more files in changeset.
Detangle PersistentCache cleanup action dependencies

- Introduce a new CleanupAction

- Decorate CleanupActions via CleanupActionFactory

- Remove the special case for keeping .part files

- Ask PersistentCache for "reserved" files, these files should never be cleaned up

- Reduce the number of build operations produced when cleaning a PersistentCache

Signed-off-by: Sterling Greene <sterling@gradle.com>

    • -2
    • +6
    ./local/internal/DirectoryBuildCacheServiceFactoryTest.groovy
  1. … 23 more files in changeset.
Report original execution time in unpack operation results

    • -0
    • +5
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
  1. … 9 more files in changeset.
Rename local load/store cache methods to reflect they work locally

This should clean up some of the confusion as to what happens when `store()` or `load()` is called.

    • -2
    • +2
    ./internal/controller/BuildCacheControllerFactoryTest.groovy
    • -10
    • +10
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
  1. … 4 more files in changeset.
Document creating temp files for caching a bit better

    • -1
    • +1
    ./internal/controller/BuildCacheControllerFactoryTest.groovy
    • -1
    • +1
    ./internal/controller/DefaultBuildCacheControllerTest.groovy
  1. … 5 more files in changeset.
Remove task's local state after loading from cache

    • -3
    • +30
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 14 more files in changeset.
Merge branch 'release'

    • -0
    • +39
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 7 more files in changeset.
Fix Windows tests

    • -0
    • +3
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 1 more file in changeset.
Fix URI-quoted chars in cached outputs bug

    • -0
    • +36
    ./internal/tasks/TarTaskOutputPackerTest.groovy
  1. … 2 more files in changeset.
Create directories when registering outputs via the runtime API, too (#2929)

Previously we were creating output directories only for outputs registered via task property annotations.

    • -3
    • +3
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -3
    • +3
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
    • -2
    • +2
    ./internal/tasks/TaskOutputPackerUtilsTest.groovy
  1. … 30 more files in changeset.
Simplify time handling internally and for build scans (#2857)

* Don't make TimeProvider Serializable.

This isn't safe and generally doesn't make sense.

* Extract and promote the concept of a build timer.

This was previously not well defined and being overlaid with the concept of when a user/tool requested something, which is not always the same thing.

* Pare down the deprecated org.gradle.util.Clock down to the minimum required.

Internal usage is replaced by a `getStartTime()` directly on BuildRequestContext.

What is left is only kept for backwards compatibility with scans.

* Rename TimeProvider to Clock.

* Move BuildExecutionTimer out of baseServices into core, and into a better package.

* Remove unused.

* Simplify the time package by merging types.

* Prevent the client's build started timestamp from being later than when the provider received the build request.

* Provide a dedicated mechanism for conveying the build start time to build scans.

* Consolidate the ways of formatting durations.

  1. … 179 more files in changeset.
Use our own hashing architecture, take 2 (#2817)

This replaces Guava's hashing. We need this for two reasons:

- it allows the addition of custom hash functions, like BLAKE2b which would not be possible with Guava's closed design

- it fixes a few performance issues that Guava only fixes in version 20 (which we can't upgrade to right now, because we still need to support Java 5 in places)

    • -7
    • +7
    ./internal/tasks/TarTaskOutputPackerTest.groovy
    • -1
    • +1
    ./internal/tasks/TaskOutputCacheCommandFactoryTest.groovy
  1. … 158 more files in changeset.