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.
05 Nov 17 7986444a11df4c29ae06881530c5132fa25a664f
Treat various kinds of dependency resolution failures in more consistent ways.
- When a non-lenient view is used as a task input, then propagate any failure to select a configuration in the dependency graph during task graph calculation, rather than suppressing these kinds of failures and propagating later when the files happen to be queried. This now happens consistently whether fluid dependencies are used or not. The only difference between these is how much of the graph is traversed at task graph calculation time.
- When a lenient view is used as a task input, suppress configuration selection failures during task graph calculation and instead present them in `ArtifactCollection.failures`. Do this consistently regardless of whether fluid dependencies are used or not. Previously this kind of failure was propagated during task graph calculation for lenient views.
Also changed the error message on resolution failure to include what kind of query was being performed at the time to trigger the failure.
From an implementation point of view, separated the handling of selection failures from the code that produces the legacy resolution result so that this handling can be reused when the legacy result is not required (such as, say, when calculating the task graph).
29 May 17 cd7035ef3c0d461dc94f290bf56bb5ae638e7d20