Wrapper race conditions still an issue


(Chris Doré) #1

It seems that wrapper race conditions are still present, despite the fix in GRADLE-2699.

I have an extremely simple project (same project in two directories):

task wrapper(type: Wrapper) {
    gradleVersion = '1.11'
}

Then I run two instances of gradlew (one in each directory): https://gist.github.com/oesolutions/11271974

I have reproduced this with Gradle 1.5, 1.6 and 1.11.

NOTE: I have not been able to reproduce this when downloading the Gradle distributions from services.gradle.org. When that happens, one instance of the downloads completes faster and no issues are observed. However, because we do not like having our build rely on un-cached external resources, I have copies of the Gradle distributions stored in our internal Artifactory server. When downloading the distributions from this internal server both downloads complete much faster and at about the same time, causing this failure.


(Chris Doré) #2

One additional note; While this probably isn’t a big deal for most developers, it has proven to be an issue for our CI system where more than one job can be triggered at the same time on a single node.