MavenBrokenRemoteResolveIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +6
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 6 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +6
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 12 more files in changeset.
Improve error message when build fails because of missing metadata

Gradle 6.0 removed the "artifact" metadata source by default.

This means that if a module is published _only_ with an artifact,

previous version of Gradle would find it, but 6.0 would fail with

a module missing exception.

The problem is that it's hard to realize that the issue comes

from the change of this default artifact sources.

This commit tries to improve the situation by recognizing that

a failure is related to not finding metadata, and in this case

would suggest that if the metadata is missing, it is still

possible that the jar is present.

The drawback of this approach is that we're unsure: if, for

some reason, the module is _really_ absent, then we gave a

wrong advice. This means, in particular, in case of wrong

coordinates.

    • -0
    • +6
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 12 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
    ./MavenBrokenRemoteResolveIntegrationTest.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
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 32 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 95 more files in changeset.
wip - fix more tests

    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
wip - fix more tests

    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 14 more files in changeset.
wip - fix more tests

    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 45 more files in changeset.
wip - fix more tests

    • -13
    • +0
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 46 more files in changeset.
Implement retries with exponential backoff

This commit reworks the strategy used to blacklist repositories. In the case

an error occurs when trying to access a remote resource, if the error is not

a missing resource, we're going to retry twice before actually blacklisting.

Between each try, we're going to wait, and the wait is increasing between

each trial exponentially. There are two internal parameters which allow

tweaking the behavior:

- `org.gradle.internal.repository.max.retries` (default 3) is the number

of retries (initial included)

- `org.gradle.internal.repository.initial.backoff` is the initial time

before retrying, in milliseconds (default 125)

Fixes #4629

    • -1
    • +145
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 10 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.

    • -12
    • +12
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 37 more files in changeset.
Include each of the dependency graph resolution failures in `ArtifactCollection.failures` when in lenient mode, rather than grouping them together as causes of a single `ResolveException`.

For artifact/file query methods that are not lenient, fail eagerly when the dependency graph cannot be fully resolved, rather than continuing and attempting to resolve the artifacts. This was the previous behaviour of these methods.

Also removed a duplicate from the exception chain when these methods do fail due to a dependency graph problem.

    • -2
    • +2
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 11 more files in changeset.
Add `lenient` option to `artifactView()`

By choosing a lenient view, the returned `FileCollection` or `ArtifactCollection`

will return any resolved files/artifacts, ignoring failures.

    • -2
    • +2
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 10 more files in changeset.
Use doLast instead of left shift operator

Made this change in preparation for deprecating the left shift operator.

+review REVIEW-6236

    • -4
    • +4
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 163 more files in changeset.
Added a little more coverage for caching in the presence of failures during dependency resolution.

    • -0
    • +31
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 1 more file in changeset.
Use component id rather than module version id in the 'required by' paths in resolve exceptions. This provides a better description for local components, and also allows for components that don't have a module version id.

    • -0
    • +185
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 13 more files in changeset.
Tweaked 'could not download artifact' and 'could not find artifact' error messages.

    • -1
    • +1
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 13 more files in changeset.
Renamed subprojects/core-impl to subprojects/dependency-management.

    • -0
    • +97
    ./MavenBrokenRemoteResolveIntegrationTest.groovy
  1. … 1384 more files in changeset.