-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
You have a static asset (a font: rest_framework/fonts/glyphicons-halflings-regular.woff
) included in the DRF library that breaks when used in AWS S3 deployments. There could be multiple reasons for this (I've included a full investigation below) but the net effect is that it causes a re-upload and file re-naming on every deploy, wasting some time, bandwidth and (ultimately) creating unnecessary cruft.
Now this is about as low-priority an issue as they come -- everything still works, it doesn't break the actual deploys, and in the final analysis is really more of an annoyance than anything else. Still, if I read the code correctly then it doesn't even appear that this offending font is being used, so maybe it can just be nuked?
I'm happy to include a PR for this if necessary, but I figured it might just be easier to rm
them from this issue -- assuming, of course, that in fact the font is superfluous. If it isn't, then perhaps uploading a new version of it might solve the problem.
OK, have at it!
Investigation from other thread:
The offending file is rest_framework/fonts/glyphicons-halflings-regular.woff
When looking in my AWS bucket there are many versions of the file, all with an appended hash; i.e., it just is creating a new copy of that particular file on every upload. screenshot
So I did some poking around and discovered the following, all related to that specific file:
aws s3 sync doesn't guess MIME type for .woff file
Bootstrap 3 Glyphicons are not working
Glyph icons don't work in the customized version
collectstatic can't find glyphicons when using ManifestStaticFilesStorage
Add Glyphicons font files to solve collectstatic issue
My first thought was that DRF uploaded a corrupt file to its static
files, but the DRF version and what's in Bootstrap dist
have the same checksum. So it might be the AWS mime-type issue. It also seems like it might not be necessary at all, so perhaps they can be removed?
Checklist
- I have verified that that issue exists against the
master
branch of Django REST framework. - I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- This is not a usage question. (Those should be directed to the discussion group instead.)
- This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
- I have reduced the issue to the simplest possible case.
- I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)