build-monitor-plugin icon indicating copy to clipboard operation
build-monitor-plugin copied to clipboard

Breaks totally when trying to find the responsible committer

Open TobiX opened this issue 7 years ago • 10 comments

It seems I have a job with some strange history on my Jenkins, which wasn't a problem before updating to 1.12+build.201809061734 (from 1.12+build.201805070054). The build monitor only shows an error dialog and the background AJAX requests fails with this:

[...]
        Caused by: org.codehaus.jackson.map.JsonMappingException: hudson.model.FreeStyleBuild cannot be cast to org.jenkinsci.plugins.workflow.job.WorkflowRun (through reference chain: com.smartcodelt
d.jenkinsci.plugins.buildmonitor.api.Success["data"]->java.util.ArrayList[43])
                at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:218)
                at org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:197)
                at org.codehaus.jackson.map.ser.std.SerializerBase.wrapAndThrow(SerializerBase.java:166)
                at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:127)
                at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:71)
                at org.codehaus.jackson.map.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:86)
                at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
                at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
                at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
                at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
                at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
                at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2575)
                at org.codehaus.jackson.map.ObjectMapper.writeValueAsString(ObjectMapper.java:2097)
                at com.smartcodeltd.jenkinsci.plugins.buildmonitor.api.Respond.withSuccess(Respond.java:15)
                at com.smartcodeltd.jenkinsci.plugins.buildmonitor.BuildMonitorView.fetchJobViews(BuildMonitorView.java:142)
                at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
[...]

I know this is a data problem, but probably there can also be a check in the build-monitor for this.

TobiX avatar Sep 10 '18 07:09 TobiX

Another interesting data point: The offending job didn't have any FreeStyleBuilds in its history...

TobiX avatar Sep 10 '18 09:09 TobiX

Interesting, thanks for raising this! Given that you have a way of reproducing the problem, would you be happy to look into a PR by any chance? We can discuss the details on gitter.

jan-molak avatar Sep 11 '18 11:09 jan-molak

We've hit the same thing. Does the error go away if (while editing the view) under "Build Monitor - Widget Settings" you untick "Display committers"?

vkalik avatar Sep 14 '18 14:09 vkalik

Same issue here. @vkalik hiding the committers does have an affect. I haven't seen it after I unchecked that box

udnaan avatar Sep 19 '18 20:09 udnaan

Disabling "Display committers" fixed it for me also.

TobiX avatar Oct 31 '18 16:10 TobiX

same issue here.

ottlinger avatar Nov 01 '18 12:11 ottlinger

Would it be possible to just skip the jobs with parsing errors instead of "screwing up" the whole board? Thanks.

ottlinger avatar Nov 01 '18 13:11 ottlinger

i'm facing the same issue. This is really annoying, when you have large amount of jobs on it, and one of them is causing the problem, but you don't even know which one. Furthermore I've experienced that this only happen from time to time and rerunning that job (actually rerunning all, as you don't know the 'failed' job), which is causing the problem, normally fixes it. It would be much better to mark this job somehow instead of breaking the whole view.

astrid-lasinger-dig avatar Dec 02 '19 10:12 astrid-lasinger-dig

I have same issue

igreenfield avatar Jan 20 '20 20:01 igreenfield

I also have this issue. It was working fine with a particular job, then started failing, not sure what changed that caused it to happen. Disabling the "Display committers" seems to work as a workaround.

tom-wood-red avatar Feb 13 '20 15:02 tom-wood-red