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

Missing "Integrate Branch" from feature branch builds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: svnmerge-plugin
    • Labels:
    • Environment:
      CentOS 6, Jenkins 1.595, svnmerge plugin 2.4, Java 1.7.0_71
    • Similar Issues:

      Description

      There is no "Integrate Branch" action in any of feature branches' builds. The following are from `svn info`:

      dev1:
      Path: .
      Working Copy Root Path: /var/lib/jenkins/jobs/xxxx-dev1/workspace
      URL: https://192.168.3.15/svn/xxxx/branches/dev1
      Repository Root: https://192.168.3.15/svn/xxxx
      Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4
      Revision: 131
      Node Kind: directory
      Schedule: normal

      trunk:
      Path: .
      Working Copy Root Path: /var/lib/jenkins/jobs/xxxx/workspace
      URL: https://192.168.3.15/svn/xxxx/trunk
      Repository Root: https://192.168.3.15/svn/xxxx
      Repository UUID: d0eb5361-05ce-7c4b-8453-cbb3c9b96fe4
      Revision: 129
      Node Kind: directory
      Schedule: normal

      What I've done was create a Jenkins job for the trunk. Then create a the dev1
      branch in Feature Branches. Then make a change to the README.md, perform a build,
      all on dev1. Then go to last build. Yet can't see the Integrate Branch action.

      Not sure if it's related, I've tried adding the Integrate to upstream upon successful build post-build action,
      and got an exception at the end of a (successful) build:

      ERROR: Publisher jenkins.plugins.svnmerge.IntegrationPublisher aborted due to exception
      java.lang.NullPointerException
      at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:183)
      at jenkins.plugins.svnmerge.IntegrateAction.perform(IntegrateAction.java:172)
      at jenkins.plugins.svnmerge.IntegrationPublisher.perform(IntegrationPublisher.java:51)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      at hudson.model.Run.execute(Run.java:1784)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:89)
      at hudson.model.Executor.run(Executor.java:240)

      I've double checked the Upstream project name is correct. Also, the branch job is created with "Feature Branch".

      In the "Configure" of branch job:
      "This project builds a Subversion feature branch" is checked;
      "Upstream project name" is "xxxx".

      In the Status page of branch job:
      "Subversion Merge Tracking
      This project is a feature branch of xxxx"

      Clicking the job link goes to the master job "xxxx", as expected.

      In the "Configure" of master job:
      "Accept Integration from Subversion feature branches" is checked.

      In the "Feature Branches" of master job:
      "Existing Feature Branches
      xxxx-dev1"

      Clicking the job name goes to the branch job, as expected.

      The svn repo is a fresh one, just for trying out the Jenkins. There is no other sources in it.

      I've double checked with:
      svn propget svn:externals
      Which returns empty.

        Attachments

          Issue Links

            Activity

            eidng8 Jackey Cheung created issue -
            Hide
            hugueschabot Hugues Chabot added a comment - - edited

            How many Subversion modules does the feature branch have ?

            Show
            hugueschabot Hugues Chabot added a comment - - edited How many Subversion modules does the feature branch have ?
            Hide
            eidng8 Jackey Cheung added a comment -

            There is only one branch.

            History:
            I've created a dev (not dev1) branch back then, and couldn't see the Integrate button. So I've deleted it, and do it again, created the dev1 branch.

            Show
            eidng8 Jackey Cheung added a comment - There is only one branch. History: I've created a dev (not dev1) branch back then, and couldn't see the Integrate button. So I've deleted it, and do it again, created the dev1 branch.
            Hide
            hugueschabot Hugues Chabot added a comment -

            I did some investigation and I found that Integration Action does not work if the feature branch job has more that one Subversion modules.

            If the job that builds your feature branch has more than one module. Then it is the cause of this issue. I just wanted to confirm that.

            Show
            hugueschabot Hugues Chabot added a comment - I did some investigation and I found that Integration Action does not work if the feature branch job has more that one Subversion modules. If the job that builds your feature branch has more than one module. Then it is the cause of this issue. I just wanted to confirm that.
            Hide
            eidng8 Jackey Cheung added a comment - - edited

            Not sure if I get it right, are you concerning about svn:externals?

            If it's the repo itself, I've just created a fresh repo, make some directories in it (src, build, etc.), and put them all to trunk. Then I created the feature branch from within the Jenkins plugin.

            Inside "Feature Branches" of the master job, I see this: "Detected repository layout: single project layout".

            Show
            eidng8 Jackey Cheung added a comment - - edited Not sure if I get it right, are you concerning about svn:externals? If it's the repo itself, I've just created a fresh repo, make some directories in it (src, build, etc.), and put them all to trunk. Then I created the feature branch from within the Jenkins plugin. Inside "Feature Branches" of the master job, I see this: "Detected repository layout: single project layout".
            Hide
            hugueschabot Hugues Chabot added a comment -

            No, I am not concerned about svn:externals this time.

            Jenkins Subversion plugin allows to configure more than one modules. This can be checked in the configuration page, under Source Code Management section.

            Show
            hugueschabot Hugues Chabot added a comment - No, I am not concerned about svn:externals this time. Jenkins Subversion plugin allows to configure more than one modules. This can be checked in the configuration page, under Source Code Management section.
            Hide
            eidng8 Jackey Cheung added a comment -

            Here's the scm config:

            Master Job:
            Repository URL: https://192.168.3.15/svn/xxxx/trunk
            Credentials: xxxx
            Local module directory: . (it's a single dot)
            Repository depth: infinity
            Ignore externals: checked
            Check-out Strategy: Use 'svn update' as much as possible, with 'svn revert' before update
            Repository browser: Auto

            Feature Branch Job:
            Repository URL: https://192.168.3.15/svn/xxxx/branches/dev1
            Credentials: xxxx
            Local module directory: . (it's a single dot)
            Repository depth: infinity
            Ignore externals: checked
            Check-out Strategy: Use 'svn update' as much as possible, with 'svn revert' before update
            Repository browser: Auto

            That's all, nothing else is set, no module, no additional credential.

            Show
            eidng8 Jackey Cheung added a comment - Here's the scm config: Master Job: Repository URL: https://192.168.3.15/svn/xxxx/trunk Credentials: xxxx Local module directory: . (it's a single dot) Repository depth: infinity Ignore externals: checked Check-out Strategy: Use 'svn update' as much as possible, with 'svn revert' before update Repository browser: Auto Feature Branch Job: Repository URL: https://192.168.3.15/svn/xxxx/branches/dev1 Credentials: xxxx Local module directory: . (it's a single dot) Repository depth: infinity Ignore externals: checked Check-out Strategy: Use 'svn update' as much as possible, with 'svn revert' before update Repository browser: Auto That's all, nothing else is set, no module, no additional credential.
            Hide
            hugueschabot Hugues Chabot added a comment - - edited

            This kind of project should be very well supported by the plugin.

            Are you using matrix-based access control by any chances ? New permission for Rebase and Integrate were added in the last release.

            Show
            hugueschabot Hugues Chabot added a comment - - edited This kind of project should be very well supported by the plugin. Are you using matrix-based access control by any chances ? New permission for Rebase and Integrate were added in the last release.
            Hide
            stefano_ciccarelli Stefano Ciccarelli added a comment -

            We have the same problem, we had to revert to previous plugin version.
            We have multiple projects in the same SVN.

            Show
            stefano_ciccarelli Stefano Ciccarelli added a comment - We have the same problem, we had to revert to previous plugin version. We have multiple projects in the same SVN.
            Hide
            eidng8 Jackey Cheung added a comment -

            Yes, I'm using matrix-based access control. The user I've logged in has been granted all accesses,
            all check boxes are checked, including integrate and rebase.
            However, the Anonymous user has only been granted read permissions on some specific access.

            That's all, I've just created one account, which has full access to anything I see in the matrix.

            Show
            eidng8 Jackey Cheung added a comment - Yes, I'm using matrix-based access control. The user I've logged in has been granted all accesses, all check boxes are checked, including integrate and rebase. However, the Anonymous user has only been granted read permissions on some specific access. That's all, I've just created one account, which has full access to anything I see in the matrix.
            Hide
            hugueschabot Hugues Chabot added a comment -

            The comment thread starts on JENKINS-23371.

            Show
            hugueschabot Hugues Chabot added a comment - The comment thread starts on JENKINS-23371 .
            hugueschabot Hugues Chabot made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-23371 [ JENKINS-23371 ]
            Hide
            hugueschabot Hugues Chabot added a comment - - edited

            In svnmerge-2.3, the Reintegrate Action always ignored the revision. Launching "Reintegrate" on a build actually reintegrate the HEAD revision of the feature branch instead of the revision of the build.

            If this is the behaviour you expected, downgrading to svnmerge-2.3 could be a workaround.

            I am still looking to reproduce the issue on my environment.

            Show
            hugueschabot Hugues Chabot added a comment - - edited In svnmerge-2.3, the Reintegrate Action always ignored the revision. Launching "Reintegrate" on a build actually reintegrate the HEAD revision of the feature branch instead of the revision of the build. If this is the behaviour you expected, downgrading to svnmerge-2.3 could be a workaround. I am still looking to reproduce the issue on my environment.
            Hide
            greghansen Greg Hansen added a comment - - edited

            (deleted my comment, made it a separate issue instead, sorry for the spam)

            Show
            greghansen Greg Hansen added a comment - - edited (deleted my comment, made it a separate issue instead, sorry for the spam)
            Hide
            hugueschabot Hugues Chabot added a comment -

            Greg Hansen This is a compatibility issue with subversion-plugin 2.5. Please downgrade to subversion plugin 2.4 if you can.

            This is not related to the current issue. But it is a major issue I will fix in the next days.

            Show
            hugueschabot Hugues Chabot added a comment - Greg Hansen This is a compatibility issue with subversion-plugin 2.5. Please downgrade to subversion plugin 2.4 if you can. This is not related to the current issue. But it is a major issue I will fix in the next days.
            Hide
            greghansen Greg Hansen added a comment - - edited

            I am running 2.4. See JENKINS-26347

            Show
            greghansen Greg Hansen added a comment - - edited I am running 2.4. See JENKINS-26347
            hugueschabot Hugues Chabot made changes -
            Assignee Kohsuke Kawaguchi [ kohsuke ] Hugues Chabot [ hugueschabot ]
            hugueschabot Hugues Chabot made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            hugueschabot Hugues Chabot added a comment - - edited

            Integration won't work if if the SVN module "Ignore externals" option is checked. So, unless it is required to ignore svn:external, uncheking the option should re-enable Integration action.

            Show
            hugueschabot Hugues Chabot added a comment - - edited Integration won't work if if the SVN module "Ignore externals" option is checked. So, unless it is required to ignore svn:external, uncheking the option should re-enable Integration action.
            hugueschabot Hugues Chabot made changes -
            Attachment jenkins-26280.png [ 28339 ]
            Hide
            eidng8 Jackey Cheung added a comment -

            Yes, it works now. Thanks & look forward for updates.

            As a reference, I've done:

            1. downgrade Subversion plugin to 2.4.5;
            2. unchecked "Ignore externals" in master job's configure > "Source Code Management";
            3. unchecked "Ignore externals" in feature branch job's configure > "Source Code Management".

            The "Integrate Branch" is now available from feature branches build page.

            Show
            eidng8 Jackey Cheung added a comment - Yes, it works now. Thanks & look forward for updates. As a reference, I've done: 1. downgrade Subversion plugin to 2.4.5; 2. unchecked "Ignore externals" in master job's configure > "Source Code Management"; 3. unchecked "Ignore externals" in feature branch job's configure > "Source Code Management". The "Integrate Branch" is now available from feature branches build page.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Hugues Chabot
            Path:
            src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
            http://jenkins-ci.org/commit/svnmerge-plugin/8eddd8faa48960f0d46364e6dc15317aafbc1098
            Log:
            Do integration on the first module regardless of the number of modules defined and the "Ignore externals" option (see JENKINS-26280)

            Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/a492cb131f04...8eddd8faa489

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/8eddd8faa48960f0d46364e6dc15317aafbc1098 Log: Do integration on the first module regardless of the number of modules defined and the "Ignore externals" option (see JENKINS-26280 ) Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/a492cb131f04...8eddd8faa489
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Hugues Chabot
            Path:
            src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java
            http://jenkins-ci.org/commit/svnmerge-plugin/2983d4bbfd9dd135197d7c7cf86cd6dc1da80183
            Log:
            Do integration on the first module and use SVNRevisionState to retrieve the correct revision of the build.
            [Fixed JENKINS-26280] Do integration regardless of the "Ignore externals" option.

            Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/a5c00fdd471e...2983d4bbfd9d

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Hugues Chabot Path: src/main/java/jenkins/plugins/svnmerge/IntegrateAction.java http://jenkins-ci.org/commit/svnmerge-plugin/2983d4bbfd9dd135197d7c7cf86cd6dc1da80183 Log: Do integration on the first module and use SVNRevisionState to retrieve the correct revision of the build. [Fixed JENKINS-26280] Do integration regardless of the "Ignore externals" option. Compare: https://github.com/jenkinsci/svnmerge-plugin/compare/a5c00fdd471e...2983d4bbfd9d
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160341 ] JNJira + In-Review [ 185562 ]

              People

              Assignee:
              hugueschabot Hugues Chabot
              Reporter:
              eidng8 Jackey Cheung
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: