MavenDynamicResolveIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -2
    • +2
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 32 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -2
    • +2
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 32 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -6
    • +19
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 95 more files in changeset.
wip - fix more tests

    • -6
    • +19
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
wip - fix more tests

    • -6
    • +19
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 45 more files in changeset.
wip - fix more tests

    • -6
    • +19
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
Partial ordering of module selectors

With this commit, we do a partial sort on the selectors, where we place

the dynamic selectors at the end compared to the other ones.

This allows a more efficient resolution in some corner cases but is

mostly preparation work for follow up changes.

    • -0
    • +29
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 7 more files in changeset.
Partial ordering of module selectors

With this commit, we do a partial sort on the selectors, where we place

the dynamic selectors at the end compared to the other ones.

This allows a more efficient resolution in some corner cases but is

mostly preparation work for follow up changes.

    • -17
    • +0
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 7 more files in changeset.
Increase default timeout to 60 seconds in AbstractHttpDependencyResolutionTest (#5212)

Before 4.3, Gradle didn't set timeout for underlying HttpClient,

which used default value (system default). Gradle 4.3 introduced

default timeout 30s, which resulted in lots of flaky tests (localhost

read timeout). Now we try to increase this value to 60s.

Also see https://github.com/gradle/gradle-private/issues/1192

    • -1
    • +3
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 7 more files in changeset.
Improve error reporting in case no matching dynamic version is found

This commit improves rendering of errors in case resolution fails because

all versions in a dynamic range are evicted, and that at least one of the

evicted versions was evicted because of attribute matching. The error will

now report the attributes on each tested version, as well as the requested

attributes.

For this, the module not found exception has been updated to carry more

context, and now makes use of the tree formatter for consistency with other

exceptions in the codebase.

    • -3
    • +3
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 37 more files in changeset.
Update integration test for fixed behaviour

    • -2
    • +0
    ./MavenDynamicResolveIntegrationTest.groovy
Add test demonstrating inadequacy of current implementation

By returning a rejected version as 'resolved', we are failing to search for

a non-rejected version in subsequent repositories.

    • -0
    • +36
    ./MavenDynamicResolveIntegrationTest.groovy
Gradle should fail resolution from subsequent repositories on critical errors (#3412)

    • -15
    • +12
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 15 more files in changeset.
Merge branch 'release'

    • -23
    • +67
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 4 more files in changeset.
Only abort repository lookups on critical resolution failure

Gradle 4.3 introduced an improvement where an error in resolving a module from

one repository would prevent Gradle from searching for that same module in

subsequent repositories (see #2853).

However, the change to abort searching repositories on _all_ unrecognised errors

proved to be too aggressive. With this change, only repository timeout errors

will prevent Gradle from searching for a module in a subsequent repository.

These timeout errors are considered 'critical' and will blacklist the repository

and abort resolution for that module.

In a future release of Gradle, it is likely that we will expand the set of resolution

failures that we consider 'critical' to include server errors (HTTP 500) and the

like. This commit keeps the set small to miminize impact on the 4.3.1 release.

    • -23
    • +67
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 9 more files in changeset.
Revert code that fails build upon first unexpected HTTP resolve error

    • -6
    • +5
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Merge branch 'release'

    • -88
    • +64
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 1 more file in changeset.
Add blacklister to repository management (#3047)

Fix https://github.com/gradle/gradle/issues/2853

Previous versions of Gradle would fall through to the next repository

if resolution in one repository failed. This may cause potentially

indeterministic resolution result. This PR changes this behaviour

and will explicitly rethrow exceptions which occur in dependency

resolution instead of quietly continue to the next repository.

What's more, this PR introduces a RepositoryBlacklister. Exceptions

thrown during dependency resolution are categoried as follows:

1. Caused by HTTP error status code (other than 2xx/3xx/404)

These exceptions would be considered as "recoverable" since

the server seems still to be able to respond.

2. Caused by other IOException/UncheckedIOException

These exceptions would be considered as "unrecoverable"

and the repository would be blacklisted in the build.

    • -88
    • +64
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 19 more files in changeset.
Some changes to `MavenModule` test fixtures to allow an artifact in a module to be defined using a path relative to the module directory, moved up some methods to more general interfaces, and some other tidy-ups.

    • -5
    • +5
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 13 more files in changeset.
Make `MavenMetadataLoader` use `CacheAwareExternalResourceAccessor`

This allows caching the calls to get `maven-metadata.xml`, and, since we now coordinate access to remote

resources through `CacheAwareExternalResourceAccessor`, reduce the number of remote calls in case several

projects are resolved in parallel: metadata loader honors the contract of not downloading the same

resource (`maven-metadata.xml`) concurrently.

    • -1
    • +1
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 21 more files in changeset.
Added more detail to the 'could not find any matches for selector' error message, to distinguish between:

1. No versions were found.

2. Some candidate versions were found but none matched the selector (and what those versions were).

3. Some matching versions were found by all were rejected by component selection rules (and what those versions were).

Changed ModuleVersionResolveException constructor so that it does not pass the provided message through String.format().

    • -1
    • +1
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 22 more files in changeset.
Separated the reuse of cached version listing and cached meta-data when resolving dynamic version, so that the cached version list can be used when the meta-data for a candidate is not cached, and vice versa.

Updated a bunch of int tests to remove expected requests that are no longer required.

    • -5
    • +0
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 10 more files in changeset.
Wrap all ModuleComponentRepositoryAccess chains in an error handling wrapper, so that failures are attached to the result rather than propagated.

Changed BuildableComponentSelectionResult so that failures can be attached to the result, use this when the meta-data for a candidate cannot be resolved.

Swapped order of 'missing' locations so that the version list URL appears first in the list (to reflect the order we tried things in).

    • -1
    • +1
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 11 more files in changeset.
Some test coverage to reporting locations when we can't resolve something.

    • -0
    • +1
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Fixed error reporting when resolving a version selector that requires meta-data and we hit a candidate that is missing. Added a bunch more int test coverage for problems when resolving dynamic versions.

    • -3
    • +123
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
move integration test to MavenLatestResolveIntegrationTest

+review REVIEW-5225

    • -59
    • +0
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 1 more file in changeset.
Add integration test for resolving transitive dependencies declared with RELEASE or LATEST

this exposes an issue (related to https://issues.gradle.org/browse/GRADLE-3097)

+review REVIEW-5225

    • -0
    • +61
    ./MavenDynamicResolveIntegrationTest.groovy
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +283
    ./MavenDynamicResolveIntegrationTest.groovy
  1. … 1384 more files in changeset.