Ticket #960 (new task)

Opened 3 years ago

Last modified 15 months ago

Convert all buildbot classes to new style, i.e. inherit from object.

Reported by: maruel Owned by:
Priority: major Milestone: 1.0.+
Version: 0.8.1 Keywords: tests
Cc:

Description

That would permit to do some fixes w.r.t. make reconfig. The only issue remaining that catlee raised is ComparableMixin? since it compares type(self), type(them).

Change History

comment:1 Changed 3 years ago by dustin

  • Keywords tests added
  • Milestone changed from undecided to 0.8.2

So we'll need a bit more test coverage first, but I don't see a big reason not to do this.

By the way, the fixes wrt reconfig are described here:

 http://atlee.ca/blog/2008/11/21/python-reload-danger-here-be-dragons

comment:2 Changed 3 years ago by catlee

We should sprinkle some __slots__ goodness around at the same time. A simple change uses the following sizes, according to asizeof[1]:

Current old-style class:  2576 bytes
New-style class:          2568 bytes
New-style class w/ slots: 1144 bytes

[1]  http://code.activestate.com/recipes/546530/

comment:3 Changed 3 years ago by dustin

  • Keywords tests, ship-this added; tests removed

+1.5!

comment:4 Changed 3 years ago by dustin

  • Milestone changed from 0.8.2 to 0.8.3

Let's do this at the beginning of 0.8.3 and see what breaks.

comment:5 Changed 3 years ago by catlee

comment:6 Changed 3 years ago by dustin

  • Keywords tests added; tests, ship-this removed
  • Milestone changed from 0.8.3 to 0.8.+

This fails badly when unpickling builds from previous versions. Comments on the commit -  http://github.com/catlee/buildbot/commit/0593a9dbff1ccc286b06cbbcac3408e7d996b4ae#commitcomment-183550.

One option is to write some sort of conversion code into the unpickling. The other option is to wait for the StatusDB when we're not using pickles anymore. I prefer the latter, honestly..

Also, I'm not so keen on tests looking at the sizes of the classes before and after. It's nice to demonstrate that this has a savings and so on, but it doesn't really constitute a unit test - more of a performance test, I guess.

comment:7 Changed 15 months ago by dustin

  • Milestone changed from 0.8.+ to 1.0.+

I think this will need to wait *longer* than statusdb (#24), since for a good while we'll support upgrading from pickles to statusdb.

comment:8 Changed 15 months ago by tom.prince

We can probably change this after statusdb lands.

  1. Provide a separate tool for upgrading pickles.
  2. Provide a custom unpickler, that overrides find_class to redirect objects to compatibility classes.
Note: See TracTickets for help on using tickets.