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

[MultipleSCM integration] - Perforce SCM does not work in MultipleSCMs

      Initial description:

      Usage of Perforce plugin in the set-up of multiple SCM section leads to Java exception with no explanations of failure. Seems that Perforce plugin somehow ignores "View Map" parameters in "newInstance" handler.

      The real issues:

      • MultipleSCMs use DataBoundConstructor instead of newInstance
      • radioBlock names are not unique
      • ...

          [JENKINS-18583] [MultipleSCM integration] - Perforce SCM does not work in MultipleSCMs

          Rob Petti added a comment -

          Are you setting up more than one PerforceSCM? Does it happen when you only set up one under MultipleSCM?

          Rob Petti added a comment - Are you setting up more than one PerforceSCM? Does it happen when you only set up one under MultipleSCM?

          Oleg Nenashev added a comment -

          Hello, issue is being reproduced for one Perforce SCM as well

          Oleg Nenashev added a comment - Hello, issue is being reproduced for one Perforce SCM as well

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          src/main/java/com/synopsys/arc/jenkinsci/plugins/perforce/DepotType.java
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
          http://jenkins-ci.org/commit/perforce-plugin/21f91d6ae68ea120985876e8a6116a0c1dd5ce62
          Log:
          [PerforceSCM.DataBoundConstructor] - Added "proof-of-concept" implementation of the bugfix.
          Related issue: https://issues.jenkins-ci.org/browse/JENKINS-18583

          Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/com/synopsys/arc/jenkinsci/plugins/perforce/DepotType.java src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly http://jenkins-ci.org/commit/perforce-plugin/21f91d6ae68ea120985876e8a6116a0c1dd5ce62 Log: [PerforceSCM.DataBoundConstructor] - Added "proof-of-concept" implementation of the bugfix. Related issue: https://issues.jenkins-ci.org/browse/JENKINS-18583 Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          Oleg Nenashev added a comment -

          Hello Robert,

          Just for review… Pull request: https://github.com/jenkinsci/perforce-plugin/pull/33

          Proposed fix resolves issue with instantiation of Perforce plugin in the MultipleSCM’s hetero list. Issue was in the incomplete handling of data in the DataBoundConstructor.

          If fix is applicable, I’ll modify unit tests and remove temporary stuff from the *.pom. Then, we will be able to merge pull request.

          Oleg Nenashev added a comment - Hello Robert, Just for review… Pull request: https://github.com/jenkinsci/perforce-plugin/pull/33 Proposed fix resolves issue with instantiation of Perforce plugin in the MultipleSCM’s hetero list. Issue was in the incomplete handling of data in the DataBoundConstructor. If fix is applicable, I’ll modify unit tests and remove temporary stuff from the *.pom. Then, we will be able to merge pull request.

          Oleg Nenashev added a comment - - edited

          Proposed fix works for single Perforce SCM only.
          So, you're able to use P4 with other SCMs...

          If we want to have multiple SCMs, we need to fix PerforceSCM's config.jelly:

          • RadioBlock has single-select between multiple P4 instantiations (so we can't set view source for two SCMs)
          • Issue affects all radio-blocks => Probably, we need another approach

          I'll continue work on this issue. Probably, it should be left for future release.

          Oleg Nenashev added a comment - - edited Proposed fix works for single Perforce SCM only. So, you're able to use P4 with other SCMs... If we want to have multiple SCMs, we need to fix PerforceSCM's config.jelly: RadioBlock has single-select between multiple P4 instantiations (so we can't set view source for two SCMs) Issue affects all radio-blocks => Probably, we need another approach I'll continue work on this issue. Probably, it should be left for future release.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
          http://jenkins-ci.org/commit/perforce-plugin/96bd5734090a329b168b9763468d34a5ee341ae2
          Log:
          JENKINS-18583 - Added propagation of Instance ID to the newInstance() method

          Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly http://jenkins-ci.org/commit/perforce-plugin/96bd5734090a329b168b9763468d34a5ee341ae2 Log: JENKINS-18583 - Added propagation of Instance ID to the newInstance() method Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java
          src/main/java/hudson/plugins/perforce/config/DepotType.java
          src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java
          src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java
          src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
          src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
          http://jenkins-ci.org/commit/perforce-plugin/02350700b588acc39d774c30d43c53e7ff108d53
          Log:
          JENKINS-18583 - Refactoring of PerforceSCM to remove newInstance()

          This change removes need in newInstance() handler and also provides classes for future refactoring.
          In addition, the change adds instance IDs to config.jelly, therefore there won't be conflicts between radioButtons().
          Resolves https://issues.jenkins-ci.org/browse/JENKINS-18583

          Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java src/main/java/hudson/plugins/perforce/config/DepotType.java src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly src/test/java/hudson/plugins/perforce/PerforceSCMTest.java http://jenkins-ci.org/commit/perforce-plugin/02350700b588acc39d774c30d43c53e7ff108d53 Log: JENKINS-18583 - Refactoring of PerforceSCM to remove newInstance() This change removes need in newInstance() handler and also provides classes for future refactoring. In addition, the change adds instance IDs to config.jelly, therefore there won't be conflicts between radioButtons(). Resolves https://issues.jenkins-ci.org/browse/JENKINS-18583 Signed-off-by: Oleg Nenashev <nenashev@synopsys.com>

          Code changed in jenkins
          User: Rob Petti
          Path:
          src/main/java/hudson/plugins/perforce/PerforceSCM.java
          src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java
          src/main/java/hudson/plugins/perforce/config/DepotType.java
          src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java
          src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java
          src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly
          src/test/java/hudson/plugins/perforce/PerforceSCMTest.java
          http://jenkins-ci.org/commit/perforce-plugin/4c8e35c5219d89118c5ee87352e692d63d43485d
          Log:
          Merge pull request #33 from jenkinsci/multiple-scm-instatination-fix

          [IN_PROGRESS]JENKINS-18583 - Fixed PerforceSCM instatination forn Multiple SCMs

          Compare: https://github.com/jenkinsci/perforce-plugin/compare/02d2fcf2a206...4c8e35c5219d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rob Petti Path: src/main/java/hudson/plugins/perforce/PerforceSCM.java src/main/java/hudson/plugins/perforce/config/CleanTypeConfig.java src/main/java/hudson/plugins/perforce/config/DepotType.java src/main/java/hudson/plugins/perforce/config/MaskViewConfig.java src/main/java/hudson/plugins/perforce/config/WorkspaceCleanupConfig.java src/main/resources/hudson/plugins/perforce/PerforceSCM/config.jelly src/test/java/hudson/plugins/perforce/PerforceSCMTest.java http://jenkins-ci.org/commit/perforce-plugin/4c8e35c5219d89118c5ee87352e692d63d43485d Log: Merge pull request #33 from jenkinsci/multiple-scm-instatination-fix [IN_PROGRESS] JENKINS-18583 - Fixed PerforceSCM instatination forn Multiple SCMs Compare: https://github.com/jenkinsci/perforce-plugin/compare/02d2fcf2a206...4c8e35c5219d

          Oleg Nenashev added a comment -

          Updated the issue's status

          Oleg Nenashev added a comment - Updated the issue's status

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: