#34697: Migration serializer for sets results in non-deterministic order.
--------------------------------------+------------------------------------
     Reporter:  Yury V. Zaytsev       |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  4.2
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Yury V. Zaytsev):

 Thank you for your thoughts, Simon!

 > I'm curious of where you experience the flip-flop though. Are you
 generating the same migrations over and over again?

 Yes, your assessment is correct. We are only having these problems in the
 projects, in which we are using Django as a static site or configuration
 generator. In these projects we basically have the databases in YAML
 fixtures with changes workflow controlled by GitHub pull requests.

 If we change the code of the generator itself (and specifically Django
 models), then we re-create the migrations completely, because keeping
 migration history just doesn't make sense. There is no "real" database to
 migrate in the first place, they just bloat the repository and slow the
 generators down... It's working quite nicely and the diffs are very
 readable, if it weren't for annoying flip-flop hunks, which one always has
 to remember to discard from the checkout before committing the changes.

 I guess not many people use Django like this, but it seems that we are not
 completely alone, and by the way... did I already mention that Django is
 awesome?

 > I think this is something that should be considered in another ticket
 but that we could ultimately do. The fact they are currently stored in a
 list today provides a false sense that their ordering is meaningful while
 it's not actually the case.

 I've had a look at the code after I voiced the idea, and I agree with you,
 that if this is to be done, then better in a different ticket.
 Unfortunately, this part of the class is templated in a different fashion
 than all the rest, and just turning dependencies into a set and hoping
 that my new serializer with take care of that won't fly. It seems that
 it's actually quite some work to do it properly... but I agree, that
 generally it's desirable, because I like your point of having the types to
 convey the semantic.

 If there is anything else I can do that would be helpful to you according
 to Django process to get this in, please feel free to ping me.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:5>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070189460e0b51-cbb144a9-4de9-4b36-a4fe-b6bff3278c08-000000%40eu-central-1.amazonses.com.

Reply via email to