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

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

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Yeah, I feel we have to finally solve it on the Stapler side

          Show
          oleg_nenashev Oleg Nenashev added a comment - Yeah, I feel we have to finally solve it on the Stapler side
          Hide
          jpraet Jimmy Praet added a comment -

          I am also running into this issue with the JSON API.

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

          Show
          jpraet Jimmy Praet added a comment - I am also running into this issue with the JSON API. org.kohsuke.stapler.export.NotExportableException: class jenkins.scm.api.SCMHeadOrigin$Default doesn't have @ExportedBean
          Hide
          jpraet Jimmy Praet added a comment -

          FYI: I don't run into this problem anymore (Jenkins 2.107.3)

          Show
          jpraet Jimmy Praet added a comment - FYI: I don't run into this problem anymore (Jenkins 2.107.3)

            People

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

              Dates

              • Created:
                Updated: