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

Multibranch project stops sync configuration to sub-branch project after making changes in sub-branch project

    XMLWordPrintable

Details

    Description

      According to the plugin wiki (https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin):

      Sub-projects appear to be configurable, but they will be overwritten by branch indexing if you manually modify them.

      But after I made changes to sub-branch project and run branch-indexing,
      the sub-branch project configuration is not overwritten,
      and further changes from Multi-branch configuration is not sync over to sub-branch project anymore.

      Symptom:

      You will see Detected unsupported subitem f.q.ClassName@hash[my-multibranch-project/my-branch], skipping in the indexing log.

      Attachments

        Activity

          Which fields are you changing?

          There is an outstanding issue JENKINS-21017 which causes configuration to not be updated when updating by XML. This is the mechanism multi-branch-project-plugin uses to apply changes to the sub-projects. I have workarounds in place for a couple fields https://github.com/jenkinsci/multi-branch-project-plugin/blob/multi-branch-project-plugin-0.5/src/main/java/com/github/mjdetullio/jenkins/plugins/multibranch/TemplateDrivenBranchProjectFactory.java#L128

          mjdetullio Matthew DeTullio added a comment - Which fields are you changing? There is an outstanding issue JENKINS-21017 which causes configuration to not be updated when updating by XML. This is the mechanism multi-branch-project-plugin uses to apply changes to the sub-projects. I have workarounds in place for a couple fields https://github.com/jenkinsci/multi-branch-project-plugin/blob/multi-branch-project-plugin-0.5/src/main/java/com/github/mjdetullio/jenkins/plugins/multibranch/TemplateDrivenBranchProjectFactory.java#L128
          totoroliu Rick Liu added a comment - - edited

          I'm using SVN plugin in Branch sources.
          so I have tried to change sub-branch project SCM to:
          1
          "none".
          2.
          Change SVN Repository URL to use one of input parameter variable.

          After the change,
          the branch index is not sync anymore.

          totoroliu Rick Liu added a comment - - edited I'm using SVN plugin in Branch sources. so I have tried to change sub-branch project SCM to: 1 "none". 2. Change SVN Repository URL to use one of input parameter variable. After the change, the branch index is not sync anymore.
          totoroliu Rick Liu added a comment -

          Another place to easily reproduce is "Discard old build".

          At Multibranch-Multiconfiguration,
          I keep max 5 of build,
          and then do branch indexing to have all sub-branch jobs created.

          Then go to one of sub-branch jobs and change to keep max 10 of builds.
          After the change,
          the further branch indexing won't sync over.

          totoroliu Rick Liu added a comment - Another place to easily reproduce is "Discard old build". At Multibranch-Multiconfiguration, I keep max 5 of build, and then do branch indexing to have all sub-branch jobs created. Then go to one of sub-branch jobs and change to keep max 10 of builds. After the change, the further branch indexing won't sync over.

          Added symptom to issue description. Also, this applies to all multibranch job types in this plugin.

          It's because config submission removes the BranchProjectProperty, whose existence is checked before syncing.

          This one will be tricky to fix, because without that property during sync, there are bound to be a lot of NPEs. Need to investigate further.

          mjdetullio Matthew DeTullio added a comment - Added symptom to issue description. Also, this applies to all multibranch job types in this plugin. It's because config submission removes the BranchProjectProperty , whose existence is checked before syncing. This one will be tricky to fix, because without that property during sync, there are bound to be a lot of NPEs. Need to investigate further.

          Fixed in 0.5.1

          mjdetullio Matthew DeTullio added a comment - Fixed in 0.5.1
          totoroliu Rick Liu added a comment -

          Confirm fixed.

          totoroliu Rick Liu added a comment - Confirm fixed.

          People

            mjdetullio Matthew DeTullio
            totoroliu Rick Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: