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

    • Similar Issues:

      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

          totoroliu Rick Liu created issue -
          Hide
          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

          Show
          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
          mjdetullio Matthew DeTullio made changes -
          Field Original Value New Value
          Link This issue is related to JENKINS-21017 [ JENKINS-21017 ]
          Hide
          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.

          Show
          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.
          Hide
          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.

          Show
          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.
          mjdetullio Matthew DeTullio made changes -
          Summary Multibranch-Multiconfiguration project stops sync configuration to sub-branch project after making changes in sub-branch project Multibranch project stops sync configuration to sub-branch project after making changes in sub-branch project
          mjdetullio Matthew DeTullio made changes -
          Description According to the plugin wiki (https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin):
          {quote}
          Sub-projects appear to be configurable, but they will be overwritten by branch indexing if you manually modify them.
          {quote}

          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.

          According to the plugin wiki (https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin):
          {quote}
          Sub-projects appear to be configurable, but they will be overwritten by branch indexing if you manually modify them.
          {quote}

          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}}
          Hide
          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.

          Show
          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.
          mjdetullio Matthew DeTullio made changes -
          Description According to the plugin wiki (https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin):
          {quote}
          Sub-projects appear to be configurable, but they will be overwritten by branch indexing if you manually modify them.
          {quote}

          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}}
          According to the plugin wiki (https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin):
          {quote}
          Sub-projects appear to be configurable, but they will be overwritten by branch indexing if you manually modify them.
          {quote}

          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.
          mjdetullio Matthew DeTullio made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          mjdetullio Matthew DeTullio added a comment -

          Fixed in 0.5.1

          Show
          mjdetullio Matthew DeTullio added a comment - Fixed in 0.5.1
          mjdetullio Matthew DeTullio made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          mjdetullio Matthew DeTullio made changes -
          Link This issue is related to JENKINS-21017 [ JENKINS-21017 ]
          Hide
          totoroliu Rick Liu added a comment -

          Confirm fixed.

          Show
          totoroliu Rick Liu added a comment - Confirm fixed.
          totoroliu Rick Liu made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 173225 ] JNJira + In-Review [ 210202 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: