#36997: test_double_replaced_migrations_are_checked_correctly fails 
intermittently
under WSL.
----------------------------------+--------------------------------------
     Reporter:  Stewart Matheson  |                     Type:  Bug
       Status:  new               |                Component:  Migrations
      Version:  dev               |                 Severity:  Normal
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
 Under WSL running Ubuntu 24.04 I am seeing intermittent test failures on


 {{{
 
migrations.test_commands.SquashMigrationsTests.test_double_replaced_migrations_are_checked_correctly
 }}}


 The failure message I get is


 {{{
 ERROR: test_double_replaced_migrations_are_checked_correctly
 
(migrations.test_commands.SquashMigrationsTests.test_double_replaced_migrations_are_checked_correctly)
 If replaced migrations are already applied and replacing migrations
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/stewart/code/open-
 source/python/install/3.14.3/lib/python3.14/unittest/case.py", line 58, in
 testPartExecutor
     yield
   File "/home/stewart/code/open-
 source/python/install/3.14.3/lib/python3.14/unittest/case.py", line 669,
 in run
     self._callTestMethod(testMethod)

   File "/home/stewart/code/open-
 source/python/install/3.14.3/lib/python3.14/unittest/case.py", line 615,
 in _callTestMethod
     result = method()
     ^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/tests/migrations/test_commands.py", line 3246, in
 test_double_replaced_migrations_are_checked_correctly
     call_command("migrate", "migrations", interactive=False, verbosity=0)
     ^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/core/management/__init__.py", line 195, in
 call_command
     return command.execute(*args, **defaults)
       ^^^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/core/management/base.py", line 466, in execute
     output = self.handle(*args, **options)
     ^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/core/management/base.py", line 113, in wrapper
     res = handle_func(*args, **kwargs)
     ^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/core/management/commands/migrate.py", line
 115, in handle
     executor = MigrationExecutor(connection,
 self.migration_progress_callback)
     ^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/db/migrations/executor.py", line 18, in
 __init__
     self.loader = MigrationLoader(self.connection)
     ^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/db/migrations/loader.py", line 59, in __init__
     self.build_graph()
     ^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/db/migrations/loader.py", line 282, in
 build_graph
     self.load_disk()
     ^^^^^^^^^^^^^^^
   File "/home/stewart/code/open-
 source/django/source/django/db/migrations/loader.py", line 87, in
 load_disk
     module = import_module(module_name)
     ^^^^^^^
   File "/home/stewart/code/open-
 source/python/install/3.14.3/lib/python3.14/importlib/__init__.py", line
 88, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
       ^^^^^^^^^^^^^^^^^
   File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
   File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
   File "<frozen importlib._bootstrap>", line 1335, in
 _find_and_load_unlocked
 ModuleNotFoundError: No module named 'tmpx72x4ve0.migrations'
 }}}

 This failure is intermittent however I'm able to trigger it around 90% of
 the time I run the test.

 Steps to reproduce

 1. Create New Ubuntu Machine under WSL
 2. Install python 3.14.3.
 3. Follow the guide here
 https://docs.djangoproject.com/en/6.0/intro/contributing/ to the point of
 executing tests with the runtests.py runner.
 4. Observe the above failure.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36997>
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 visit 
https://groups.google.com/d/msgid/django-updates/0107019d13216547-7fe37cc9-0ea6-4236-bb93-13e5152bcdf4-000000%40eu-central-1.amazonses.com.

Reply via email to