Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorter logging for mirrorer upload failures #350

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

HebaruSan
Copy link
Member

Problem

The Discord channel is being spammed with long upload errors along these lines:

  File "/home/netkan/.local/lib/python3.12/site-packages/netkan/mirrorer.py", line 297, in process_queue
    if self.try_mirror(CkanMirror(self.ia_collection, path)):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/netkan/.local/lib/python3.12/site-packages/netkan/mirrorer.py", line 322, in try_mirror
    item.upload_file(download_file.name, ckan.mirror_filename(),
  File "/home/netkan/.local/lib/python3.12/site-packages/internetarchive/item.py", line 1131, in upload_file
    raise type(exc)(error_msg, response=exc.response, request=exc.request)
requests.exceptions.HTTPError:  error uploading AB0139C2-ChineseModPatches-v1.4.1.zip to ChineseModPatches-v1.4.1, The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details.

Cause

An exception is being thrown during the attempt to upload to archive.org and logged in full. Most of the output is a useless stack trace into library code that we don't care about.

Changes

Now we log a simple short message and move on.

@HebaruSan HebaruSan added Bug Something isn't working Mirrorer Uploads mods to archive.org labels Nov 8, 2024
@HebaruSan HebaruSan merged commit d22702c into KSP-CKAN:master Nov 8, 2024
3 checks passed
@HebaruSan HebaruSan deleted the fix/mirrorer-log-spam branch November 8, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Mirrorer Uploads mods to archive.org
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant