[Django] #22918: Add tests for db.migrations.operations.SeparateDatabaseAndState

14 views
Skip to first unread message

Django

unread,
Jun 27, 2014, 1:23:31 PM6/27/14
to django-...@googlegroups.com
#22918: Add tests for db.migrations.operations.SeparateDatabaseAndState
--------------------------------------+------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------+------------------------
Added in [bacbbb48] and coverage shows that none of the lines are tested.

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

Django

unread,
Sep 1, 2014, 7:52:33 AM9/1/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
---------------------------------+------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

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

* has_patch: 0 => 1
* version: master => 1.7-rc-3
* severity: Normal => Release blocker
* needs_tests: 0 => 1


Comment:

Promoting to release blocker as it seems the code doesn't work as
described in this [https://github.com/django/django/pull/3146 PR].

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

Django

unread,
Sep 1, 2014, 2:44:09 PM9/1/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
---------------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by andrewgodwin):

If there's no other RBs then we can just remove the documentation from it
and demote it as a feature. If there are we can pull in the patch.

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

Django

unread,
Sep 1, 2014, 2:50:06 PM9/1/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
---------------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Andrew Godwin <andrew@…>):

In [changeset:"a8521a2c228bd9e981dc8a2bea4e26f4544a52a7"]:
{{{
#!CommitTicketReference repository=""
revision="a8521a2c228bd9e981dc8a2bea4e26f4544a52a7"
Undocumented SeparateDatabaseAndState so crash is not RB. Refs #22918
}}}

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

Django

unread,
Sep 1, 2014, 2:51:01 PM9/1/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
---------------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Andrew Godwin <andrew@…>):

In [changeset:"a7ac5f018726694e3a79180ef97f2813c715fac0"]:
{{{
#!CommitTicketReference repository=""
revision="a7ac5f018726694e3a79180ef97f2813c715fac0"
[1.7.x] Undocumented SeparateDatabaseAndState so crash is not RB. Refs
#22918
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:4>

Django

unread,
Sep 1, 2014, 2:54:13 PM9/1/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

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

* severity: Release blocker => Normal


Comment:

Demoting to Normal as the feature is no longer documented and thus not
public API.

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:5>

Django

unread,
Sep 2, 2014, 2:15:06 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------

Comment (by etianen):

I think this should really count as a release blocker. The code is
trivially broken, and trivially fixable. Removing it from the docs just
sidesteps the issue, and there are some migration operations that can only
be done using this class. (So far as I can tell, this is the only way to
move models from one app to another. Maybe there is another, simpler way?
If so, I'm all ears!)

I'll spend a couple of hours today writing the tests. Really, though, if
the patch can't be pulled because of lack of tests, how did the original
feature get in with no tests? I'm 100% for maintaining code quality, but
if the core developers are not subject to the same code quality
guidelines, an insistence on tests just makes it harder for non-core
developers to contribute.

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:6>

Django

unread,
Sep 2, 2014, 4:30:42 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------
Changes (by etianen):

* needs_docs: 0 => 1
* needs_tests: 1 => 0


Comment:

I've created a new pull request that fixes the crash and adds in the
missing tests:

https://github.com/django/django/pull/3149

I'd imagine that this would also require
#a7ac5f018726694e3a79180ef97f2813c715fac0 and
#a8521a2c228bd9e981dc8a2bea4e26f4544a52a7 to be reverted.

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:7>

Django

unread,
Sep 2, 2014, 8:11:49 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"e03b7940e564a6a88269b3030e43354baabcd669"]:
{{{
#!CommitTicketReference repository=""
revision="e03b7940e564a6a88269b3030e43354baabcd669"
Fixed #22918 -- Fixed SeparateDatabaseAndState crash
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:8>

Django

unread,
Sep 2, 2014, 8:12:48 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody

Type: Bug | Status: closed
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"e9264bc25d265ba1c8ff69517dea8c5ce6ad6df8"]:
{{{
#!CommitTicketReference repository=""
revision="e9264bc25d265ba1c8ff69517dea8c5ce6ad6df8"
Revert "Undocumented SeparateDatabaseAndState so crash is not RB. Refs
#22918"

This reverts commit a8521a2c228bd9e981dc8a2bea4e26f4544a52a7.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:9>

Django

unread,
Sep 2, 2014, 8:13:09 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody

Type: Bug | Status: closed
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7eabd22217dcf2a67173b055ace63ca3fce8eb48"]:
{{{
#!CommitTicketReference repository=""
revision="7eabd22217dcf2a67173b055ace63ca3fce8eb48"
[1.7.x] Fixed #22918 -- Fixed SeparateDatabaseAndState crash

Backport of e03b7940e5 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:10>

Django

unread,
Sep 2, 2014, 8:13:16 AM9/2/14
to django-...@googlegroups.com
#22918: migrations.operations.SeparateDatabaseAndState crashes (and has no tests)
----------------------------+------------------------------------
Reporter: timo | Owner: nobody

Type: Bug | Status: closed
Component: Migrations | Version: 1.7-rc-3
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"52eadbf5c0bad53ca46eea3bb96a17c3320b55b2"]:
{{{
#!CommitTicketReference repository=""
revision="52eadbf5c0bad53ca46eea3bb96a17c3320b55b2"
Revert "[1.7.x] Undocumented SeparateDatabaseAndState so crash is not RB.
Refs #22918"

This reverts commit a7ac5f018726694e3a79180ef97f2813c715fac0.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22918#comment:11>

Reply all
Reply to author
Forward
0 new messages