You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by dbmeneses <gi...@git.apache.org> on 2017/07/04 16:09:00 UTC

[GitHub] maven pull request #125: [MNG-5965] Parallel build multiplies work if multip...

GitHub user dbmeneses opened a pull request:

    https://github.com/apache/maven/pull/125

    [MNG-5965] Parallel build multiplies work if multiple goals are given

    This p/r should also fix MNG-5705.
    
    When multiple tasks are given so that they are grouped in different task segments, the MultiThreadedBuilder fails. 
    The reason is that it creates project segments, which is a set of unique pairs of (module, task).
    It then handles each task separately, and it will schedules the build of the task for **all** root module in those pairs, instead of scheduling only the root module which are associated with that particular task.
    
    Example, given the project with the following hierarchy of modules:
    ```
    root
    -- module1
    ```
    
    If we run `mvn task1 task2`, being task2 an aggregating task, we get the following project segments:
       (task1, root), (task1, module1), (task2, root).
    
    The MultiThreadedBuilder will first handle task1, and will schedule the build of: (task1, root), (task1, root).
    Each of these builds will then recursively build it's children, meaning that _task1 will be executed twice for every module in the project_.
    
    This fix changes the builder so that it considers the project segments of each task segment separately, by creating a ConcurrencyDependencyGraph for each task segment.
    
    I believe that MNG-5705 is a consequence of the same problem, because the builder will not count correctly the number of projects that are built because of the shared ConcurrencyDependencyGraph, resulting in a NPE.
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dbmeneses/maven master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven/pull/125.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #125
    
----
commit 9518bb247bb5c9dbc267cdaa3407618178aad1f4
Author: Duarte Meneses <du...@sonarsource.com>
Date:   2017-07-04T15:33:10Z

    [MNG-5965] Parallel build multiplies work if multiple goals are given

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by ifedorenko <gi...@git.apache.org>.
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
  
    Can you provide a regression test that demonstrates the problem and the fix?
    
    Semi-related, I recently fixed similar problem in [Takari Smart Builder](https://github.com/takari/takari-smart-builder) where aggregate tasks ran multiple times. Multithreading is hard :-)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by dbmeneses <gi...@git.apache.org>.
Github user dbmeneses commented on the issue:

    https://github.com/apache/maven/pull/125
  
    @ifedorenko Ok, thanks for the help preparing the p/r. Is there anyone you could assign the review to?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by dbmeneses <gi...@git.apache.org>.
Github user dbmeneses commented on the issue:

    https://github.com/apache/maven/pull/125
  
    @ifedorenko I've updated my previous comment. I added a simple reproducer and I submitted a P/R to maven-integration-testing with an IT.
    BTW is it normal to have 100+ ITs failing with mvn 3.5.0?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by ifedorenko <gi...@git.apache.org>.
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
  
    No, sorry, I can't "assign" this to anyone, you just have to wait for somebody to review and merge this pull request.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by ifedorenko <gi...@git.apache.org>.
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
  
    The change looks reasonable but I don't use built-in multithreaded build support myself and do not feel comfortable merging this change without proper testing. I will have to defer to somebody more familiar with this part of Maven codebase.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by ifedorenko <gi...@git.apache.org>.
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
  
    No, having IT failures are not normal, and [jenkins seems to be happy](https://builds.apache.org/view/M-R/view/Maven%20Core%20ITs/job/core-integration-testing-maven-3-embedded/).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

Posted by dbmeneses <gi...@git.apache.org>.
Github user dbmeneses commented on the issue:

    https://github.com/apache/maven/pull/125
  
    Ok my bad, I've managed to make them pass on my box as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org