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

Children not re-indexed on OrganizationFolder re-index

    XMLWordPrintable

    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

          Show
          amuniz Antonio Muñiz added a comment - https://github.com/jenkinsci/branch-api-plugin/pull/20
          Hide
          jglick Jesse Glick added a comment -

          Workaround would I suppose be to just wait, since the repo project should get reindexed after a while anyway.

          Show
          jglick Jesse Glick added a comment - Workaround would I suppose be to just wait, since the repo project should get reindexed after a while anyway.
          Hide
          amuniz Antonio Muñiz added a comment -

          Jesse Glick Yes, or trigger manually the re-index in the MultiBranchProject job.

          Show
          amuniz Antonio Muñiz added a comment - Jesse Glick Yes, or trigger manually the re-index in the MultiBranchProject job.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Antonio Muñiz
          Path:
          src/test/java/jenkins/branch/OrganizationFolderTest.java
          src/test/java/jenkins/branch/harness/MultiBranchImpl.java
          http://jenkins-ci.org/commit/branch-api-plugin/292188856f5e576306cc076154b4ae14116d0a75
          Log:
          Adding a test for JENKINS-31516

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Muñiz Path: src/test/java/jenkins/branch/OrganizationFolderTest.java src/test/java/jenkins/branch/harness/MultiBranchImpl.java http://jenkins-ci.org/commit/branch-api-plugin/292188856f5e576306cc076154b4ae14116d0a75 Log: Adding a test for JENKINS-31516
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/jenkins/branch/OrganizationFolder.java
          src/test/java/jenkins/branch/OrganizationFolderTest.java
          src/test/java/jenkins/branch/harness/MultiBranchImpl.java
          http://jenkins-ci.org/commit/branch-api-plugin/e1cf1f4eb030eb327b474bd589d84e10c448a775
          Log:
          Merge pull request #20 from amuniz/schedule-build-on-indexing

          JENKINS-31516 Run re-index on children on organization re-index

          Compare: https://github.com/jenkinsci/branch-api-plugin/compare/214823ff1028...e1cf1f4eb030

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/branch/OrganizationFolder.java src/test/java/jenkins/branch/OrganizationFolderTest.java src/test/java/jenkins/branch/harness/MultiBranchImpl.java http://jenkins-ci.org/commit/branch-api-plugin/e1cf1f4eb030eb327b474bd589d84e10c448a775 Log: Merge pull request #20 from amuniz/schedule-build-on-indexing JENKINS-31516 Run re-index on children on organization re-index Compare: https://github.com/jenkinsci/branch-api-plugin/compare/214823ff1028...e1cf1f4eb030

            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: