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

Children not re-indexed on OrganizationFolder re-index

    Details

    • Similar Issues:

      Description

      When a re-index is triggered manually on OrganizationFolder the re-index should be propagated to all its children (run a re-index on every MultiBranchProject in the org. folder), but actually it's not happening. This is producing wrong behaviors, for example: if you make a change in the OrganizationFolder configuration (a checkout credentials change, for example) it is not propagated to existing MultiBranchProject s and their existent branch jobs. So if you trigger a build on a branch job, the new credentials configuration is not pickep up.

      Possible root cause:

      When a re-index is triggered manually on OrganizationFolder a call to computeChildren occurs, this call ends up with a series of calls to SCMSourceObserver.complete(), if the projectName already has a MultiBranchProject in ComputedFolder.items (the multi-branch already exists) then project.scheduleBuild() is never called, so the re-index in that child will never occur.

        Attachments

          Activity

          amuniz Antonio Muñiz created issue -
          amuniz Antonio Muñiz made changes -
          Field Original Value New Value
          Assignee stephenconnolly [ stephenconnolly ] Antonio Muñiz [ amuniz ]
          amuniz Antonio Muñiz made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          amuniz Antonio Muñiz made changes -
          Description When a re-index is triggered manually on {{OrganizationFolder}} the re-index should be propagated to all its children (run a re-index on every {{MultiBranchProject}} in the org. folder), but actually it's not happening. This is producing wrong behaviors, for example: if you make a change in the {{OrganizationFolder}} configuration (a checkout credentials change, for example) it is not propagated to existing {{MultiBranchProject}}s and their existent branch jobs. So if you trigger a build on a branch job, the new credentials configuration is not pickep up.

          Possible root cause:

          When a re-index is triggered manually on {{OrganizationFolder}} a call to {{computeChildren}} occurs, this call ends up with a series of calls to [{{SCMSourceObserver.complete()}}|https://github.com/jenkinsci/branch-api-plugin/blob/2906cd755c93101dbfe0e63d5006cfa0c7cec4bb/src/main/java/jenkins/branch/OrganizationFolder.java#L159], if the {{projectName}} already has a {{MultiBranchProject}} in {{ComputedFolder.items}} (the multi-branch already exists) then {{project.scheduleBuild()}} is never called, so the re-index in that child will never occur.
          When a re-index is triggered manually on {{OrganizationFolder}} the re-index should be propagated to all its children (run a re-index on every {{MultiBranchProject}} in the org. folder), but actually it's not happening. This is producing wrong behaviors, for example: if you make a change in the {{OrganizationFolder}} configuration (a checkout credentials change, for example) it is not propagated to existing {{MultiBranchProject}} s and their existent branch jobs. So if you trigger a build on a branch job, the new credentials configuration is not pickep up.

          Possible root cause:

          When a re-index is triggered manually on {{OrganizationFolder}} a call to {{computeChildren}} occurs, this call ends up with a series of calls to [{{SCMSourceObserver.complete()}}|https://github.com/jenkinsci/branch-api-plugin/blob/2906cd755c93101dbfe0e63d5006cfa0c7cec4bb/src/main/java/jenkins/branch/OrganizationFolder.java#L159], if the {{projectName}} already has a {{MultiBranchProject}} in {{ComputedFolder.items}} (the multi-branch already exists) then {{project.scheduleBuild()}} is never called, so the re-index in that child will never occur.
          jglick Jesse Glick made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 166929 ] JNJira + In-Review [ 198072 ]

            People

            • Assignee:
              amuniz Antonio Muñiz
              Reporter:
              amuniz Antonio Muñiz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: