This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] Notes from running OpenHatch on Heroku (patch attached)

Jason Michalski armooo at armooo.net
Fri Feb 17 03:11:28 UTC 2012


On Mon, Feb 13, 2012 at 3:02 PM, Asheesh Laroia <asheesh at asheesh.org> wrote:
> If someone wants to look into this (I think armooo might be interested,
> actually!), that would be swell. I'm not going to look into this any more
> during February, I expect, but I would totally merge patches and give
> feedback to anyone who wants to look into this.

It looks like the migrations are currently in a strange state on the
trunk 6369ccb. They work and tests pass with both sqlite and mysql
myisam and fail on both innodb and postgresql.

The good news is that I have a patch so the migrations will run on
postgresql, the bad news is that most of the tests fail. The fixture
data depends on PKs so the when TestCase resets the database state
with a rollback the PKs as are already in use for the next test.
Changing the tests to use TransactionTestCase, which truncates the
tables after each test, fixes most of the tests but makes them much
slower (90min on my desktop (not the fastest disk around)). With this
I have 3 tests failing in mysite.customs.tests.DataExport, which I
would expect from the FK problems importing the data.

It looks like the correct fix for this is to use the natural key
support in django's serialization. It looks like any model that is
exported or used in a fixture would need to have a natural_key and
get_by_natural_key method added.

The branch using the migrations is up at
http://cold-rain-6715.herokuapp.com/ and the changes are at
https://github.com/armooo/oh-mainline/commits/heroku .

-- jason


More information about the Devel mailing list