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

Delivery Pipeline View broken because of NoSuchMethodError on PromotionStatusWrapper.getIcon(String)

      We're using the delivery-pipeline-plugin to visualize our job chains aka build pipelines.

      As soon as the "Initial Job" job of the Delivery Pipeline View has a successful promotion, the view is broken with "Error communicating to server!" and cannot be used anymore.

      In the Jenkins log we see the following: 

      java.lang.NoSuchMethodError: 'java.lang.String hudson.plugins.promoted_builds.Status.getIcon(java.lang.String)'
              at se.diabol.jenkins.pipeline.domain.status.promotion.PromotionStatusProvider$PromotionStatusWrapper.getIcon(PromotionStatusProvider.java:129)
              at se.diabol.jenkins.pipeline.domain.status.promotion.PromotionStatusProvider.buildNewPromotionStatus(PromotionStatusProvider.java:82)
              at se.diabol.jenkins.pipeline.domain.status.promotion.PromotionStatusProvider.getPromotionStatusList(PromotionStatusProvider.java:65)
              at se.diabol.jenkins.pipeline.domain.status.SimpleStatus.getPromotionStatusList(SimpleStatus.java:235)
              at se.diabol.jenkins.pipeline.domain.status.SimpleStatus.getStatusFromResult(SimpleStatus.java:200)
              at se.diabol.jenkins.pipeline.domain.status.SimpleStatus.resolveStatus(SimpleStatus.java:170)
              at se.diabol.jenkins.pipeline.domain.task.Task.getLatestTask(Task.java:195)
              at se.diabol.jenkins.pipeline.domain.Stage.createLatestStage(Stage.java:219)
              at se.diabol.jenkins.pipeline.domain.Pipeline.getPipelines(Pipeline.java:352)
              at se.diabol.jenkins.pipeline.domain.Pipeline.createPipelineLatest(Pipeline.java:322)
              at se.diabol.jenkins.pipeline.DeliveryPipelineView.getComponent(DeliveryPipelineView.java:587)
              at se.diabol.jenkins.pipeline.DeliveryPipelineView.getPipelines(DeliveryPipelineView.java:538)
              at org.kohsuke.stapler.export.MethodProperty.getValue(MethodProperty.java:76)
       

      This is related to the fix for JENKINS-68320, which changed the "getIcons(String size)" method to "getIcon()" only (without the "size" parameter).

      Either the delivery-pipeline plugin must be adapted to the changes in the promoted-builds plugin

      or the old "getIcon(String size)" method in the promoted-builds plugin must be kept for backwards compatibility reasons.

          [JENKINS-72527] Delivery Pipeline View broken because of NoSuchMethodError on PromotionStatusWrapper.getIcon(String)

          Mark Waite added a comment - - edited

          Thanks for the report. Based on the 68% health score of the delivery Pipeline plugin, the absence of a link to the source code of the plugin on the plugins site, and the ancient dependencies that are bundled inside the delivery pipeline plugin (Guava 18, httpclient 4.4.6, and more), and the general non-responses from maintainers of the plugin, I think that the delivery pipeline plugin should be considered unmaintained.

          The repository permissions data does not include a link to source code either.

          Adding that API entry point back into the promoted builds plugin is possible, but the Jenkins icons have evolved so that the API no longer makes sense. You're probably best to switch away from the unmaintained delivery pipeline plugin to some other visualization like Pipeline graph view.

          https://github.com/Diabol/delivery-pipeline-plugin appears that it might be the plugin source code. If you would like to modernize the plugin, adopt it, and propose that it be hosted in the jenkinsci organization, I'm sure there are people that are willing to answer questions.

          Mark Waite added a comment - - edited Thanks for the report. Based on the 68% health score of the delivery Pipeline plugin, the absence of a link to the source code of the plugin on the plugins site , and the ancient dependencies that are bundled inside the delivery pipeline plugin (Guava 18, httpclient 4.4.6, and more), and the general non-responses from maintainers of the plugin, I think that the delivery pipeline plugin should be considered unmaintained. The repository permissions data does not include a link to source code either. Adding that API entry point back into the promoted builds plugin is possible, but the Jenkins icons have evolved so that the API no longer makes sense. You're probably best to switch away from the unmaintained delivery pipeline plugin to some other visualization like Pipeline graph view. https://github.com/Diabol/delivery-pipeline-plugin appears that it might be the plugin source code. If you would like to modernize the plugin , adopt it , and propose that it be hosted in the jenkinsci organization, I'm sure there are people that are willing to answer questions.

          René Zanner added a comment -

          Thanks for the quick response. I think I'm taking the time to fix the delivery-pipeline-plugin and go the "modernize, adopt and host in jenkinsci organization" way you proposed.

          René Zanner added a comment - Thanks for the quick response. I think I'm taking the time to fix the delivery-pipeline-plugin and go the "modernize, adopt and host in jenkinsci organization" way you proposed.

          Luis added a comment -

          Same problem here, please let me know if there's something I can help with rzanner 

          Luis added a comment - Same problem here, please let me know if there's something I can help with rzanner  

          René Zanner added a comment -

          luiselizondo: At the moment I’m in the hospital and can’t work on it, but I already tried to go the „Adopt the plug-in“ way without success.

          The project is that old, that it’s not just a matter of a dependency update - the whole pom.xml needs to be rewritten. 

          Just updating the „promoted builds“ dependency wasn’t possible - the build failed because of the required higher JDK version. 

          You can play around with it as you wish - I’ll not be able to complete this soon. Our work-around was to stick to an older version of the plug-in. 

          René Zanner added a comment - luiselizondo : At the moment I’m in the hospital and can’t work on it, but I already tried to go the „Adopt the plug-in“ way without success. The project is that old, that it’s not just a matter of a dependency update - the whole pom.xml needs to be rewritten.  Just updating the „promoted builds“ dependency wasn’t possible - the build failed because of the required higher JDK version.  You can play around with it as you wish - I’ll not be able to complete this soon. Our work-around was to stick to an older version of the plug-in. 

          Mark Waite added a comment -

          luiselizondo are you interested in modernizing the plugin, adopting it, and proposing that it be hosted in the jenkinsci organization? We might be able to find someone that can help with the steps that were a problem for rzanner, but we need one or more users of the plugin that are interested in maintaining it.

          Mark Waite added a comment - luiselizondo are you interested in modernizing the plugin, adopting it, and proposing that it be hosted in the jenkinsci organization? We might be able to find someone that can help with the steps that were a problem for rzanner , but we need one or more users of the plugin that are interested in maintaining it.

          Luis added a comment -

          Hi markewaite I would need to analyse the plugin before making a commitment. This is a critical plugin for us and we don't have a way to replace it.

          rzanner I hope is nothing serious. Just out of curiosity, what is the versions of Jenkins and the plugin that you are using? We just couldn't update to the latest Jenkins version because of this.

          Luis added a comment - Hi markewaite I would need to analyse the plugin before making a commitment. This is a critical plugin for us and we don't have a way to replace it. rzanner I hope is nothing serious. Just out of curiosity, what is the versions of Jenkins and the plugin that you are using? We just couldn't update to the latest Jenkins version because of this.

          René Zanner added a comment -

          luiselizondo: thanks for the empathy, it was a planned surgery, nothing serious. 

          We’re using the Jenkins and Delivery Pipeline plug-in versions as stated in the ticket above.
          For the promoted builds plug-in we’re stuck to 940… - that was the only version we could automatically rollback to.

          René Zanner added a comment - luiselizondo : thanks for the empathy, it was a planned surgery, nothing serious.  We’re using the Jenkins and Delivery Pipeline plug-in versions as stated in the ticket above. For the promoted builds plug-in we’re stuck to 940… - that was the only version we could automatically rollback to.

          Gianluca added a comment -

          Hello. I am Gianluca, a Rene's colleague. I have already fixed the issue and I am currently working on the modernization of the Plugin.

          Gianluca added a comment - Hello. I am Gianluca, a Rene's colleague. I have already fixed the issue and I am currently working on the modernization of the Plugin.

          Mark Waite added a comment -

          Thanks gsoffredini!

          Mark Waite added a comment - Thanks gsoffredini !

          Gianluca added a comment -

          Hello markewaite 

          I hope you are doing well.

          Due to the fact that maybe the maintainers of the delivery-pipeline-plugin will not approve my pull requests immediately, do you suggest to follow the Modernizing Jenkins Plugins tutorial in any case or could I create a single pull request composed by several commits, one for each modernization step?

          Thank you in advance.

          Gianluca added a comment - Hello markewaite   I hope you are doing well. Due to the fact that maybe the maintainers of the delivery-pipeline-plugin will not approve my pull requests immediately, do you suggest to follow the Modernizing Jenkins Plugins tutorial in any case or could I create a single pull request composed by several commits, one for each modernization step? Thank you in advance.

          Mark Waite added a comment -

          Do you suggest to follow the Modernizing Jenkins Plugins tutorial in any case or could I create a single pull request composed by several commits, one for each modernization step?

          When running those steps myself, I found that if the plugin was very, very out of date, then some pull requests would depend on other pull requests. For example, for some cases I could not update the parent pom until I had also silenced spotbugs warnings. If that is the case for you, then a single larger pull request seems the more likely path. If you don't encounter that type of dependency between pull requests, then smaller pull requests are usually better than larger pull requests because they are easier to review and test.

          Mark Waite added a comment - Do you suggest to follow the Modernizing Jenkins Plugins tutorial in any case or could I create a single pull request composed by several commits, one for each modernization step? When running those steps myself, I found that if the plugin was very, very out of date, then some pull requests would depend on other pull requests. For example, for some cases I could not update the parent pom until I had also silenced spotbugs warnings. If that is the case for you, then a single larger pull request seems the more likely path. If you don't encounter that type of dependency between pull requests, then smaller pull requests are usually better than larger pull requests because they are easier to review and test.

          Gianluca added a comment -

          Thank you for your quick answer markewaite 

          Unfortunately, the plugin is very old and I guess I will have to use a single pull request. reviewable commit by commit.

          Gianluca added a comment - Thank you for your quick answer markewaite   Unfortunately, the plugin is very old and I guess I will have to use a single pull request. reviewable commit by commit.

          Mark Waite added a comment -

          Small commits inside a single pull request still allows you to use the steps of the "Improve a plugin" tutorial. You can even consider creating a branch for each step, but base the branch for the next step on the branch used in the previous step.

          Mark Waite added a comment - Small commits inside a single pull request still allows you to use the steps of the "Improve a plugin" tutorial. You can even consider creating a branch for each step, but base the branch for the next step on the branch used in the previous step.

          jhonathan added a comment -

          Team as they are, I have exactly the same problem but I still can't get the joke, I see that there are a lot of comments about it but I don't know exactly where to approach the topic.

          jhonathan added a comment - Team as they are, I have exactly the same problem but I still can't get the joke, I see that there are a lot of comments about it but I don't know exactly where to approach the topic.

          Mark Waite added a comment -

          jhonaathan95 I don't understand your comment. If you are a user of the delivery Pipeline plugin, you can download the latest build from the master branch from https://ci.jenkins.io/job/Plugins/job/delivery-pipeline-plugin/job/master/ . You can also build the plugin yourself from source code and use it on your Jenkins installation.

          Mark Waite added a comment - jhonaathan95 I don't understand your comment. If you are a user of the delivery Pipeline plugin, you can download the latest build from the master branch from https://ci.jenkins.io/job/Plugins/job/delivery-pipeline-plugin/job/master/ . You can also build the plugin yourself from source code and use it on your Jenkins installation.

          jhonathan added a comment -

          markewaite Sorry if I didn't make myself understood, I currently have an error with the Delivery Pipeline View type views, when they perform a promotion on one of the tasks and it is approved, this view bursts.

          jhonathan added a comment - markewaite Sorry if I didn't make myself understood, I currently have an error with the Delivery Pipeline View type views, when they perform a promotion on one of the tasks and it is approved, this view bursts.

          Gianluca added a comment - - edited

          Hello jhonaathan95, how are you?

          Your problem is clear. We faced the same issue.

          What markewaite said is that, in order to fix the issue in your environment, until we will not build a new release of the plugin itself, you can build the plugin from sources https://github.com/jenkinsci/delivery-pipeline-plugin/ build it in your local environment and install the built plugin in your Jenkins installation.

          Please let me know if I was clear and helpful enough.

          Gianluca added a comment - - edited Hello jhonaathan95 , how are you? Your problem is clear. We faced the same issue. What markewaite said is that, in order to fix the issue in your environment, until we will not build a new release of the plugin itself, you can build the plugin from sources https://github.com/jenkinsci/delivery-pipeline-plugin/  build it in your local environment and install the built plugin in your Jenkins installation. Please let me know if I was clear and helpful enough.

          René Zanner added a comment -

          Hey jhonaathan95, we are maintaining this plugin on a spare-time basis, and in my case it’s for the first time doing something with jenkinsci and GitHub in general, so please be patient until we figured out how to push out a new release with the required adaptations.

          René Zanner added a comment - Hey jhonaathan95 , we are maintaining this plugin on a spare-time basis, and in my case it’s for the first time doing something with jenkinsci and GitHub in general, so please be patient until we figured out how to push out a new release with the required adaptations.

          Mark Waite added a comment -

          I've uploaded a development build from that master branch as delivery-pipeline-plugin.hpi . You can use the Advanced page of the plugin manager to install that version. If you install it, please report your results here. I modernized the plugin without being a user of the plugin, so there is some risk that I broke something unexpectedly.

          Mark Waite added a comment - I've uploaded a development build from that master branch as delivery-pipeline-plugin.hpi . You can use the Advanced page of the plugin manager to install that version. If you install it, please report your results here. I modernized the plugin without being a user of the plugin, so there is some risk that I broke something unexpectedly.

          jhonathan added a comment -

          team, thank you very much for the information and help, of course I will let you know the result.

          jhonathan added a comment - team, thank you very much for the information and help, of course I will let you know the result.

          Erik added a comment -

          Hi,
          Faced the same issue as you guys reported above. Tried to first downgrade the promoted builds plugin which "solved" the problem for us. Instead I tried out the development build by Mark and initially it does seem to work as expected. Haven't tested that much yet but wanted to say good work so far!

          Erik added a comment - Hi, Faced the same issue as you guys reported above. Tried to first downgrade the promoted builds plugin which "solved" the problem for us. Instead I tried out the development build by Mark and initially it does seem to work as expected. Haven't tested that much yet but wanted to say good work so far!

            gsoffredini Gianluca
            rzanner René Zanner
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: