Why are we getting Detected unsupported subitem?

Issue

One of our GitHub orgs is not able to build some of its projects. When we run an org/repo scan, we are getting the following error: Detected unsupported subitem Org_name » Project_name » Branch_name, skipping

This can happen if for any reason one of the Pipeline jobs generated by the Multibranch Pipeline job loses its BranchJobProperty entry in its config.xml file. The Multibranch Pipeline job is then in an inconsistent state and displays the messages shown above.

The causes for this can be diverse, such as scripts updating the project properties in the file system, I/O errors that can corrupt the data, etc.

Environment

Resolution

This specific issue was tracked down in the Jenkins Jira as JENKINS-55116. The fix for this issue was included in Pipeline: Multibranch version 2.21 of the plugin as stated above.

Workaround

There is a potential workaround that can bring the project back to normal, with the caveat that the next build number information will be reset.

The workaround, as described in the linked Jira ticket would consist on:

  1. Completely remove the config.xml on the filesystem for the specific branch that you are experiencing problems with, as explained in JENKINS-55116
  2. Restart Jenkins
  3. Re-trigger an indexing event

If you need to reset the nextBuildNumber for a given MultibranchJob you could go to Manage Jenkins->Script Console and run one script similar to the one shown below:

myJob=Jenkins.instance.getItemByFullName([put here the full job name])
myJob.nextBuildNumber= myJob.getLastBuild()+1
myJob.save()

Tested product/plugin versions

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.