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

Build Name Setter Plugin is affected by JEP-200 in Jenkins 2.102+

    XMLWordPrintable

Details

    Description

      Our FreeStyle Jobs which set their build names after the build fail with 2.102. The exception is:

       

      [INFO] ------------------------------------------------------------------------
      Set build name.
      New build name is '15 : CMSD-2740...'
      FATAL: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
      java.lang.UnsupportedOperationException: Refusing to marshal java.io.PrintStream for security reasons; see https://jenkins.io/redirect/class-filter/

      ...

      Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild

      ...
      Caused: java.io.IOException
      at hudson.XmlFile.write(XmlFile.java:201)
      at hudson.model.Run.save(Run.java:1923)
      at hudson.model.Run.setDisplayName(Run.java:803)
      at org.jenkinsci.plugins.buildnamesetter.BuildNameSetter.setDisplayName(BuildNameSetter.java:76)

      The full exception is attached to this ticket.

      Attachments

        Issue Links

          Activity

            oleg_nenashev Oleg Nenashev added a comment - Created https://github.com/jenkinsci/build-name-setter-plugin/pull/17

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/org/jenkinsci/plugins/EnvironmentVarSetter.java
            http://jenkins-ci.org/commit/build-name-setter-plugin/253b15bdb024ac968c853fb8e74ec6fefd952cff
            Log:
            JENKINS-48944 - Prevent serialization of PrintStreams to XStream (JEP-200)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/plugins/EnvironmentVarSetter.java http://jenkins-ci.org/commit/build-name-setter-plugin/253b15bdb024ac968c853fb8e74ec6fefd952cff Log: JENKINS-48944 - Prevent serialization of PrintStreams to XStream (JEP-200)

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            Jenkinsfile
            pom.xml
            src/main/java/org/jenkinsci/plugins/EnvironmentVarSetter.java
            src/main/resources/index.jelly
            src/main/resources/org/jenkinsci/plugins/buildnamesetter/BuildNameSetter/config.jelly
            src/main/resources/org/jenkinsci/plugins/buildnamesetter/BuildNameSetter/help-template.jelly
            src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/config.jelly
            src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-buildName.jelly
            src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-macroFirst.jelly
            src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-macroTemplate.jelly
            http://jenkins-ci.org/commit/build-name-setter-plugin/182b5aef01e3b3d34473ff5cc87bb2c5e89dd10b
            Log:
            Merge pull request #17 from oleg-nenashev/JENKINS-48944-jep-200

            JENKINS-48944 - Prevent serialization of PrintStream to the disk

            Compare: https://github.com/jenkinsci/build-name-setter-plugin/compare/5a576c40707a...182b5aef01e3

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: Jenkinsfile pom.xml src/main/java/org/jenkinsci/plugins/EnvironmentVarSetter.java src/main/resources/index.jelly src/main/resources/org/jenkinsci/plugins/buildnamesetter/BuildNameSetter/config.jelly src/main/resources/org/jenkinsci/plugins/buildnamesetter/BuildNameSetter/help-template.jelly src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/config.jelly src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-buildName.jelly src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-macroFirst.jelly src/main/resources/org/jenkinsci/plugins/buildnameupdater/BuildNameUpdater/help-macroTemplate.jelly http://jenkins-ci.org/commit/build-name-setter-plugin/182b5aef01e3b3d34473ff5cc87bb2c5e89dd10b Log: Merge pull request #17 from oleg-nenashev/ JENKINS-48944 -jep-200 JENKINS-48944 - Prevent serialization of PrintStream to the disk Compare: https://github.com/jenkinsci/build-name-setter-plugin/compare/5a576c40707a...182b5aef01e3
            oleg_nenashev Oleg Nenashev added a comment -

            It has been released in 1.6.8

            oleg_nenashev Oleg Nenashev added a comment - It has been released in 1.6.8
            joenunnelley Joe Nunnelley added a comment -

            I am running 1.6.9 on jenkins 2.107.3 and this issue is still occurring. When I disable the build-name-setter functionality in the job, it succeeds.

            joenunnelley Joe Nunnelley added a comment - I am running 1.6.9 on jenkins 2.107.3 and this issue is still occurring. When I disable the build-name-setter functionality in the job, it succeeds.
            oleg_nenashev Oleg Nenashev added a comment -

            joenunnelley could you please create a new issue and provide a stacktrace there?

            oleg_nenashev Oleg Nenashev added a comment - joenunnelley could you please create a new issue and provide a stacktrace there?

            People

              oleg_nenashev Oleg Nenashev
              hakan Hakan Tandogan
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: