In example, a remote storage implementation like S3 gets queried for the
file, the file gets removed, and then replaced. With the boto3 library,
this means touching the file initially (HEAD), a second request to DELETE
the file, and yet a third to PUT the new file. Since filenames for hashed
files are computed based on the contents of the files, this seems like an
unnecessary 3 requests for every time static assets get processed.
Since a matching hash provides file integrity verification, I propose that
the logic for copying hash-designated files be skipped all together.
PR Available here - https://github.com/django/django/pull/8496
--
Ticket URL: <https://code.djangoproject.com/ticket/28200>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: 0 => 1
Comment:
Is this a duplicate of or related to #28055? There are failing tests with
the current PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/28200#comment:1>
Comment (by Michal Krupa):
Replying to [comment:1 Tim Graham]:
> Is this a duplicate of or related to #28055? There are failing tests
with the current PR.
Ah yes I see the failed test results, jobs were still running when this
ticket was opened. I will re-work the submission - thanks for the
response!
--
Ticket URL: <https://code.djangoproject.com/ticket/28200#comment:2>
* owner: nobody => Michal Krupa
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28200#comment:3>
* stage: Unreviewed => Accepted
Comment:
Tentatively accepting, though it's not certain that this can be fixed.
--
Ticket URL: <https://code.djangoproject.com/ticket/28200#comment:4>