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)

          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: