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

starting parallel matrix jobs with dynamic axes causes in wrong build configuration

    Details

    • Similar Issues:

      Description

      We create a matrix project which gets its dynamic axes from build parameter. The job is doeing nothing instead printing some messages and wait an amount of time. Now we create an upstream project. This project calls the matrix project with different axis as a build parameter. This means we call the project and this starts parallel the matrix project with diferent axis.

      The projects are run with the correct matrix, but sometimes the job configuration contains the matrix values from another parallel build. This is visible if you compare the console output with the generated links in the build status UI.

      We attached the job configurations and one build.xml where you can see that the builded matrix differs from the given build parameter.

        Attachments

          Activity

          Hide
          bboehmke Benjamin Böhmke added a comment -

          The patch I made was only a simple fix to get it working.

          I think the part with the mutex is OK but the way the deep copy is done is not very well.
          This should be done with correct copy constructors of the "AxisList" I think.

          If you think the fix is enough I can create a pull request.

          Show
          bboehmke Benjamin Böhmke added a comment - The patch I made was only a simple fix to get it working. I think the part with the mutex is OK but the way the deep copy is done is not very well. This should be done with correct copy constructors of the "AxisList" I think. If you think the fix is enough I can create a pull request.
          Hide
          jhoblitt Joshua Hoblitt added a comment - - edited

          Benjamin Böhmke I am completely unqualified to judge thread synchronization in the jenkins core. I would recommend opening a PR as some people (at least me) often check open PRs for unmerged fixes. I haven't tried the patch yet but I am contemplating trying to rebase it on the current 1.18 release.

          Show
          jhoblitt Joshua Hoblitt added a comment - - edited Benjamin Böhmke I am completely unqualified to judge thread synchronization in the jenkins core. I would recommend opening a PR as some people (at least me) often check open PRs for unmerged fixes. I haven't tried the patch yet but I am contemplating trying to rebase it on the current 1.18 release.
          Hide
          bboehmke Benjamin Böhmke added a comment -

          I created a pull request here.

          We are currently using this patch in our Jenkins instance at work.
          There is only one visible down side: The mutex object is dumped to the job config.
          This has no effect but looks strange.

          Show
          bboehmke Benjamin Böhmke added a comment - I created a pull request here . We are currently using this patch in our Jenkins instance at work. There is only one visible down side: The mutex object is dumped to the job config. This has no effect but looks strange.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Benjamin Böhmke
          Path:
          src/test/java/hudson/matrix/MatrixTest.java
          src/test/java/hudson/matrix/helper/DynamicTestAxis.java
          http://jenkins-ci.org/commit/matrix-project-plugin/a0c12239e9f294c3317a0ffa03571474ef726539
          Log:
          added unit test for JENKINS-34389

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Benjamin Böhmke Path: src/test/java/hudson/matrix/MatrixTest.java src/test/java/hudson/matrix/helper/DynamicTestAxis.java http://jenkins-ci.org/commit/matrix-project-plugin/a0c12239e9f294c3317a0ffa03571474ef726539 Log: added unit test for JENKINS-34389
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          src/main/java/hudson/matrix/MatrixBuild.java
          src/main/java/hudson/matrix/MatrixProject.java
          src/test/java/hudson/matrix/MatrixTest.java
          src/test/java/hudson/matrix/helper/DynamicTestAxis.java
          http://jenkins-ci.org/commit/matrix-project-plugin/4cc27615094beb4540685c2b00efde93ce6e9835
          Log:
          Merge pull request #41 from bboehmke/dynamicAxis-fix

          JENKINS-34389 Fixed handling of dynamic axis

          Compare: https://github.com/jenkinsci/matrix-project-plugin/compare/ca0aa4607a2b...4cc27615094b

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/main/java/hudson/matrix/MatrixBuild.java src/main/java/hudson/matrix/MatrixProject.java src/test/java/hudson/matrix/MatrixTest.java src/test/java/hudson/matrix/helper/DynamicTestAxis.java http://jenkins-ci.org/commit/matrix-project-plugin/4cc27615094beb4540685c2b00efde93ce6e9835 Log: Merge pull request #41 from bboehmke/dynamicAxis-fix JENKINS-34389 Fixed handling of dynamic axis Compare: https://github.com/jenkinsci/matrix-project-plugin/compare/ca0aa4607a2b...4cc27615094b

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              wreggyl Jan Bottek
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: