GlobalConfiguration is lost when Jenkins is reloaded via console reloading.

199 views
Skip to first unread message

Doug Hughes

unread,
Oct 8, 2014, 9:37:20 PM10/8/14
to jenkin...@googlegroups.com
Hi,

I'm working to build plugin that contains some global configuration. So far I have one class, an internal descriptor class, and the associated jelly files. The internal descriptor has two properties that are set via the "Configure System" form. This all works correctly. I can see my section in the form. I can provide my values. I can post the form and the data is persisted. If I reload the configuration form I continue to see my settings.

However, if I make changes to my plugin I will want to reload my plugin (obviously). When starting Jenkins via "mvn hpi:run" the console shows this:

[INFO] Started Jetty Server
[INFO] Console reloading is ENABLED. Hit ENTER on the console to restart the context.

So, after I've made some changes I hit enter to reload them. (Ignoring the fact that this doesn't recompile my code, )I have noticed that it doesn't reload my configuration correctly. The values are set back to their defaults and the configuration form doesn't show the values either. But, if I shutdown Jenkins and restart it my settings are reloaded. Or, if I change my settings after the hitting enter to reload the new settings are persisted (until the next reload).

Is this a known problem? It can quickly be reproduced by creating a new hello world builder plugin, starting it via mvn hpi:run, and then configuring it (checking use French). Then hit enter to restart in the console and your configuration will be lost. I've seen this same behavior with the global configuration for maven, subversion, and email notifications. But, it doesn't happen with the Shell plugin. (I'll look there to see if I can figure out why.)

Any thoughts?

Thanks,

Doug

Doug Hughes

unread,
Oct 8, 2014, 9:39:14 PM10/8/14
to jenkin...@googlegroups.com
Actually, I just noticed that the Shell configuration is actually part of the core Jenkins. All of the core configuration appear to get reloaded correctly. For example, the system message and global properties (and shell too).

Thanks,

Doug

evernat

unread,
Oct 9, 2014, 7:27:03 AM10/9/14
to jenkin...@googlegroups.com
This is probably related to
https://issues.jenkins-ci.org/browse/JENKINS-8217

When calling the "/reload" url, system configuration is reloaded, but extensions (tools like Ant) are not reloaded from disk.

Emeric
Reply all
Reply to author
Forward
0 new messages