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

email-ext plugin does not save configuration on job

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • email-ext-plugin
    • Email-ext plugin version 2.24.1 / 2.25
      Jenkins version LTS 1.446.2 / LTS 1.480.2

      Each job lost the stored email addresses.
      $DEFAULT_RECIPITENS is the env that I see each time I reopen a previously confiugred job.
      This does not allow to communicate to developers the failing builds.

        1. ext-email.jpg
          ext-email.jpg
          110 kB
        2. issue_snapshot.png
          issue_snapshot.png
          71 kB
        3. jenkins_email_ext.png
          jenkins_email_ext.png
          77 kB

          [JENKINS-15442] email-ext plugin does not save configuration on job

          Code changed in jenkins
          User: Alex Earl
          Path:
          src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
          src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.groovy
          src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/7ba282f904ebdf52cd2241a1a41307b9e13b248e
          Log:
          Fix JENKINS-15442

          Removed check for triggers to determine configured state.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.groovy src/test/java/hudson/plugins/emailext/ExtendedEmailPublisherTest.java http://jenkins-ci.org/commit/email-ext-plugin/7ba282f904ebdf52cd2241a1a41307b9e13b248e Log: Fix JENKINS-15442 Removed check for triggers to determine configured state.

          > No, if there are no triggers, no email will be sent.

          I guess I had assumed this, as well. I had it in my mind that triggers were for overrides. In fact, I want the same email for all runs of my job, no matter the result. Shall I open a feature request that would add functionality for this? I'd rather not have to add all triggers every time.

          Ken Raffenetti added a comment - > No, if there are no triggers, no email will be sent. I guess I had assumed this, as well. I had it in my mind that triggers were for overrides. In fact, I want the same email for all runs of my job, no matter the result. Shall I open a feature request that would add functionality for this? I'd rather not have to add all triggers every time.

          Alex Earl added a comment -

          Please do open a feature request.

          Alex Earl added a comment - Please do open a feature request.

          Alex Earl added a comment -

          Changed the way the plugin determines if it is configured or not.

          Alex Earl added a comment - Changed the way the plugin determines if it is configured or not.

          Baskaran D added a comment -

          Even I am facing the same issue. I do notice some exceptions (NPE) related to this email-ext plugin while booting up the jenkins. It may help to debug the issue.

          Apr 4, 2014 4:40:04 AM hudson.model.Descriptor load
          WARNING: Failed to load /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml
          hudson.util.IOException2: Unable to read /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml
          	at hudson.XmlFile.unmarshal(XmlFile.java:170)
          	at hudson.model.Descriptor.load(Descriptor.java:779)
          	at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.<init>(ExtendedEmailPublisherDescriptor.java:336)
          	at hudson.plugins.emailext.ExtendedEmailPublisher.<clinit>(ExtendedEmailPublisher.java:783)
          	at hudson.plugins.emailext.EmailExtensionPlugin.addEmailTriggerPlugin(EmailExtensionPlugin.java:77)
          	at hudson.plugins.emailext.EmailExtensionPlugin.start(EmailExtensionPlugin.java:58)
          	at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:377)
          	at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:366)
          	at hudson.PluginManager$2$1$1.run(PluginManager.java:355)
          	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
          	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
          	at jenkins.model.Jenkins$7.runTask(Jenkins.java:899)
          	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
          	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          	at java.lang.Thread.run(Thread.java:662)
          Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
          ---- Debugging information ----
          cause-exception     : java.lang.NullPointerException
          cause-message       : null
          class               : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          required-type       : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          converter-type      : hudson.util.RobustReflectionConverter
          path                : /hudson.plugins.emailext.ExtendedEmailPublisherDescriptor
          line number         : 22
          version             : not available
          -------------------------------
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
          	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
          	at hudson.util.XStream2.unmarshal(XStream2.java:109)
          	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
          	at hudson.XmlFile.unmarshal(XmlFile.java:166)
          	... 16 more
          Caused by: java.lang.NullPointerException
          	at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:179)
          	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:312)
          	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
          	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
          	... 25 more
          Apr 4, 2014 4:40:04 AM ruby.RubyRuntimePlugin start
          

          Baskaran D added a comment - Even I am facing the same issue. I do notice some exceptions (NPE) related to this email-ext plugin while booting up the jenkins. It may help to debug the issue. Apr 4, 2014 4:40:04 AM hudson.model.Descriptor load WARNING: Failed to load /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml hudson.util.IOException2: Unable to read /export/jenkins/hudson.plugins.emailext.ExtendedEmailPublisher.xml at hudson.XmlFile.unmarshal(XmlFile.java:170) at hudson.model.Descriptor.load(Descriptor.java:779) at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.<init>(ExtendedEmailPublisherDescriptor.java:336) at hudson.plugins.emailext.ExtendedEmailPublisher.<clinit>(ExtendedEmailPublisher.java:783) at hudson.plugins.emailext.EmailExtensionPlugin.addEmailTriggerPlugin(EmailExtensionPlugin.java:77) at hudson.plugins.emailext.EmailExtensionPlugin.start(EmailExtensionPlugin.java:58) at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:377) at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:366) at hudson.PluginManager$2$1$1.run(PluginManager.java:355) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null ---- Debugging information ---- cause-exception : java.lang.NullPointerException cause-message : null class : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor required-type : hudson.plugins.emailext.ExtendedEmailPublisherDescriptor converter-type : hudson.util.RobustReflectionConverter path : /hudson.plugins.emailext.ExtendedEmailPublisherDescriptor line number : 22 version : not available ------------------------------- at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061) at hudson.util.XStream2.unmarshal(XStream2.java:109) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045) at hudson.XmlFile.unmarshal(XmlFile.java:166) ... 16 more Caused by: java.lang.NullPointerException at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:179) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:312) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) ... 25 more Apr 4, 2014 4:40:04 AM ruby.RubyRuntimePlugin start

          Alex Earl added a comment -

          This looks like a completely different problem. Please post your hudson.plugins.emailext.ExtendedEmailPublisher.xml file.

          Alex Earl added a comment - This looks like a completely different problem. Please post your hudson.plugins.emailext.ExtendedEmailPublisher.xml file.

          Baskaran D added a comment -

          @Alex Earl - Currently, I upgraded my email-ext plugin to v2.34, where i am not seeing this problem.

          I got this when I followed the workaround provided by Jhon Cruz and restarted my jenkins.

          However..

          Current content in hudson.plugins.emailext.ExtendedEmailPublisher.xml file
          <?xml version='1.0' encoding='UTF-8'?>
          <hudson.plugins.emailext.ExtendedEmailPublisherDescriptor plugin="email-ext@2.34">
            <hudsonUrl>http://ci.net/</hudsonUrl>
            <adminAddress>Jenkins@test.com</adminAddress>
            <smtpHost>gmail-smtp-in.l.google.com</smtpHost>
            <useSsl>false</useSsl>
            <defaultContentType>text/plain</defaultContentType>
            <defaultSubject>$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!</defaultSubject>
            <defaultBody>$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:&#xd;
          &#xd;
          Check console output at $BUILD_URL to view the results.</defaultBody>
            <defaultPresendScript></defaultPresendScript>
            <maxAttachmentSize>-1</maxAttachmentSize>
            <recipientList></recipientList>
            <defaultReplyTo></defaultReplyTo>
            <excludedCommitters></excludedCommitters>
            <overrideGlobalSettings>true</overrideGlobalSettings>
            <precedenceBulk>false</precedenceBulk>
            <debugMode>false</debugMode>
            <enableSecurity>false</enableSecurity>
            <enableWatching>false</enableWatching>
          </hudson.plugins.emailext.ExtendedEmailPublisherDescriptor>
          

          I cannot downgrade again now.

          Baskaran D added a comment - @ Alex Earl - Currently, I upgraded my email-ext plugin to v2.34, where i am not seeing this problem. I got this when I followed the workaround provided by Jhon Cruz and restarted my jenkins. However.. Current content in hudson.plugins.emailext.ExtendedEmailPublisher.xml file <?xml version= '1.0' encoding= 'UTF-8' ?> <hudson.plugins.emailext.ExtendedEmailPublisherDescriptor plugin= "email-ext@2.34" > <hudsonUrl> http://ci.net/ </hudsonUrl> <adminAddress> Jenkins@test.com </adminAddress> <smtpHost> gmail-smtp-in.l.google.com </smtpHost> <useSsl> false </useSsl> <defaultContentType> text/plain </defaultContentType> <defaultSubject> $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS! </defaultSubject> <defaultBody> $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:&#xd; &#xd; Check console output at $BUILD_URL to view the results. </defaultBody> <defaultPresendScript> </defaultPresendScript> <maxAttachmentSize> -1 </maxAttachmentSize> <recipientList> </recipientList> <defaultReplyTo> </defaultReplyTo> <excludedCommitters> </excludedCommitters> <overrideGlobalSettings> true </overrideGlobalSettings> <precedenceBulk> false </precedenceBulk> <debugMode> false </debugMode> <enableSecurity> false </enableSecurity> <enableWatching> false </enableWatching> </hudson.plugins.emailext.ExtendedEmailPublisherDescriptor> I cannot downgrade again now.

          Alex Earl added a comment -

          Version 2.34 is still pretty old. Everything looks fine in the file. If you are no longer seeing the issue, then I won't worry.

          Alex Earl added a comment - Version 2.34 is still pretty old. Everything looks fine in the file. If you are no longer seeing the issue, then I won't worry.

          Baskaran D added a comment -

          No more updates available on jenkins pluginManager page. This might be because my Jenkins is running on ver. 1.532.

          Baskaran D added a comment - No more updates available on jenkins pluginManager page. This might be because my Jenkins is running on ver. 1.532.

          Alex Earl added a comment -

          Could be, if you were running LTS (1.532.x), it would be up to 2.37.2.2

          Alex Earl added a comment - Could be, if you were running LTS (1.532.x), it would be up to 2.37.2.2

            slide_o_mix Alex Earl
            frido82 Federico Paolantoni
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: