Page MenuHomeSoftware Heritage

Add tests for the orchestrator.
ClosedPublic

Authored by vlorentz on Oct 10 2018, 3:00 PM.

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Oct 10 2018, 5:43 PM
This revision was automatically updated to reflect the committed changes.
swh/indexer/orchestrator.py
73

And now, we no longer have the necessary configuration for the orchestrator so that cannot work:

Oct 25 18:25:56 worker01 python3[86419]: [2018-10-25 18:25:56,557: ERROR/MainProcess] Task swh.indexer.tasks.OrchestratorAllContents[9b7a74b1-7743-46b3-aa5c-185ef468548e] raised unexpected: AttributeError("'OrchestratorAllContentsIndexer' object has no attribute 'indexers'",)
                                         Traceback (most recent call last):
                                           File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 240, in trace_task
                                             R = retval = fun(*args, **kwargs)
                                           File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 438, in __protected_call__
                                             return self.run(*args, **kwargs)
                                           File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 161, in run
                                             raise e from None
                                           File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 158, in run
                                             result = self.run_task(*args, **kwargs)
                                           File "/usr/lib/python3/dist-packages/swh/indexer/tasks.py", line 24, in run_task
                                             indexer = self.Indexer().run(*args, **kwargs)
                                           File "/usr/lib/python3/dist-packages/swh/indexer/orchestrator.py", line 97, in run
                                             for name, (idx_class, filtering, batch_size) in self.indexers.items():
                                         AttributeError: 'OrchestratorAllContentsIndexer' object has no attribute 'indexers'

...

Related T1293