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

non exportable objects exported causing errors in api/xml?depth=2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • scm-api-plugin
    • None

      When you try and view the XML api for a multibarnch pipeline job you are greated with an angry jenkins when you export depth > 1.

       

      org.kohsuke.stapler.export.NotExportableException: class jenkins.scm.api.SCMHeadOrigin$Fork doesn't have @ExportedBean
      
       
      org.kohsuke.stapler.export.NotExportableException: class jenkins.scm.api.SCMHeadOrigin$Default doesn't have @ExportedBean

       

      The default is exported at least here presumably there are other exports from implementations of the branch-source.

       

      To reproduce

       

      Create a MultiBranch pipeline from a GitHub repo.

      Make sure you have a PR, and some branches

      go to ${joburl}/job/${branch}/api/xml?depth=3   

      or ${joburl}/view/change-requests/job/${PR-number}/api/xml?depth=3

      sit back and enjoy

            Unassigned Unassigned
            teilo James Nord
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: