Uh oh!
There was an error while loading. Please reload this page.
Catch checksum validation failure from download, delete corrupt file - #4133
Conversation
tseaver
commented
Oct 13, 2017
Needs a new unit test for the case where the |
mfschwartz
commented
Oct 13, 2017
@tseaver - there's an integration test for this case |
tseaver
commented
Oct 13, 2017
@mfschwartz We require 100% unit test coverage: see the current CI failure. Note the linter failures in that output as well. |
dhermes
commented
Oct 13, 2017
@tseaver@mfschwartz I'm happy to take up the testing mantle. Before this can go in I need to get an LGTM on googleapis/google-resumable-media-python#33 and cut a release there. |
…google-resumable-media-python library and delete corrupt file
This is the only method where we **know** we have created the file, so it is safe to delete it. In `download_to_file`, the user could pass in a non-file but file-like object, so there would be nothing to delete. Also - Adding a unit test for corrupted data - Just calling `raise` rather than re-wrapping the exception. Using `exceptions.from_http_response` or `exceptions.from_http_status` wouldn't make sense because the corruption will have happened with a status of 200 or 206.
googlebot
commented
Oct 13, 2017
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
| except resumable_media.DataCorruption as exc: | ||
| # Delete the corrupt downloaded file. | ||
| os.remove(filename) | ||
| raise |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dhermes
commented
Oct 13, 2017
@mfschwartz RE:
He (Tres) was referring to tests in this library, not in |
dhermes
commented
Oct 13, 2017
@jonparrott@lukesneeringer@tseaver Can I get an LGTM? |
dhermes
commented
Oct 13, 2017
Since @tseaver has made a lot of I made one branch just by starting from the I made another branch from Both approaches will make figuring out what has changed for the next release difficult. It will at least be difficult via So the question I put to @lukesneeringer and @jonparrott, is it worth it to cherry-pick this? The question I put to @tseaver, could we just release the |
This change depends on googleapis/google-resumable-media-python#31