#25647: Regression with TEST MIRROR database migrations
-----------------------------------+--------------------
     Reporter:  gavinwahl          |      Owner:  nobody
         Type:  Bug                |     Status:  new
    Component:  Testing framework  |    Version:  1.8
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  0
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 I have a project with two databases: 'default' and 'logging', where
 logging is just an alias for default (to allow writing to logging while in
 a transaction in default). I have logging has `'TEST': {'MIRROR':
 'default'}`, and a database router that doesn't allow migrating on
 logging.

 When running the tests, migrations randomly fail to run. This is because
 `get_unique_databases` stores all the aliases for a specific database in a
 set, and then `setup_databases` migrates on the 'first' one, despite sets
 not having a 'first' element. This randomly, based on hash randomization
 in python, picks either 'default' or 'logging' to be migrated. When
 'logging' is migrated, all the migrations are no-ops because migrating is
 turned off for 'logging'.

 I believe this is a regression introduced in 49eee8424.

--
Ticket URL: <https://code.djangoproject.com/ticket/25647>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.2d8da50253ac829a6b2d6d1728567c06%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to