Closed fsbraun closed 1 year ago
Patch coverage: 100.00%
and no project coverage change.
Comparison is base (
ac3985d
) 75.21% compared to head (a4cfe26
) 75.22%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@fsbraun Is it possible to have a test with this patch?
@vinitkumar I know! I've been thinking about it, but I do not see a way of testing this without the specific implementation of django-storage
's S3Storage on an AWS instance. I frankly believe that the underlying issue is between Django and django-storage, but it's hard to tell. Since thetry
except
block.
Any idea how to test this?
@fsbraun I don't know. Seems hard to implement in the test. Have you tried testing this patch with a real s3 backend?
@vinitkumar I tested it on my staging setup with AWS: Without the fix, copying files fails and a copy of the first file remains in the source folder. After fixing it, copying works fine.
The fix also does not affect local file storage (which just runs seek(0)
in case of a reopen).
Description
While the root cause of the bug #1417 might be in django-storages 1.14, this quick-fix ensures that any ValueError raised opening a file for copying does not crash the file application with a server error.
Related resources
1417
...
Checklist
master