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
Create asterisk.png without digest after precompile #7322
Conversation
Shouldn't we rather fix linking to a non-digest version? |
Like #7317 mentions this is linked as the OpenGraph image:
Are the old digest versions still available after creating a few new ones? We only look up the image once in our own implementation. |
Yes, they're kept until you run |
Yeah, I'm aware, I'm just not too much of fan of side-stepping the cache bursting mechanism here. Perhaps we can rather define some routes with temporary redirects to the digest version? |
logger = ::Logging::Logger["assets:non_digest_assets"] | ||
|
||
non_digest_assets = Diaspora::Application.config.assets.non_digest_assets | ||
manifest_path = Dir.glob(File.join(Rails.root, "public/assets/manifest-*.json")).first |
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.
This feels rather fragile, are we sure there's never more than one manifest?
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.
I only have one file, and it gets updated when I do a precompile. If somebody has two files, it's probably a problem anyway, because sprockets also simply takes the first file: https://github.com/rails/sprockets/blob/v2.12.4/lib/sprockets/manifest.rb#L47-L55
The asterisk.png didn't change since two year, so it still is the same digest version. But every cached opengraph-result now links to the non-digest version. I copied it once by hand to create the non-digest version, but that doesn't help other pods (and also it isn't there anymore, so I deleted it once by accident, probably when updating to 0.6, because I deleted the whole assets folder to have a clean start). There is also a gem doing redirects from the non-digest versions to the latest digest version, but then every time somebody loads it, it needs two requests. |
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.
Given the fact that this image is referenced externally and the digest-version could disappear, I am fine with using the non-digest version here!
Thank you :) |
Fixes #7317