Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53860

Actions from com.github.jenkins.lastchanges.LastChangesProjectAction$LastChangesActionFactory@72b8d345 for hudson.model.FreeStyleProject@40fdcb64[testing/limit-hosts] included null not assignable to interface hudson.model.Action

    • Last Changes 2.6.8

      After the last Jenkins update (from 2.140 to 2.144) I see a lot of warnings in the Jenkins logs:

       

      Actions from com.github.jenkins.lastchanges.LastChangesProjectAction$LastChangesActionFactory@72b8d345 for hudson.model.FreeStyleProject@40fdcb64[testing/limit-hosts] included null not assignable to interface hudson.model.Action
      

      It doesn't affect each job, but - what is the most surprising - also some jobs without SCM configured have that warning (example in the logs above). In the attachment, you can find an XML of this job (it's just a simple job with one parameter and one shell step).

      Such logs appear after I open a job. It's not needed to configure or run a job. The problem exists in both types - with Last Changes active and configured and without that.

          [JENKINS-53860] Actions from com.github.jenkins.lastchanges.LastChangesProjectAction$LastChangesActionFactory@72b8d345 for hudson.model.FreeStyleProject@40fdcb64[testing/limit-hosts] included null not assignable to interface hudson.model.Action

          Oleg Nenashev added a comment - - edited

          The fact it appears in 2.144 may be somehow related to the JENKINS-53353 fix in https://github.com/jenkinsci/jenkins/pull/3608  (CC agentgonzo). It enabled proper handling of actions, and most likely it leads to proper calculation of this one. But I believe it is coincidence, Jenkins behaves correctly

          The Last Changes plugin returns null singleton here: https://github.com/jenkinsci/last-changes-plugin/blob/57a22d9c5814254f240365a40f5169ca834abd62/src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java#L61

          It was introduced by rmpestano 23 days ago in https://github.com/jenkinsci/last-changes-plugin/commit/57a22d9c5814254f240365a40f5169ca834abd62 . The fix changes invalid null return value to invalid singleton null. I believe that Jenkins returns error properly. According to https://javadoc.jenkins.io/jenkins/model/TransientActionFactory.html#createFor-T- , an empty list should be returned in this line

           

           

          Oleg Nenashev added a comment - - edited The fact it appears in 2.144 may be somehow related to the JENKINS-53353 fix in https://github.com/jenkinsci/jenkins/pull/3608   (CC agentgonzo ). It enabled proper handling of actions, and most likely it leads to proper calculation of this one. But I believe it is coincidence, Jenkins behaves correctly The Last Changes plugin returns null singleton here: https://github.com/jenkinsci/last-changes-plugin/blob/57a22d9c5814254f240365a40f5169ca834abd62/src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java#L61 It was introduced by rmpestano 23 days ago in https://github.com/jenkinsci/last-changes-plugin/commit/57a22d9c5814254f240365a40f5169ca834abd62 . The fix changes invalid null return value to invalid singleton null. I believe that Jenkins returns error properly. According to https://javadoc.jenkins.io/jenkins/model/TransientActionFactory.html#createFor-T- , an empty list should be returned in this line    

          v2.6.8 was just released with the fix. Thank you again oleg_nenashev!

          Rafael Pestano added a comment - v2.6.8 was just released with the fix. Thank you again oleg_nenashev !

            rmpestano Rafael Pestano
            ewypych Emil Wypych
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: