Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11548

Heavy Job plugin not working with Matrix jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If a Matrix job has a 'weight' not equal to 1, it fails to start its children and just runs indefinitely. Also, it is shown as 'running' in Job view even after cancelling, which is fixed only by restarting Jenkins.
      I think there is a problem with starting FlyWightTask. Jenkins wait for thread in "offer.event.block();" (Queue.java::830 .Jenkins code). Executor #-1 seems to not release, as it should.

      FreeStyle projects starts normally even it's weight > 1.

        Attachments

          Issue Links

            Activity

            Hide
            ivovk Ivan Vovk added a comment -

            It seems to doesn't work with matrix job because when matrix job executing it doesn't do MappingWorksheet or smth similar for matrix job. Freestyle project executes MappingWorksheet function and this function allocates buildable jobs to executors as needed. For example, if (Queue.java:802) ws.works[0] contains two elements - "FreeStyleProject" and "HeavyJobProperty". It's recognized like two (sub?)tasks. These tasks is occupied by Executors #0 and #1. As a result whole process correctly executed. When our project is a matrix project with weight > 1 MappingWorksheet function doesn't executes.So, in this case our project isn't divided into two buildable (sub?)tasks and isn't executed correctly (isn't consumed by many executors).I can't figure out how matrix job manage queue. So I don't know how to make this plugin to work with matrix job.

            Show
            ivovk Ivan Vovk added a comment - It seems to doesn't work with matrix job because when matrix job executing it doesn't do MappingWorksheet or smth similar for matrix job. Freestyle project executes MappingWorksheet function and this function allocates buildable jobs to executors as needed. For example, if (Queue.java:802) ws.works [0] contains two elements - "FreeStyleProject" and "HeavyJobProperty". It's recognized like two (sub?)tasks. These tasks is occupied by Executors #0 and #1. As a result whole process correctly executed. When our project is a matrix project with weight > 1 MappingWorksheet function doesn't executes.So, in this case our project isn't divided into two buildable (sub?)tasks and isn't executed correctly (isn't consumed by many executors).I can't figure out how matrix job manage queue. So I don't know how to make this plugin to work with matrix job.
            Hide
            mvchurik Mikhail Churikov added a comment - - edited

            Ivan Vovk and I fixed the bug in our local version of Jenkins sources. In the case FLYWEIGHT_SUPPORT set true, Jenkins trys start second matrix parent executor on the stage MappingWorkSheet and goes to wait. That activity was blocked. In the opposite case, we block occupying executors by the matrix parent in the same way. We also pass HeavyJobProperty to trigered nodes.

            How cam we merge this fix with trunk? (I'm new to git workflow)
            May I commit to trunk or carry patch?

            Show
            mvchurik Mikhail Churikov added a comment - - edited Ivan Vovk and I fixed the bug in our local version of Jenkins sources. In the case FLYWEIGHT_SUPPORT set true, Jenkins trys start second matrix parent executor on the stage MappingWorkSheet and goes to wait. That activity was blocked. In the opposite case, we block occupying executors by the matrix parent in the same way. We also pass HeavyJobProperty to trigered nodes. How cam we merge this fix with trunk? (I'm new to git workflow) May I commit to trunk or carry patch?
            Hide
            zeroturnaround Juri Timošin added a comment -

            Hello. Could you share the patch somehow? That would be very kind of you. We would like to start using this plugin with matrix jobs. Or may you can create a pull request in github? Thanks in advance.

            Show
            zeroturnaround Juri Timošin added a comment - Hello. Could you share the patch somehow? That would be very kind of you. We would like to start using this plugin with matrix jobs. Or may you can create a pull request in github? Thanks in advance.
            Hide
            zamf Cristian Zamfir added a comment -

            This patch solves this bug, here is the github pull request https://github.com/jenkinsci/heavy-job-plugin/pull/1
            It would be great if it could be merged soon. Meanwhile, feel free to use the patch.
            Description: "This pull request implementes support for the matrix jobs in the heavy job plugin. This plugin now correctly handles the main FlyweightTask created by the MatrixProject and adds weight to all configuration-specific builds created by it."

            Show
            zamf Cristian Zamfir added a comment - This patch solves this bug, here is the github pull request https://github.com/jenkinsci/heavy-job-plugin/pull/1 It would be great if it could be merged soon. Meanwhile, feel free to use the patch. Description: "This pull request implementes support for the matrix jobs in the heavy job plugin. This plugin now correctly handles the main FlyweightTask created by the MatrixProject and adds weight to all configuration-specific builds created by it."
            Hide
            marner Marlon Nerling added a comment -

            Have we an update on this issue?
            I feel sorry for Cristian, since he proposed a patch, in January 2013 and did not even get an answer from the developer (Mikhail).

            Show
            marner Marlon Nerling added a comment - Have we an update on this issue? I feel sorry for Cristian, since he proposed a patch, in January 2013 and did not even get an answer from the developer (Mikhail).
            Hide
            marner Marlon Nerling added a comment -
            Show
            marner Marlon Nerling added a comment - I'm sponsoring the fix of this issue with $ 50, as in http://freedomsponsors.org/core/issue/441/heavy-job-plugin-not-working-with-matrix-jobs .
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Nothing to do with Matrix Project Plugin.

            P.S: Please feel free to take the plugin ownership if you want to merge changes

            Show
            oleg_nenashev Oleg Nenashev added a comment - Nothing to do with Matrix Project Plugin. P.S: Please feel free to take the plugin ownership if you want to merge changes
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix from ks.vladimir: https://github.com/jenkinsci/heavy-job-plugin/pull/1
            BTW, the fix cannot be merged

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix from ks.vladimir: https://github.com/jenkinsci/heavy-job-plugin/pull/1 BTW, the fix cannot be merged

              People

              • Assignee:
                mvchurik Mikhail Churikov
                Reporter:
                alex01ves Alex Vesely
              • Votes:
                9 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: