Skip to content

`debusine-admin create_work_request server aptmirror` no longer works

Issuing debusine-admin create_work_request server aptmirror no longer works. Well, the creation of the work request succeeds and gets a work_request_id, but it doesn't do much useful things otherwise. The error log has details:

2024-12-10 21:25:04,776 [_task/3199749/139662267433024] ERROR: Exception in Task aptmirror
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 451, in execute_logging_exceptions
    return self.execute()
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 464, in execute
    result = self._execute()
             ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/server/tasks/aptmirror.py", line 494, in _execute
    self.update_sources(temp_path, self.plan_sources(temp_path))
  File "/usr/lib/python3/dist-packages/debusine/server/tasks/aptmirror.py", line 286, in update_sources
    self.add_source(
  File "/usr/lib/python3/dist-packages/debusine/server/tasks/aptmirror.py", line 262, in add_source
    source_artifact = Artifact.objects.create_from_local_artifact(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/db/models/artifacts.py", line 118, in create_from_local_artifact
    artifact = Artifact.objects.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 87, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 658, in create
    obj.save(force_insert=True, using=self.db)
  File "/usr/lib/python3/dist-packages/debusine/db/models/artifacts.py", line 272, in save
    if not self.workspace.can_create_artifacts(context.user):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/db/models/permissions.py", line 72, in wrapper
    raise ContextConsistencyError("user was not set in context")
debusine.db.context.ContextConsistencyError: user was not set in context
2024-12-10 21:25:05,102 [celery/3199749/139662267433024] ERROR: Task: aptmirror failed to execute
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information