Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Wrap calls to get the meta-data of a resource during dependency resolution in a build operation of type `ExternalResourceReadMetadataBuildOperationType`.

  1. … 2 more files in changeset.
Revert to ungrouped plain output

Only the stderr output event listener is getting the

EndOutputEvent which caused JVMs to be left open (as evidenced

by the failure of ToolingApiIntegrationTest).

Continue use of ungrouped ProgressLogEventGenerator and find a

better way to do this in a future version of Gradle.

    • -0
    • +194
    ./org/gradle/internal/resource/DownloadBuildOperationFiringExternalResourceDecorator.java
  1. … 10 more files in changeset.
Moved a class to remove package cycle.

    • -0
    • +30
    ./org/gradle/internal/resource/LocalResource.java
  1. … 13 more files in changeset.
Moved `put()` and `list()` from `ExternalResourceRepository` to `ExternalResource`.

  1. … 16 more files in changeset.
Replaced `ExternalResourceRepository.getResourceMetaData()` with `ExternalResource.getMetaData()`.

Also changed the file backed implementation of `ExternalResource` to use `FileSystem.stat()` to calculate the file meta-data, rather than using the `File` API.

  1. … 47 more files in changeset.
Rework “network” build operations to model resource operations instead.

  1. … 4 more files in changeset.
Rename network request build operation and drop unused attributes.

    • -0
    • +237
    ./org/gradle/internal/resource/BuildOperationFiringExternalResourceDecorator.java
  1. … 4 more files in changeset.
Show remote resource downloads in the console 'work in progress' section.

  1. … 1 more file in changeset.
Removed unused `ExternalResource.isLocal()`

  1. … 3 more files in changeset.
Further reworking external resource APIs to remove `ExternalResourceRepository.getResource()` and corresponding `ExternalResource.close()`.

Now, all `ExternalResource` implementations are live, rather than some implementations being live and some being an awkward one shot instance.

  1. … 14 more files in changeset.
Started reworking `ExternalResourceRepository` so that no network request spans more than one method call on `ExternalResourceRepository` or `ExternalResource`.

This is work in progress and this change leaves `ExternalResourceRepository` in an intermediate state between the old and new behaviours. A subsequent change will remove the old behaviours entirely.

The semantics of the `ExternalResourceDownloadBuildOperationType` have changed in several ways:

- The build operation wraps the entire network request, rather than the "download" portion of the request.

- The build operation events are fired regardless of whether the network request was successful or not.

- No content type or content length are included in the operation's detail.

This build operation type is yet to be refactored or documented to reflect these changes.

  1. … 8 more files in changeset.
Pushed usage of `ExternalResourceName` instead of `URI` to represent a remote resource closer to the origin.

  1. … 22 more files in changeset.
Reorganise the rich build operation details/results type to further decouple from producer side semantics.

    • -0
    • +155
    ./org/gradle/internal/resource/DownloadBuildOperationFiringExternalResourceDecorator.java
  1. … 81 more files in changeset.
Reuse `FileUtils#canonicalize`

    • -10
    • +3
    ./org/gradle/internal/resource/UriTextResource.java
Reverted changes from PR#1900

  1. … 24 more files in changeset.
Convey the number of content bytes read in the download build operation result.

This provides a more (but not absolutely) reliable indicator of bytes transferred than the advertised content length pre transfer.

    • -0
    • +65
    ./org/gradle/internal/resource/ExternalResourceReadResult.java
  1. … 10 more files in changeset.
Made settings.gradle apply works (and added test)

  1. … 14 more files in changeset.
Javadocs.

  1. … 2 more files in changeset.
Javadocs.

  1. … 1 more file in changeset.
Cache script display name

    • -7
    • +15
    ./org/gradle/internal/resource/UriTextResource.java
Clean up cached artifact transform outputs on failure or crash.

  1. … 6 more files in changeset.
Javadocs.

    • -1
    • +17
    ./org/gradle/internal/resource/local/FileStore.java
  1. … 1 more file in changeset.
Introduced an abstraction that represents a snapshot of a resource's content and changed `IncrementalFileSnapshot` to extend this.

  1. … 9 more files in changeset.
Merge pull request #690 from kiddouk:story/S3-repository-can-be-configured-to-authenticate-using-AWS-EC2-instance-metadata

S3 repository can authenticate using AWS EC2 instance metadata

* This is related to https://github.com/gradle/gradle/blob/c2dc9979706e6b3beca13f1de860834e9255fb1b/design-docs/finding-and-using-credentials.md#story-an-s3-repository-can-be-configured-to-authenticate-using-awss-ec2-instance-metadata

* Note that the AWS S3 Client implementation will now use the following

credentials (in this specific order)

- Environment (AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY,

AWS_SESSION_TOKEN)

- Java System Properties - aws.accessKeyId and aws.secretKey

- Credential profiles file at the default

location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI

- Instance Profile Credentials - delivered through the Amazon EC2

metadata service

* The implementation assumes that only ONE authentication can be used

per s3-resource at a time

* This patch enforces that each Authentication now declares

`requiresCredentials` to be explicit

Integration tests:

Note that we cannot mock the instance meta data since it uses the ip

169.254.169.254 so we mock the system properties that the client

CredentialsProviderChain will look for.

  1. … 22 more files in changeset.
Only list direct children form the S3 ExternalResourceLister

- Document the contract of ExternalResourceLister

- Fix the S#Stub server to return the correct file contents and common prefixes in a listing

- Simplify S3 resource name extraction

+review REVIEW-5988

  1. … 10 more files in changeset.
Disable caching for Jar URIs opened by `UriTextResource`

The underlying caching of `JarURLConnection` will prevent the file handle

to the backing Jar file being released even when the input stream is

closed. This change disables caching for JarURLConnection when loading

via `UriTextResource`.

This change will have a performance impact for any UriScriptSource created

with a URL like `jar://my-jar-file.jar!/build-script.gradle`. On inspection

this will only occur if such a URL is used in an `apply from: ...` construct.

This fix should address leaking file handles in `UriTextResourceTest`.

  1. … 2 more files in changeset.
Add ability to reset cache statistics

+review REVIEW-5952

  1. … 1 more file in changeset.
Add ability to record remote access statistics

This plugin introduces optional recording of statistics of access for external resources.

To use it, you must run the build with `-Dgradle.externalresources.recordstats=(none|count|trace)` where:

- `count` will only record the number of times resources are fetched

- `trace` will record the number of times _each_ URI is accessed

The trace mode can have a significant impact on memory usage since all URIs are recorded.

By default, statistics are not recorded (equivalent to use `none` as the statistics recorder).

+review REVIEW-5952

  1. … 1 more file in changeset.
Add ability to revalidate external resource requests

The argument allows Cache-Control: max-age=0 to be added in cases where it's desirable for artifact repositories or caching proxies to revalidate requests:

- Listing version metadata

- Resource has exceeded it's cache lifetime on disk, such as dynamic/snapshot dependencies or when --refresh-dependencies is specified

  1. … 23 more files in changeset.
Use consistent exceptions and error messages when a resource cannot be read.

  1. … 6 more files in changeset.