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

CommandLauncher2Test.requireApproval failure due to two copies of SystemCommandLanguage

    XMLWordPrintable

Details

    • 2.185

    Description

      JENKINS-57528 included a bump to the detached script-security which should have been paired with a bump to the detached command-launcher. To reproduce, run

      mvn -f command-launcher-plugin test -Djenkins.version=2.176.1 -Dtest=CommandLauncher2Test\#requireApproval
      

      which passes; now bump its parent to 3.47 and include

      -Djenkins.version=2.176.2-rc28314.ce9ac38e8574 -Pconsume-incrementals
      

      which pulls in this backport by olivergondza and you will get a failure:

      java.lang.AssertionError: expected:<org.jenkinsci.plugins.scriptsecurity.scripts.languages.SystemCommandLanguage@...> but was:<org.jenkinsci.plugins.command_launcher.SystemCommandLanguage@...>
      	at org.junit.Assert.fail(Assert.java:88)
      	at org.junit.Assert.failNotEquals(Assert.java:834)
      	at org.junit.Assert.assertEquals(Assert.java:118)
      	at org.junit.Assert.assertEquals(Assert.java:144)
      	at hudson.slaves.CommandLauncher2Test$1.evaluate(CommandLauncher2Test.java:119)
      

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            While there are three associated pull requests, only jenkins #4099 is important to backport to the stable-2.176 branch.

            jglick Jesse Glick added a comment - While there are three associated pull requests, only jenkins #4099 is important to backport to the stable-2.176 branch.
            oleg_nenashev Oleg Nenashev added a comment -

            It was fixed in Jenkins 2.185

            oleg_nenashev Oleg Nenashev added a comment - It was fixed in Jenkins 2.185

            olivergondza Do you think this could be backported to .3 of the current LTS?

            alecharp Adrien Lecharpentier added a comment - olivergondza Do you think this could be backported to .3 of the current LTS?

            alecharp, 2.176.3 is already complete and is currently being tested without this fix in it. So it will have to wait for the next line.

            olivergondza Oliver Gondža added a comment - alecharp , 2.176.3 is already complete and is currently being tested without this fix in it. So it will have to wait for the next line.

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: