Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenRewrite does not seem to support concurrent execution of Gradle tasks #244

Closed
vlsi opened this issue Nov 8, 2023 · 1 comment
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@vlsi
Copy link

vlsi commented Nov 8, 2023

What version of OpenRewrite are you using?

org.openrewrite.rewrite.gradle.plugin:6.4.3

How are you running OpenRewrite?

./gradlew rewriteRun

What is the smallest, simplest way to reproduce the problem?

See pgjdbc/pgjdbc#2979

For instance, try running ./gradlew rewriteRun at pgjdbc/pgjdbc@f816b65 "chore: add junit5.JUnit5BestPractices and junit5.CleanupAssertions OpenRewrite recipes"

% ./gradlew rewriteRun

> Configure project :
Building pgjdbc 42.6.1-SNAPSHOT

> Task :pgjdbc-osgi-test:rewriteRun
Validating active recipes
Scanning sources in project :pgjdbc-osgi-test
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]

> Task :benchmarks:rewriteRun
Validating active recipes
Scanning sources in project :benchmarks
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]

> Task :postgresql:rewriteRun
Validating active recipes
Scanning sources in project :postgresql
Using active styles [io.github.pgjdbc.style.Style, org.openrewrite.java.Checkstyle]
All sources parsed, running active recipes: org.openrewrite.java.OrderImports, org.openrewrite.staticanalysis.MissingOverrideAnnotation, io.github.pgjdbc.staticanalysis.CodeCleanup, io.github.pgjdbc.staticanalysis.CommonStaticAnalysis, org.openrewrite.java.testing.junit5.JUnit5BestPractices, org.openrewrite.java.testing.junit5.CleanupAssertions
<===========--> 89% EXECUTING [2m 9s]
> :pgjdbc-osgi-test:rewriteRun > Resolve dependencies of :pgjdbc-osgi-test:rewritetestImplementation
> :benchmarks:rewriteRun > Resolve dependencies of :benchmarks:rewritejmhImplementation
> :postgresql:rewriteRun

What did you expect to see?

I expected that rewrite tasks for different projects could execute concurrently.

What did you see instead?

I captured several thread dumps during the execution of rewriteRun, and it looks like there's only one thread executing OpenRewrite, and the rest are locked.

rewriteRun_multiproject_locking.txt

Are you interested in contributing a fix to OpenRewrite?

@vlsi vlsi added the bug Something isn't working label Nov 8, 2023
@timtebeek
Copy link
Contributor

Hi! Thanks for the suggestion; we have a previous discussion on this topic in

As much as I like the detail you've added here, I'll close this one since the other issue already has some more input into alternatives and what would be needed.

@timtebeek timtebeek added the duplicate This issue or pull request already exists label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
Archived in project
Development

No branches or pull requests

2 participants