Skip to content

Content archiver director tests failure

Hi,

While reviewing !17 (closed), I have noticed that the following tests for the content archiver fail:

======================================================================
ERROR: A content missing with enough copies shouldn't be archived.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/tests/test_archiver.py", line 143, in archive_already_enough
    director.run()
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 107, in run
    run_fn(batch)
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 119, in run_sync_worker
    task = app.tasks[task_name]
  File "/usr/lib/python3/dist-packages/celery/app/registry.py", line 26, in __missing__
    raise self.NotRegistered(key)
celery.exceptions.NotRegistered: 'swh.storage.archiver.tasks.SWHArchiverTask'

======================================================================
ERROR: Run archiver on a missing content should archive it.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/tests/test_archiver.py", line 123, in archive_missing_content
    self.archiver.run()
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 107, in run
    run_fn(batch)
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 119, in run_sync_worker
    task = app.tasks[task_name]
  File "/usr/lib/python3/dist-packages/celery/app/registry.py", line 26, in __missing__
    raise self.NotRegistered(key)
celery.exceptions.NotRegistered: 'swh.storage.archiver.tasks.SWHArchiverTask'

======================================================================
ERROR: A content that is not 'missing' shouldn't be archived.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/tests/test_archiver.py", line 133, in archive_present_content
    self.archiver.run()
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 107, in run
    run_fn(batch)
  File "/home/ndandrim/work/swh-environment/swh-storage/swh/storage/archiver/director.py", line 119, in run_sync_worker
    task = app.tasks[task_name]
  File "/usr/lib/python3/dist-packages/celery/app/registry.py", line 26, in __missing__
    raise self.NotRegistered(key)
celery.exceptions.NotRegistered: 'swh.storage.archiver.tasks.SWHArchiverTask'

----------------------------------------------------------------------

Nothing has jumped to my eyes in the director code (the tasks module is properly imported) so I don't really know what goes wrong.


Migrated from T436 (view on Phabricator)