-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[3.8.x] [MNG-7476] Display a warning when an aggregator mojo locks other mojos executions #736
Conversation
Fwiw, I've raised #737 to make the console output adapt to the terminal width. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now interferes/depends on the other PR, do you want to keep this one as-is or use the old style for now until the message formatting is properly defined/discussed?
maven-core/src/main/java/org/apache/maven/internal/MessageHelper.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/internal/MessageHelper.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Outdated
Show resolved
Hide resolved
I'd rather commit that one to 3.8.x and other branches asap and investigate the other PR for 3.9.x and master once this one is committed. |
Alright, will retest tomorrow. |
maven-core/src/main/java/org/apache/maven/internal/MessageHelper.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/internal/MessageHelper.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/internal/MessageHelper.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Outdated
Show resolved
Hide resolved
e37727f
to
1b2cbc4
Compare
Fwiw, I've reviewed the original MNG-7433 issue and especially the reproducer and found out the issue was just a bug in the original project locking and not simply a missing warning. The lock was acquired too early, so that forked lifecycles could not obtain the lock for the project at all. |
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Outdated
Show resolved
Hide resolved
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Show resolved
Hide resolved
@gnodet Can the reproducer be turned into an IT? |
I suppose. The failure would lead to a deadlock. is there a timeout that can be set in the invoker ? |
@slawekjaranowski Do you know this from top of your head? |
|
4496c44
to
3786e53
Compare
There is no implementation for timeouts in Verifier. |
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java
Show resolved
Hide resolved
Moved message helper to #746. |
66cbbb9
to
a6e0854
Compare
I have checked the source code of verifier. The lower level library supports timeouts in seconds, so we just need to wrap this with verifier. The JVM must be forked for this, so if timeout is > 0 and forkMode is auto, then autoforking must happen. |
Polished commits, they are now subsequently, standalone testable (tested actually). As with previous releases I have created a JIRA issue which addresses the problem which in turn solves the regression. Immediately visible in the changelog. This PR works decently with the fixed IT PR. Only one open question needs to be answered by @gnodet. Will align IT as well. Thank you for the effort. So this does not require squashing, but addresses two subsequent issues. Just need upporting to 3.9.x and master. |
IT aligned and blessed. |
@michael-o I've slightly refactored the |
This looks good and makes sense. Totally scoped in the |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, let's roll!
This needs to be applied to 3.8.x, 3.9.x and master branches