Closed axaluss closed 2 years ago
There are some concurrency issues with current coursier. E.g. https://github.com/coursier/coursier/issues/1815#issuecomment-736738585 or https://github.com/coursier/coursier/issues/1818. Question is, if we hit one of the existing or even a new one.
in my build setup also only scala 2.11 builds were affected. 2.12 was fine
This issue is even more close to ours: https://github.com/coursier/coursier/issues/2022
Unfortunately, this isn't fixed by #1510.
Here is a reproducer:
import mill._, scalalib._
object foo extends Cross[Foo](1.to(20).map(_.toString): _*)
class Foo(nr: String) extends JavaModule {
def ivyDeps = Agg(ivy"org.slf4j:slf4j-api:1.7.25")
}
$ rm -r ~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/ ; mill -i clean ; mill -i -j 16 -d __.resolvedIvyDeps
No mill version specified.
You should provide a version via '.mill-version' file or --mill-version option.
Using mill version 0.10.1
Compiling /home/lefou/work/opensource/mill/repro-parallel-fetch/build.sc
[1/1] clean
No mill version specified.
You should provide a version via '.mill-version' file or --mill-version option.
Using mill version 0.10.1
Using explicit system properties: Map()
[#00] [108/120] foo[16].resolvedIvyDeps | Downloading [2/2] artifacts (~40/40 bytes)
13 targets failed
foo[1].resolvedIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
org.slf4j:slf4j-api:1.7.25
not found: /home/lefou/.ivy2/local/org.slf4j/slf4j-api/1.7.25/ivys/ivy.xml
concurrent download: https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom
foo[2].resolvedIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
org.slf4j:slf4j-api:1.7.25
not found: /home/lefou/.ivy2/local/org.slf4j/slf4j-api/1.7.25/ivys/ivy.xml
concurrent download: https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom
foo[3].resolvedIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
org.slf4j:slf4j-api:1.7.25
not found: /home/lefou/.ivy2/local/org.slf4j/slf4j-api/1.7.25/ivys/ivy.xml
concurrent download: https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom
...
🤔
Disabling the retry in CoursierSupport.scala
, it seems I can't reproduce that issue anymore on the current main
branch (via this repo). Downgrading coursier to 2.1.0-M5
alongside that (version used in Mill 0.10.1
, used in the example above) doesn't allow to reproduce the issue either. So it seems changes in Mill since 0.10.1
, other than the retry, fixed the issue too.
I can reproduce the issue with Mill 0.10.1
(with both downloaded and locally built assemblies). In Mill 0.10.2
, the retry kicks in and works around it. Checking out the Mill 0.10.1
sources and manually bumping coursier to 2.1.10
fixes the issue. So changes in coursier since 2.1.0-M5
also fixed the issue.
There are still some concurrency issues in coursier we caught in Mill and needed to workaround with retry. E.g.
It's probably not worth in digging these old resolved issues though. We should concentrate on fixing open issues.
I'm seeing randomly failing dependency downloads since upgrade to 0.9.3
another run
another run
By chance eventually it resolves.