Status: Resolved (View Workflow)
JENKINS_VERSION 2.34 (or 2.35)
No plugins installed.
Browsers: Chrome, Firefox
After Update to Jenkins 2.34 and 2.35 we see several exceptions "WARNING: Caught exception evaluating: build.badgeActions" (see below) in the log file. We could easily reproduce this in a fresh new setup without additional installed plugins by:
- Setup a new Build-Job and activate "Discard old builds".
- Execute this job.
- Navigate to the build and activate "Keep this build forever"
- Access the job site.
- => Exception in log file (see below)
- => Lock icon "KeepBuild" not shown. In case of promotions the icons also not appear.
After deactivating "Keep this build forever" the exception does not appear and promotion icons/stars appear again.
… hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: build.badgeActions in /job/test/. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at … Caused by: java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableCollection.add(Collections.java:1055) at hudson.model.Run.getBadgeActions(Run.java:483) ... 161 more
JENKINS-38867 Major Optimization: Create and Use FlowNode.getAction w/o TransientActionFactories
- is duplicated by
JENKINS-40265 Promotion badge icon not showing after jenkins latest update
- is related to
JENKINS-40085 Builds kept forever no longer have an icon
- links to
From quick code inspection, I believe this was the only such case in Jenkins core. And, the associated keepLog functionality had zero test coverage.
Code changed in jenkins
User: Jesse Glick
[FIXED JENKINS-40281] Do not try to mutate the result of getActions(Class).
Experiencing the same problem in 2.35 on Ubuntu 14.04 delivered via Ubuntu package. I think the problem originated in commit 6360b96464f6c2498fe91a089a21992411b2ec34 (https://github.com/jenkinsci/jenkins/commit/6360b96464f6c2498fe91a089a21992411b2ec34) for issue
JENKINS-38867. In `Actionable.java:138`, the change introduced return of the badge actions with `Collections.unmodifiableList()`. The list returned to caller `Run.getBadgeActions()` is then immediately added to, causing the exception.