[Buildbot-commits] [Buildbot] #1068: Build history pickles are perpetually re-upgraded

Buildbot buildbot-devel at lists.sourceforge.net
Wed Nov 24 16:44:50 UTC 2010


#1068: Build history pickles are perpetually re-upgraded
----------------------+-----------------------------------------------------
Reporter:  exarkun    |       Owner:           
    Type:  undecided  |      Status:  new      
Priority:  major      |   Milestone:  undecided
 Version:  0.8.2      |    Keywords:           
----------------------+-----------------------------------------------------
 Whenever an out of date build history pickle is loaded, if it isn't the
 latest version, it is upgraded.  Unfortunately, if nothing about the state
 is changed (as is frequently the case), the upgraded version is discarded
 and the upgrade is re-done the next time that pickle is loaded.

 Instead, if the state is upgraded, the pickle should be re-written with
 the upgraded state.  This can be done by marking upgraded objects using a
 simple flag, set to True by any `upgradeToVersionN` method, and then
 checked after `styles.doUpgrade` is called.  If and only if the flag is
 set, the object was upgraded and should be rewritten.  Additionally,
 adding the flag to the `persistenceForgets` tuple on the `Versioned`
 subclass will cause it to be discarded when the object is re-serialized.

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


More information about the Commits mailing list