Giter VIP home page Giter VIP logo

gradle-apply-concurrency-issue's Introduction

I really like the idea of caches that speed up my builds.

I've been burned by bugs in the caches before, so I started using the --recompile-scripts flag to work around it.

Now I run into intermittent concurrency issues with the build script cache getting cleared while it is still in use.

* What went wrong:
A problem occurred configuring root project 'projectDir-2--73782733'.
> Could not open cp_proj remapped class cache for 7i4myz9tty3a06xwqos5b0lrh (C:\dev\bugs\gradle-apply-concurrency-issue\build\test\userHome\junit9132474214283903594\gradle_user_home--73782733\caches\3.5\scripts-remapped\build_919s7ys18dihczwvx0jvdmj8y\7i4myz9tty3a06xwqos5b0lrh\cp_proj0341ca279e16587311ec2a53cd62afc0).
   > java.io.FileNotFoundException: C:\dev\bugs\gradle-apply-concurrency-issue\build\test\userHome\junit9132474214283903594\gradle_user_home--73782733\caches\3.5\scripts\7i4myz9tty3a06xwqos5b0lrh\cp_proj\cp_proj0341ca279e16587311ec2a53cd62afc0\classes\_BuildScript_.class (The system cannot find the path specified)

I've isolated this down to shared build script code that itself has a buildscript block and written a test that demonstrates the problem. There is a copy of the test reports from my run against Gradle 3.5 at reports/tests/test

I'm left with doing complete isolation on every build with a clean gradle user home and getting no cache advantages or trusting the build script cache, getting rid of --recompile-scripts and moving on to other issues. I guess I have a trust issue.

I've read over similar bug reports like these:

Right now, I have a really mixed environment with builds that range between Gradle 2.5 and Gradle 2.14.1 and plan to start adoption of 3.5.

Looks to me like the strategy proposed by Hemant Gokhale in GRADLE-2795 would be my best plan of attack to prevent concurrent access to Gradle user home in my Jenkins environment and manage the caches so they do not grow without bounds.

It looks like the module cache lock contention issue was solved in 2.13, so once I get all my builds moved up to 2.13 or later, perhaps I can start allowing the multiple executors to share a single cache.

Anything that has changed since his 2013 post that would require some adjustments?

gradle-apply-concurrency-issue's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.