Page MenuHomeSoftware Heritage

Git loader: created scheduler tasks always fail
Closed, ResolvedPublic


I just discovered that all the git loading tasks I create locally now all end up with the following error:

[2018-10-11 15:01:13,078: INFO/MainProcess] Received task: swh.loader.git.tasks.UpdateGitRepository[357438df-cea4-4c94-a141-7c40e25cb44f]
[2018-10-11 15:01:13,098: ERROR/MainProcess] Task swh.loader.git.tasks.UpdateGitRepository[357438df-cea4-4c94-a141-7c40e25cb44f] raised unexpected: TypeError('prepare_origin_visit() takes 2 positional arguments but 3 were given',)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/celery/app/", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/celery/app/", line 438, in __protected_call__
    return*args, **kwargs)
  File "/home/antoine/swh/swh-environment/swh-scheduler/swh/scheduler/", line 161, in run
    raise e from None
  File "/home/antoine/swh/swh-environment/swh-scheduler/swh/scheduler/", line 158, in run
    result = self.run_task(*args, **kwargs)
  File "/home/antoine/swh/swh-environment/swh-loader-git/swh/loader/git/", line 25, in run_task
    return loader.load(repo_url, base_url)
  File "/home/antoine/swh/swh-environment/swh-loader-core/swh/loader/core/", line 881, in load
    self.prepare_origin_visit(*args, **kwargs)
TypeError: prepare_origin_visit() takes 2 positional arguments but 3 were given

It looks like there was some changes in the loader parameters handling in the last commit.
Changing that line:$25

return loader.load(repo_url, base_url=base_url)

seems to fix the issue but there may be some others remaining.