[Buildbot-commits] [Buildbot] #1960: upgrade-master fails when upgrading from pre-db_url configs

Buildbot nobody at buildbot.net
Fri May 13 18:52:05 UTC 2011


#1960: upgrade-master fails when upgrading from pre-db_url configs
----------------------+-----------------------
Reporter:  tfogal     |      Owner:
    Type:  undecided  |     Status:  new
Priority:  major      |  Milestone:  undecided
 Version:  master     |   Keywords:
----------------------+-----------------------
 b105501c1bf8d730eb9b06cbdda521f01a70a292 introduced checks for `db_url`,
 but in doing so it:

 {{{
 def check_db_url(config):
     if expected_db_url and config['db_url'] != expected_db_url:
         raise ValueError("c['db_url'] in the config file ('%s') does"
                     " not match '%s'; please edit the configuration"
                     " file before upgrading." %
                         (config['db_url'], expected_db_url))
 }}}

 The `config['db_url']` part raises a `KeyError` exception if the
 master.cfg is from a version which predates `db_url`.  The solution is
 simply to add `c['db_url'] = "sqlite://state.sqlite"` to the
 configuration.

 It would be nice if upgrade-master could: see that `KeyError` is
 happening, notice that `state.sqlite` exists, and then just add the needed
 line to the configuration.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/1960>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list