Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
Jenkins 2.303.3
Warnings Next Generation Plugin 9.7.0
Analysis Model API Plugin 10.6.0
Description
I had configured aggregated reporting in Warnings Next Generation, like this:
recordIssues( tools: [ docFx(pattern: 'obj/docfx.log.json', reportEncoding: 'UTF-8'), msBuild(pattern: 'MSBuild.log', reportEncoding: 'UTF-8')], qualityGates: [ [threshold: 1, type: 'TOTAL_NORMAL', unstable: true], [threshold: 1, type: 'TOTAL_HIGH', unstable: false], [threshold: 1, type: 'TOTAL_ERROR', unstable: false]], sourceCodeEncoding: 'UTF-8', publishAllIssues: true, aggregatingResults: true)
The build wrote some warnings to obj/docfx.log.json but none to MSBuild.log.
After the build, Jenkins displayed:
Static Analysis: 9 warnings (from 2 analyses)
- Static analysis results from: MSBuild, DocFX
- New issues: 9
- Reference build: PR-70 #31
- Quality gate: Unstable
I clicked the "DocFX" link and Jenkins correctly displayed the warnings reported by DocFX.
I then returned to the previous page and clicked the "MSBuild" link. That caused an error:
Oops!
A problem occurred while processing the request.Logging ID=202cc84a-ee54-4e33-9132-1ced637bf249
The Jenkins log contains:
marraskuuta 11, 2021 1:49:17 IP. WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleException Caught unhandled exception with ID 202cc84a-ee54-4e33-9132-1ced637bf249 java.lang.IndexOutOfBoundsException: No such index 0 in - (-): 0 issues (0 duplicates) at edu.hm.hafner.analysis.Report.get(Report.java:517) at io.jenkins.plugins.analysis.core.model.DetailFactory.getPropertyValueAsString(DetailFactory.java:201) at io.jenkins.plugins.analysis.core.model.DetailFactory.getDisplayNameOfDetails(DetailFactory.java:184) at io.jenkins.plugins.analysis.core.model.DetailFactory.createFilteredView(DetailFactory.java:133) at io.jenkins.plugins.analysis.core.model.DetailFactory.createTrendDetails(DetailFactory.java:89) at io.jenkins.plugins.analysis.core.model.IssuesDetail.getDynamic(IssuesDetail.java:615) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:393) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:208) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:455) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) Caused: javax.servlet.ServletException [REDACTED the rest]
This could possibly be fixed by omitting the link to the per-tool report if there were no issues from that tool. However, it would be better to keep the link and fix the report, because the per-tool trend graph may still be interesting to users.
Attachments
Issue Links
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Description |
I had configured aggregated reporting in Warnings Next Generation, like this:
{code:groovy} recordIssues( tools: [ docFx(pattern: 'obj/docfx.log.json', reportEncoding: 'UTF-8'), msBuild(pattern: 'MSBuild.log', reportEncoding: 'UTF-8')], qualityGates: [ [threshold: 1, type: 'TOTAL_NORMAL', unstable: true], [threshold: 1, type: 'TOTAL_HIGH', unstable: false], [threshold: 1, type: 'TOTAL_ERROR', unstable: false]], sourceCodeEncoding: 'UTF-8', publishAllIssues: true, aggregatingResults: true) {code} The build wrote some warnings to obj/docfx.log.json but none to MSBuild.log. After the build, Jenkins displayed: {quote} Static Analysis: 9 warnings (from 2 analyses) * Static analysis results from: MSBuild, DocFX * New issues: 9 * Reference build: PR-70 #31 * Quality gate: Unstable {quote} I clicked the "DocFX" link and Jenkins correctly displayed the warnings reported by DocFX. I then returned to the previous page and clicked the "MSBuild" link. That caused an error: {quote} Oops! A problem occurred while processing the request. Logging ID=202cc84a-ee54-4e33-9132-1ced637bf249 {quote} The Jenkins log contains: {noformat} marraskuuta 11, 2021 1:49:17 IP. WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleException Caught unhandled exception with ID 202cc84a-ee54-4e33-9132-1ced637bf249 java.lang.IndexOutOfBoundsException: No such index 0 in - (-): 0 issues (0 duplicates) at edu.hm.hafner.analysis.Report.get(Report.java:517) at io.jenkins.plugins.analysis.core.model.DetailFactory.getPropertyValueAsString(DetailFactory.java:201) at io.jenkins.plugins.analysis.core.model.DetailFactory.getDisplayNameOfDetails(DetailFactory.java:184) at io.jenkins.plugins.analysis.core.model.DetailFactory.createFilteredView(DetailFactory.java:133) at io.jenkins.plugins.analysis.core.model.DetailFactory.createTrendDetails(DetailFactory.java:89) at io.jenkins.plugins.analysis.core.model.IssuesDetail.getDynamic(IssuesDetail.java:615) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:393) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:208) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:455) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) Caused: javax.servlet.ServletException [REDACTED the rest] {noformat} This could possibly be fixed by omitting the link to the per-source report if there were no issues from that source. However, it would be better to keep the link and fix the report, because the per-source trend graph may still be interesting to users. |
I had configured aggregated reporting in Warnings Next Generation, like this:
{code:groovy} recordIssues( tools: [ docFx(pattern: 'obj/docfx.log.json', reportEncoding: 'UTF-8'), msBuild(pattern: 'MSBuild.log', reportEncoding: 'UTF-8')], qualityGates: [ [threshold: 1, type: 'TOTAL_NORMAL', unstable: true], [threshold: 1, type: 'TOTAL_HIGH', unstable: false], [threshold: 1, type: 'TOTAL_ERROR', unstable: false]], sourceCodeEncoding: 'UTF-8', publishAllIssues: true, aggregatingResults: true) {code} The build wrote some warnings to obj/docfx.log.json but none to MSBuild.log. After the build, Jenkins displayed: {quote}Static Analysis: 9 warnings (from 2 analyses) * Static analysis results from: MSBuild, DocFX * New issues: 9 * Reference build: PR-70 #31 * Quality gate: Unstable{quote} I clicked the "DocFX" link and Jenkins correctly displayed the warnings reported by DocFX. I then returned to the previous page and clicked the "MSBuild" link. That caused an error: {quote}Oops! A problem occurred while processing the request. Logging ID=202cc84a-ee54-4e33-9132-1ced637bf249 {quote} The Jenkins log contains: {noformat} marraskuuta 11, 2021 1:49:17 IP. WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleException Caught unhandled exception with ID 202cc84a-ee54-4e33-9132-1ced637bf249 java.lang.IndexOutOfBoundsException: No such index 0 in - (-): 0 issues (0 duplicates) at edu.hm.hafner.analysis.Report.get(Report.java:517) at io.jenkins.plugins.analysis.core.model.DetailFactory.getPropertyValueAsString(DetailFactory.java:201) at io.jenkins.plugins.analysis.core.model.DetailFactory.getDisplayNameOfDetails(DetailFactory.java:184) at io.jenkins.plugins.analysis.core.model.DetailFactory.createFilteredView(DetailFactory.java:133) at io.jenkins.plugins.analysis.core.model.DetailFactory.createTrendDetails(DetailFactory.java:89) at io.jenkins.plugins.analysis.core.model.IssuesDetail.getDynamic(IssuesDetail.java:615) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:393) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:405) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:208) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:455) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) Caused: javax.servlet.ServletException [REDACTED the rest] {noformat} This could possibly be fixed by omitting the link to the per-tool report if there were no issues from that tool. However, it would be better to keep the link and fix the report, because the per-tool trend graph may still be interesting to users. |
Summary | IndexOutOfBoundsException when clicking a per-source report that did not have any warnings | IndexOutOfBoundsException when clicking a per-tool report that did not have any warnings |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Fixed but Unreleased [ 10203 ] |
Remote Link | This issue links to "PR #1120 (Web Link)" [ 27238 ] |
Resolution | Fixed [ 1 ] | |
Status | Fixed but Unreleased [ 10203 ] | Reopened [ 4 ] |
Released As | https://github.com/jenkinsci/warnings-ng-plugin/releases/tag/v9.8.0 | |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Fixed but Unreleased [ 10203 ] |
Status | Fixed but Unreleased [ 10203 ] | Resolved [ 5 ] |
Actually, I get the same error when I click the per-tool report link after a build in which neither tool reported any warnings.