[Buildbot-devel] Unreliable reconfig?
Charles Lepple
clepple at gmail.com
Wed Mar 16 00:48:32 UTC 2011
On Tue, Mar 15, 2011 at 1:47 PM, Dustin J. Mitchell <dustin at v.igoro.us> wrote:
> On Tue, Mar 15, 2011 at 9:32 AM, David Coppit <david at coppit.org> wrote:
>> Has anyone else run into problems with reconfig?
>
> Reconfig tends to work pretty well with simple configs, but the more
> modifications, the worse things get. Python's `reload()` has lots of
> known problems with e.g., redefining new classes with the same name as
> old, for one thing.
I have heard of intermittent problems with reconfig, but I guess I
always run reconfig when builds aren't pending, so I haven't been able
to narrow it down to reproducible circumstances.
Back before there was an option to hide messages about
reconfiguration, I used the following code snippet to only reload my
custom build classes when the source file changed:
import foo
py_time = os.stat("foo.py").st_mtime
pyc_time = os.stat("foo.pyc").st_mtime
if py_time >= pyc_time:
reload(foo)
Something like that should minimize the number of reloads, and as
such, redefined classes (if your configuration changes consist mostly
of adding or removing slaves, etc.)
--
- Charles Lepple
More information about the devel
mailing list