-
Bug
-
Resolution: Fixed
-
Minor
Since build 2.60, the culprits are no longer available through the json api. They are probably not available through xml api either, the root cause seems to be the same. Steps to reproduce:
- Go to a failed build
http://localhost:8080/jenkins/job/mytest/3/ - Check the json build result
http://localhost:8080/jenkins/job/mytest/3/api/json - Expect the json output to contain a culprits node but it no longer does
In changeset 39136804e53bf9f34cc91fdf3c64ab57d976eac3, method getCulprits was removed from AbstractBuild, as it already existed in the RunWithSCM interface as a default method. However, the model builder in stapler seems to only take @Exported methods from the current declaring class, and not from subclasses, so the data is no longer exported.
So, what are the solutions?
- Leave things as they are now. I think there are already a few tools on the internet that use this information. We have a dashing.io board that shows the status of various jenkins builds and this is currently broken.
- Expose the method back in AbstractBuild, even if just delegates to the RunWithSCM one, like in the attached patch.
- Change the model behaviour in stapler to also consider exported methods from other classes in the hierarchy. I find this the most unlikely, could put out a lot of data. I doubt many use filtering on just what they need, so we would risk flooding them.
- is related to
-
JENKINS-46153 Stapler doesn't pick up @Exported on Java 8 default interface methods
- Open
- links to