[Django] #23331: Circular dependencies are not resolved by new Migrate framework

8 views
Skip to first unread message

Django

unread,
Aug 20, 2014, 10:10:47 PM8/20/14
to django-...@googlegroups.com
#23331: Circular dependencies are not resolved by new Migrate framework
-----------------------------+--------------------------
Reporter: aidanlister | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords: migrate
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------


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

Django

unread,
Aug 20, 2014, 10:17:33 PM8/20/14
to django-...@googlegroups.com
#23331: Circular dependencies are not resolved by new Migrate framework
-----------------------------+----------------------------------------

Reporter: aidanlister | Owner: andrewgodwin
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:

Keywords: migrate | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+----------------------------------------
Changes (by aidanlister):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

New description:

It's very easy and not explicitly not-supported to create circular
dependencies in your apps. I have attached a test project which has two
circular dependency resolution failures.

This fails to create migrations:

./manage.py makemigrations contractors inspections organisations
properties reports tasks timeline

This creates the migrations:

./manage.py makemigrations properties reports tasks timeline
./manage.py makemigrations contractors inspections

But then ./manage.py migrate fails:

django.db.migrations.graph.CircularDependencyError: [('contractors',
u'0002_auto_20140821_0156'), ('reports', u'0001_initial'), ('inspections',
u'0001_initial'), ('contractors', u'0002_auto_20140821_0156')]


I have tried manually breaking up the migrations into lots of little
steps, but you'll have the same problem with the reports and inspections
app. Even with lots of tiny migrations it eventually loops around.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23331#comment:1>

Django

unread,
Aug 20, 2014, 11:53:16 PM8/20/14
to django-...@googlegroups.com
#23331: Circular dependencies are not resolved by new Migrate framework
-----------------------------+----------------------------------------
Reporter: aidanlister | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: invalid

Keywords: migrate | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+----------------------------------------
Changes (by andrewgodwin):

* status: new => closed
* resolution: => invalid


Comment:

Tried to reproduce from example project, and it worked perfectly with the
line:

{{{
./manage.py makemigrations tasks timeline organisations reports
contractors inspections properties
}}}

The generated migrations then also ran successfully.

Closing as INVALID as I suspect this was encountered just before the fixes
to #23322 and #23315 landed in master earlier, and in particular #23315
would have manifested as the first command not being able to run.

If you can reproduce this on the most recent commit in master, please
reopen and this time provide full console output from when the command
runs.

--
Ticket URL: <https://code.djangoproject.com/ticket/23331#comment:2>

Django

unread,
Aug 21, 2014, 3:47:40 AM8/21/14
to django-...@googlegroups.com
#23331: Circular dependencies are not resolved by new Migrate framework
-----------------------------+----------------------------------------
Reporter: aidanlister | Owner: andrewgodwin
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Normal | Resolution: invalid

Keywords: migrate | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+----------------------------------------
Changes (by Markush2010):

* cc: Markush2010 (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/23331#comment:3>

Reply all
Reply to author
Forward
0 new messages