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

SVN revision in Matrix Project problem triggered by Parameterized Build

      The main project use the correct SVN revision, but all the configurations use the latest version , this can cause incompatibility with complex jobs.

          [JENKINS-14619] SVN revision in Matrix Project problem triggered by Parameterized Build

          cjo9900 added a comment -

          For your comments, I think what you mean is you have

          ProjectA -> ProjectB(matrix parent) -> Configuration(1-n)

          And revisions seen are

          ProjectA has Revision 3,
          ProjectB(parent) has Revision 3
          Configurations(1-n) have Revision HEAD

          If this is the case, it looks like the issue is with the matrix project not passing all of the actions to it configurations, only Parameter Actions.
          Caused by the following items of code:

          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java#L200
          https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/MatrixConfiguration.java#L358

          So this interface needs to be more generic to allow other actions to be passed along.
          As this may also affect the EnvInjectAction if this is passed along.

          However all actions should not passed directly as some do not make sense to pass.

          cjo9900 added a comment - For your comments, I think what you mean is you have ProjectA -> ProjectB(matrix parent) -> Configuration(1-n) And revisions seen are ProjectA has Revision 3, ProjectB(parent) has Revision 3 Configurations(1-n) have Revision HEAD If this is the case, it looks like the issue is with the matrix project not passing all of the actions to it configurations, only Parameter Actions. Caused by the following items of code: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java#L200 https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/MatrixConfiguration.java#L358 So this interface needs to be more generic to allow other actions to be passed along. As this may also affect the EnvInjectAction if this is passed along. However all actions should not passed directly as some do not make sense to pass.

          morlajb added a comment - - edited

          Hi , Thanks for your reply , I wasn't in the office in the last days.
          you are right this is exactly the configuration I used.

          here is the log of the matrix job :
          15:10:37 U management\flow-triggering\oo-flow-triggering-api\pom.xml
          15:11:13 At revision 10313

          and all the activate jobs shows the following :

          15:12:01 U management\l10n\oo-l10n-ja\src\main\resources\deployment_ja.properties
          15:14:01 At revision 10317

          morlajb added a comment - - edited Hi , Thanks for your reply , I wasn't in the office in the last days. you are right this is exactly the configuration I used. here is the log of the matrix job : 15:10:37 U management\flow-triggering\oo-flow-triggering-api\pom.xml 15:11:13 At revision 10313 and all the activate jobs shows the following : 15:12:01 U management\l10n\oo-l10n-ja\src\main\resources\deployment_ja.properties 15:14:01 At revision 10317

          morlajb added a comment - - edited

          here is the config.xml contains the problem.

          do you need any more info for this problem ?

          morlajb added a comment - - edited here is the config.xml contains the problem. do you need any more info for this problem ?

          cjo9900 added a comment -

          This is a problem with all actions that should be passed to the matrix configurations.

          See mailing list item
          https://groups.google.com/d/topic/jenkinsci-dev/h3TMwZ-qmDQ/discussion

          I would propose adding all actions from parent build to the all of the configurations,
          but are there any issues doing this?
          I.e. actions should not be passed on.(MatrixSubsetAction in parameterized-trigger)

          So should there be an interface that actions implement to indicate that they are passed from the parent to the configurations?
          that the Matrix configuration can use to filter the actions passed to it.

          Or are there any better suggestions?

          [1] https://issues.jenkins-ci.org/browse/JENKINS-14619
          [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/MatrixConfiguration.java#L358
          [3] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java#L200

          cjo9900 added a comment - This is a problem with all actions that should be passed to the matrix configurations. See mailing list item https://groups.google.com/d/topic/jenkinsci-dev/h3TMwZ-qmDQ/discussion I would propose adding all actions from parent build to the all of the configurations, but are there any issues doing this? I.e. actions should not be passed on.(MatrixSubsetAction in parameterized-trigger) So should there be an interface that actions implement to indicate that they are passed from the parent to the configurations? that the Matrix configuration can use to filter the actions passed to it. Or are there any better suggestions? [1] https://issues.jenkins-ci.org/browse/JENKINS-14619 [2] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/MatrixConfiguration.java#L358 [3] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java#L200

          mor lajb added a comment -

          i think that your solution is the right one. How can I help you to implement it ?

          mor lajb added a comment - i think that your solution is the right one. How can I help you to implement it ?

          cjo9900 added a comment -

          I have created two different fixes for this,
          Pull requests:
          https://github.com/jenkinsci/jenkins/pull/544
          This passes all actions from parent to the individual configurations.

          https://github.com/jenkinsci/jenkins/pull/543
          This passes only actions that implement the MatrixChildAction interface.

          cjo9900 added a comment - I have created two different fixes for this, Pull requests: https://github.com/jenkinsci/jenkins/pull/544 This passes all actions from parent to the individual configurations. https://github.com/jenkinsci/jenkins/pull/543 This passes only actions that implement the MatrixChildAction interface.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java
          core/src/main/java/hudson/matrix/MatrixChildAction.java
          core/src/main/java/hudson/matrix/MatrixConfiguration.java
          core/src/main/java/hudson/model/ParametersAction.java
          test/src/test/groovy/hudson/matrix/MatrixProjectTest.groovy
          http://jenkins-ci.org/commit/jenkins/f250ead3b58dcbfa42e788bf71d6019627eb2950
          Log:
          Create a marker interface for actions to beable to pass matrix configurations

          create a Interface that Actions can implement to indicat that they
          should be passed from
          the matrix parent to the indiviual configurations.
          This means that the SVN Parameters can be passed to them.
          Partial fix for JENKINS-14619 also needs changes in SVN SCM plugin to
          fix completely.

          Developed by cjo9900

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/matrix/DefaultMatrixExecutionStrategyImpl.java core/src/main/java/hudson/matrix/MatrixChildAction.java core/src/main/java/hudson/matrix/MatrixConfiguration.java core/src/main/java/hudson/model/ParametersAction.java test/src/test/groovy/hudson/matrix/MatrixProjectTest.groovy http://jenkins-ci.org/commit/jenkins/f250ead3b58dcbfa42e788bf71d6019627eb2950 Log: Create a marker interface for actions to beable to pass matrix configurations create a Interface that Actions can implement to indicat that they should be passed from the matrix parent to the indiviual configurations. This means that the SVN Parameters can be passed to them. Partial fix for JENKINS-14619 also needs changes in SVN SCM plugin to fix completely. Developed by cjo9900

          cjo9900 added a comment -

          Pull request on SVN plugin to complete the changes

          https://github.com/jenkinsci/subversion-plugin/pull/20

          cjo9900 added a comment - Pull request on SVN plugin to complete the changes https://github.com/jenkinsci/subversion-plugin/pull/20

          ikedam added a comment -

          This seems to be resolved as an issue of subversion-plugin, not of parameterized-trigger-plugin.

          ikedam added a comment - This seems to be resolved as an issue of subversion-plugin, not of parameterized-trigger-plugin.

          James Dumay added a comment -

          Seems the PR to fix this issue was closed due to inactivity. There hasn't been any activity on this ticket for a number of years so I think we can assume this is a non-issue.

          James Dumay added a comment - Seems the PR to fix this issue was closed due to inactivity. There hasn't been any activity on this ticket for a number of years so I think we can assume this is a non-issue.

            Unassigned Unassigned
            morlajb morlajb
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: