We still have some issues with non-fingerpritned assets being called from the codebase. Rails 4 basically does not do non-fingerprinted assets, at all.
More background here: https://github.com/openfoodfoundation/openfoodnetwork/issues/5622#issuecomment-645891351
So basically it looks like we still have a bunch of places in the codebase where we are calling assets in a way that will not include the fingerprint, and we need to fix that.
It looks like this applies to fonts as well as images, and we'll need to check basically anything that's in the /app/assets/* directories.
:+1:
This is bug right? There will be images and icons missing from the app?
Is this a release blocker? (we should upgrade to S2 if it is). Anything major missing in the app?
Hi - Just a brief feedback from my side: During testing of the release I haven't found anything major missing from the app, all pics seem to be there, so far.
@luisramos0 I think that all assets work so far due to the combination of ofn-install's (dangerous) symlink plus assets being placed in public/ that @Matt-Yorkley described in the other issue. But it's a bit messy and makes all feel uneasy and lower our confidence so we better get as close to Rails default as we can.
This is bug right? There will be images and icons missing from the app?
It's a worrying issue, but it shouldn't actually affect current OFN production servers at the moment, unless we start adding new assets or changing old ones. So it's not a critical bug, but we should fix it as a priority.
Basically the work that needs to be done will look a bit like this PR, but for some of the other assets (like fonts and maybe some other images) where their URLs are still being generated without fingerprints. "Non-digest assets" are now completely ignored by Rails in the precompile step.
As a side note; on any _new_ servers that are deployed, lots of assets will be broken for sure (until we fix this).
I think it'll be fairly straightforward to find out which assets are processed with the assets:precompile:nondigest rake task in Rails 3.2. https://github.com/rails/rails/blob/e17e25cd23e8abd45b1706463dd57c90fa6dcb7c/actionpack/lib/sprockets/assets.rake#L33-L57 is the code responsible for doing so, which calls the Sprockets::StaticCompiler.
unless we start adding new assets or changing old ones
With still ongoing efforts on mobile touching scss and assets, that's going to happen soon :see_no_evil: .
ok, makes sense. I think it's well labelled then: S3, regression, we should fix it now but will not block the release :+1:
Remaining bits:
Most helpful comment
ok, makes sense. I think it's well labelled then: S3, regression, we should fix it now but will not block the release :+1: