JENKINS-41806# Fix for failing Build.getBuildResult() during JSON serialization#473
JENKINS-41806# Fix for failing Build.getBuildResult() during JSON serialization#473vivek wants to merge 1 commit intojenkinsci:masterfrom
Conversation
|
cc: @reviewbybees |
jglick
left a comment
There was a problem hiding this comment.
I think this is wrong; Run.getResult successfully exports a Result object, because it implements CustomExportedBean. So somehow that code path is not getting correctly checked in this case. Track down and fix the root problem rather than working around it.
|
@jglick yes, the real fix is probably somewhere in stapler and should be fixed there. However this fix has it's won merit: it makes this works with users till that (probable) stapler fix appears in future version of Jenkins and also works for users who are on older versions of LTS. |
Track down and fix the actual bug first, and then it will be clear whether a short-term workaround is necessary and what form it should take. |
@jglick jenkinsci/stapler#107. PTAL. |
|
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
|
Closing it as the right fix was made in blueocean. |
In cases where hudson.plugins.git.util.Build is serialized as JSON, Build.getBuildResult() fails to serialize as reported in https://issues.jenkins-ci.org/browse/JENKINS-41806. The failure is because Stapler expects Result to be @ExportedBean as it's exposed from hudson.plugins.git.util.Build which is ExportedBean and fails serialization.
Here the fix is to preserve Java API contract as well as JSON where buildResult element is returned correctly.