#37227 closed Bug (duplicate)

test_double_replaced_migrations_are_checked_correctly fails on CI system

Reported by: Chris Lamb Owned by:
Component: Migrations Version: 6.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

======================================================================
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 "/usr/lib/python3.14/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib/python3.14/unittest/case.py", line 669, in run
    self._callTestMethod(testMethod)
    
  File "/usr/lib/python3.14/unittest/case.py", line 615, in _callTestMethod
    result = method()
    ^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/tests/migrations/test_commands.py", line 3263, in test_double_replaced_migrations_are_checked_correctly
    call_command("migrate", "migrations", interactive=False, verbosity=0)
    ^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/core/management/__init__.py", line 195, in call_command
    return command.execute(*args, **defaults)
      ^^^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/core/management/base.py", line 466, in execute
    output = self.handle(*args, **options)
    ^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/core/management/base.py", line 113, in wrapper
    res = handle_func(*args, **kwargs)
    ^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/core/management/commands/migrate.py", line 115, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
    ^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
    ^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py", line 59, in __init__
    self.build_graph()
    ^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py", line 282, in build_graph
    self.load_disk()
    ^^^^^^^^^^^^^^^
  File "/build/reproducible-path/python-django-6.1~rc1/django/db/migrations/loader.py", line 121, in load_disk
    migration_module = import_module(migration_path)
    ^^^
  File "/usr/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
      ^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1406, 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 'tmpw833bckt.migrations.0001_initial_squashed_0002_auto_20260723_1257_squashed_0003_auto_20260723_1257'

I can reproduce this in two places:

Note in both cases, the tests are run with Python 3.13 and 3.14 seriatim.

However, I can't reproduce this locally on my own machine. Anything in particular to look out for? In all cases, I am using SQLite 3.53.3 and Python 3.14.6.

Change History (1)

comment:1 by Jacob Walls, 23 minutes ago

Resolution: duplicate
Status: newclosed

It's a filesystem-dependent race we've had reported to us before in #36997. If you have some more information, please do chime in there and add anything you have. Thanks.

Note: See TracTickets for help on using tickets.
Back to Top