Skip to content

Ensure we log io.Copy errors and bytes copied/total in uploads - #1597

Merged
RichardScothern merged 1 commit into
distribution:masterfrom
tonyhb:log-upload-copy-errors
Apr 5, 2016
Merged

RichardScothern merged 1 commit into
distribution:masterfrom
tonyhb:log-upload-copy-errors

Conversation

@tonyhb

@tonyhb tonyhb commented Apr 5, 2016

Copy link
Copy Markdown
Contributor

If there are errors copying the request body into the temporary upload file within copyFullPayload we currently assume that the client disconnected and there were no copy errors.

This change logs any io errors, bytes copied and content length for easier debugging with backends like our favourite NFS.

@codecov-io

Copy link
Copy Markdown

Current coverage is 51.13%

Merging #1597 into master will decrease coverage by -6.76% as of 25c5efd

@@            master   #1597   diff @@
======================================
  Files          122     122       
  Stmts        10659   10663     +4
  Branches       840     749    -91
  Methods          0       0       
======================================
- Hit           6171    5452   -719
+ Partial        840     749    -91
- Missed        3648    4462   +814

Review entire Coverage Diff as of 25c5efd


Uncovered Suggestions

  1. +0.30% via .../driver/s3-aws/s3.go#730...761
  2. +0.28% via .../driver/s3-aws/s3.go#266...295
  3. +0.21% via .../driver/s3-aws/s3.go#882...904
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

@tonyhb

tonyhb commented Apr 5, 2016

Copy link
Copy Markdown
Contributor Author

It'd be good to get this within 2.4 so that we can look into upload errors from hosted registries a little quicker

@aaronlehmann

Copy link
Copy Markdown

LGTM

@RichardScothern

Copy link
Copy Markdown

LGTM.

@tonyhb I'll make a new release candidate with this

@RichardScothern
RichardScothern merged commit 75e5563 into distribution:master Apr 5, 2016
@tonyhb

tonyhb commented Apr 5, 2016

Copy link
Copy Markdown
Contributor Author

👍 thanks @RichardScothern

@tonyhb
tonyhb deleted the log-upload-copy-errors branch April 5, 2016 16:57
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Apr 22, 2021
Ensure we log io.Copy errors and bytes copied/total in uploads
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Jan 19, 2022
Ensure we log io.Copy errors and bytes copied/total in uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants