Skip to content

Improve error view of extractforsigning task

I've seen an extractforsigning task fail on a private workspace. The status and result are completed and error and it has a worker recorded. Unfortunately, there are no artifacts (e.g. logs) associated an no other indication that things may have gone wrong.

Likewise, the debusine-server logs look uninspiring. I can see how the task transitions from pending, to working to completed and that's about it.

It is only the worker logs that actually help with understanding the cause:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 511, in execute_logging_exceptions
    return self.execute()
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 524, in execute
    result = self._execute()
             ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 837, in _execute
    if not self.fetch_input(download_directory):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/tasks/extract_for_signing.py", line 183, in fetch_input
    artifact = self.fetch_artifact(artifact_id, destination)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 748, in fetch_artifact
    artifact_response = self.debusine.download_artifact(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/debusine/client/debusine.py", line 494, in download_artifact
    stream_response_to_file(
  File "/usr/lib/python3/dist-packages/requests_toolbelt/downloadutils/stream.py", line 167, in stream_response_to_file
    raise exc.StreamingError("File already exists: %s" % filename)
requests_toolbelt.exceptions.StreamingError: File already exists: /tmp/debusine-fetch-exec-upload-23ulqcsy/SOMEFILE.deb

Just receiving the final exception without even the traceback would have helped a lot in the web view.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information