[Django] #33887: test_fails_squash_migration_manual_porting fails in the assert

29 views
Skip to first unread message

Django

unread,
Aug 3, 2022, 9:41:18 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
------------------------------------------+------------------------
Reporter: Alberto Planas | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------+------------------------
Seems that the URL in the test is checking for the dev version.

[ 380s]
======================================================================
[ 380s] FAIL: test_fails_squash_migration_manual_porting
(migrations.test_commands.OptimizeMigrationTests)
[ 380s]
----------------------------------------------------------------------
[ 380s] Traceback (most recent call last):
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 60, in
testPartExecutor
[ 380s] yield
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 676, in run
[ 380s] self._callTestMethod(testMethod)
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 633, in
_callTestMethod
[ 380s] method()
[ 380s] File
"/home/abuild/rpmbuild/BUILD/Django-4.1/tests/migrations/test_commands.py",
line 3015, in test_fails_squash_migration_manual_porting
[ 380s] call_command("optimizemigration", "migrations", "0004",
stdout=out)
[ 380s] File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
[ 380s] self.gen.throw(type, value, traceback)
[ 380s] File
"/home/abuild/rpmbuild/BUILD/Django-4.1/django/test/testcases.py", line
879, in _assert_raises_or_warns_cm
[ 380s] self.assertIn(expected_message, str(getattr(cm, cm_attr)))
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 1179, in
assertIn
[ 380s] self.fail(self._formatMessage(msg, standardMsg))
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
[ 380s] raise self.failureException(msg)
[ 380s] AssertionError: 'Migration will require manual porting but is
already a squashed migration.\nTransition to a normal migration first:
https://docs.djangoproject.com/en/dev/topics/migrations/#squashing-
migrations' not found in 'Migration will require manual porting but is
already a squashed migration.\nTransition to a normal migration first:
https://docs.djangoproject.com/en/4.1/topics/migrations/#squashing-
migrations'
[ 380s]

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

Django

unread,
Aug 3, 2022, 9:49:36 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
---------------------------------+------------------------------------

Reporter: Alberto Planas | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Carlton Gibson):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Yes... Running against the release version hit's this.

{{{
% git checkout 4.1
% ./runtests.py migrations
...


AssertionError: 'Migration will require manual porting but is already a
squashed migration.\nTransition to a normal migration first:
https://docs.djangoproject.com/en/dev/topics/migrations/#squashing-
migrations' not found in 'Migration will require manual porting but is
already a squashed migration.\nTransition to a normal migration first:
https://docs.djangoproject.com/en/4.1/topics/migrations/#squashing-
migrations'
}}}

Good spot. Thanks Alberto

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

Django

unread,
Aug 3, 2022, 9:52:17 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
---------------------------------+------------------------------------
Reporter: Alberto Planas | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Alberto Planas):

For dev: https://github.com/django/django/pull/15907
For 4.1: https://github.com/django/django/pull/15908

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

Django

unread,
Aug 3, 2022, 9:55:50 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
---------------------------------+------------------------------------
Reporter: Alberto Planas | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


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

Django

unread,
Aug 3, 2022, 10:19:06 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
-------------------------------------+-------------------------------------
Reporter: Alberto Planas | Owner: Alberto
| Planas
Type: Bug | Status: assigned

Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Alberto Planas
* status: new => assigned
* stage: Accepted => Ready for checkin


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

Django

unread,
Aug 3, 2022, 10:36:26 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
-------------------------------------+-------------------------------------
Reporter: Alberto Planas | Owner: Alberto
| Planas
Type: Bug | Status: closed
Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"4e13b40a764cfdae50416338c5d077e9d9a6d0f1" 4e13b40a]:
{{{
#!CommitTicketReference repository=""
revision="4e13b40a764cfdae50416338c5d077e9d9a6d0f1"
Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on
final tags.

Regression in 7c318a8bdd66f8c5241864c9970dddb525d0ca4c.
}}}

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

Django

unread,
Aug 3, 2022, 10:37:21 AM8/3/22
to django-...@googlegroups.com
#33887: test_fails_squash_migration_manual_porting fails in the assert
-------------------------------------+-------------------------------------
Reporter: Alberto Planas | Owner: Alberto
| Planas
Type: Bug | Status: closed
Component: Migrations | Version: 4.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"9e9bdf8dbd6e2354a2e23aa7e37d5b491338085e" 9e9bdf8]:
{{{
#!CommitTicketReference repository=""
revision="9e9bdf8dbd6e2354a2e23aa7e37d5b491338085e"
[4.1.x] Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting()
on final tags.

Regression in 7c318a8bdd66f8c5241864c9970dddb525d0ca4c.
Backport of 4e13b40a764cfdae50416338c5d077e9d9a6d0f1 from main
}}}

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

Reply all
Reply to author
Forward
0 new messages