jenkinsci / jenkinsci/scm-api-plugin
[JENKINS-49186] non exportable objects exported causing errors in api/xml?depth=2
- Dominant language
- Java
- Stars
- 33
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
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
---
Originally reported by
teilo, imported from: non exportable objects exported causing errors in api/xml?depth=2
Raw content of original issue
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
Contributor guide
Assessment
This issue has not been assessed yet.