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

Promotion Console Log

    XMLWordPrintable

Details

    Description

      Promotion console log is showing build log. This started to happen after the plugins update I did.

      Attachments

        Issue Links

          Activity

            felipeleite Felipe Leite created issue -

            Downgrade to 3.2 fixes the issue.

            andrewmcgilvray Andrew McGilvray added a comment - Downgrade to 3.2 fixes the issue.
            ashetty Rita S made changes -
            Field Original Value New Value
            Attachment image-2019-08-01-10-53-08-973.png [ 48165 ]
            ashetty Rita S added a comment -

            How do I downgrade the plugin, I don't see the downgrade button.

            ashetty Rita S added a comment - How do I downgrade the plugin, I don't see the downgrade button.
            andrewmcgilvray Andrew McGilvray made changes -
            Attachment jenkins_downgrade.png [ 48170 ]

            Are you in the "Installed" tab?

            andrewmcgilvray Andrew McGilvray added a comment - Are you in the "Installed" tab?
            felipeleite Felipe Leite added a comment -

            Thanks Andrew. I did that. but the idea was publish here to get fixed.

            felipeleite Felipe Leite added a comment - Thanks Andrew. I did that. but the idea was publish here to get fixed.
            tsondergaard tsondergaard added a comment -

            I am seeing the same problem and downgrading to 3.2 does indeed solve the problem.

            tsondergaard tsondergaard added a comment - I am seeing the same problem and downgrading to 3.2 does indeed solve the problem.
            froque Filipe Roque added a comment -

            I wasted some time with this bug. From what I can tell, the bug was introduced with commit 0a9e67654a0f072601fb3a24d420c3c09ebfd843, when upgrading jenkins.version property from 2.60.3 to 2.138.4.

            It happens because of commit ba33bd67cdaef87aba8a4e95dca8dcf108a7d73f , in 2.138.2, which added an interface StaplerProxy to class Run. This interface defines a method Object getTarget() with an implementation in class Run.

            The Promotion class, which derives from Run, also has a method getTarget but with return type AbstractBuild<?,?>, so a synthetic method, with return type Object, is created by the compiler which invokes AbstractBuild<?,?> getTarget().

             

            javap -v ./promoted-builds-2.138.2/WEB-INF/lib/promoted-builds/hudson/plugins/promoted_builds/Promotion.class
            
              public hudson.model.AbstractBuild<?, ?> getRootBuild();
                descriptor: ()Lhudson/model/AbstractBuild;
                flags: (0x0001) ACC_PUBLIC
                Code:
                  stack=1, locals=1, args_size=1
                     0: aload_0
                     1: invokevirtual #9                  // Method getTarget:()Lhudson/model/AbstractBuild;
                     4: invokevirtual #10                 // Method hudson/model/AbstractBuild.getRootBuild:()Lhudson/model/AbstractBuild;
                     7: areturn
                  LineNumberTable:
                    line 93: 0
                  LocalVariableTable:
                    Start  Length  Slot  Name   Signature
                        0       8     0  this   Lhudson/plugins/promoted_builds/Promotion;
                Signature: #185                         // ()Lhudson/model/AbstractBuild<**>;
            

             

            Renaming AbstractBuild<?,?> getTarget()  to AbstractBuild<?,?> getTarget2() fixes the bug, but I have no idea of its impacts because of the @Exported annotation.

            Note: the new Object getTarget() method in Run as an annotation @Restricted(NoExternalUse.class)  but I don't understand its meaning.

             

             

            froque Filipe Roque added a comment - I wasted some time with this bug. From what I can tell, the bug was introduced with commit 0a9e67654a0f072601fb3a24d420c3c09ebfd843 , when upgrading jenkins.version property from 2.60.3 to 2.138.4. It happens because of commit ba33bd67cdaef87aba8a4e95dca8dcf108a7d73f  , in 2.138.2, which added an interface StaplerProxy to class Run . This interface defines a method Object getTarget() with an implementation in class Run . The Promotion class, which derives from Run , also has a method getTarget but with return type AbstractBuild<?,?> , so a synthetic method, with return type Object, is created by the compiler which invokes AbstractBuild<?,?> getTarget().   javap -v ./promoted-builds-2.138.2/WEB-INF/lib/promoted-builds/hudson/plugins/promoted_builds/Promotion.class public hudson.model.AbstractBuild<?, ?> getRootBuild(); descriptor: ()Lhudson/model/AbstractBuild; flags: (0x0001) ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: invokevirtual #9 // Method getTarget:()Lhudson/model/AbstractBuild; 4: invokevirtual #10 // Method hudson/model/AbstractBuild.getRootBuild:()Lhudson/model/AbstractBuild; 7: areturn LineNumberTable: line 93: 0 LocalVariableTable: Start Length Slot Name Signature 0 8 0 this Lhudson/plugins/promoted_builds/Promotion; Signature: #185 // ()Lhudson/model/AbstractBuild<**>;   Renaming AbstractBuild<?,?> getTarget()   to AbstractBuild<?,?> getTarget2() fixes the bug, but I have no idea of its impacts because of the @Exported annotation. Note: the new Object getTarget() method in Run as an annotation @Restricted(NoExternalUse.class)   but I don't understand its meaning.    
            danielbeck Daniel Beck added a comment -

            I proposed a PR fixing this as JENKINS-59600 so closing this as a duplicate of that later issue.

            FWIW the previous comment's analysis appears correct and that's essentially what my fix does (while keeping the remote API the same).

            danielbeck Daniel Beck added a comment - I proposed a PR fixing this as JENKINS-59600 so closing this as a duplicate of that later issue. FWIW the previous comment's analysis appears correct and that's essentially what my fix does (while keeping the remote API the same).
            danielbeck Daniel Beck made changes -
            Link This issue duplicates JENKINS-59600 [ JENKINS-59600 ]
            danielbeck Daniel Beck made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]
            oleg_nenashev Oleg Nenashev added a comment - Thanks to danielbeck , the fix was released in 3.4:  https://github.com/jenkinsci/promoted-builds-plugin/releases/tag/promoted-builds-3.4

            People

              oleg_nenashev Oleg Nenashev
              felipeleite Felipe Leite
              Votes:
              12 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: