New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compressor redux #794
Compressor redux #794
Conversation
@Jkrzy flagging you as a reviewer too -- oddly enough Github is not populating your username in the reviewers field for whatever reason. |
Anyway, I'd like one of y'all to go through the documentation and let me know what worked, what was unclear, what could be improved. Thanks! |
This is :amaze:ing @cantsin!!! Running through the docs I get tripped up on
and this exception from boto: Did you hit this in local testing? |
@Jkrzy I have not gotten that error! To double check the obvious, did you rebuild the docker-compose image? I just ran through the steps again myself and so far I don't see that error.
These two test external and internal access to the localstack edge port, respectively. |
@Jkrzy updated to address the issue we found last Friday. Please note that you will need to remove your local S3 bucket and re-create it (since Tested this time by doing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cantsin! We're super close but this latest change reverts to the non-manifesting storage implementation.
compressor redux: use S3ManifestStaticStorage instead Co-authored-by: Joe Krzystan <joseph.krzystan@gsa.gov>
compressor redux: fix super Co-authored-by: Joe Krzystan <joseph.krzystan@gsa.gov>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for sticking with this one @cantsin!
Link to ZenHub issue.
What does this change?
Second try at implementing django-compressor functionality. Believe it or not, the
hero.png
image (which we never use) is indeed needed and breaks manifest storage outright if we omit this image. Why? Well, the USWDS CSS specifiesbackground-image:url("../img/hero.png");
which the Django manifest storage backend picks up and then subsequently crashes duringcollectstatic
when this file is not found. tl;dr: I believe this missing, unused file is what broke deployment last time (really).The rest is identical to before, except for a couple of small things. We can use the built in
S3ManifestStaticStorage
instead of monkey patching classes. Two CSSurl
references have been tweaked so that they are properly fetched from S3.But most exciting is the
localstack
documentation I've thrown in, which explains how to set up an identical-ish production environment locally.Screenshots (for front-end PR):
Checklist:
Author
Reviewer
Notes for reviewer:
See PR instructions doc for full pull request review instructions.