-
Notifications
You must be signed in to change notification settings - Fork 898
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
Do not fallback-compile missing assets #17741
Conversation
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.
LGTM, better catch these error sooner than later 👍
(Not sure about the implications for people doing development in production mode though.)
Development in production mode sounds wrong 😆 🤣 |
config/environments/production.rb
Outdated
@@ -19,8 +19,7 @@ | |||
config.assets.compress = true | |||
|
|||
# Fallback to the asset pipeline if a precompiled asset is missed. |
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.
Is this comment incorrect now? We're either going to serve a precompiled asset or it's going to raise an error, right?
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.
Hm, should I just drop it? It's a default Rails comment 😉
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 have a feeling we changed it... the default is now:
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
We're sneaky...
from here
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.
🙏 git blame doesn't say I did it
config/environments/production.rb
Outdated
@@ -19,8 +19,7 @@ | |||
config.assets.compress = true | |||
|
|||
# Fallback to the asset pipeline if a precompiled asset is missed. | |||
# TODO: Once everything is in the asset pipeline, this should be set back to false. | |||
config.assets.compile = true | |||
config.assets.compile = false |
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.
🎉 Yay! 🌮
This always felt weird to maintain two types of assets, ones served through the pipeline and others that were not.
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.
IMO we're serving assets through apache and conf.public_file_server.enabled
is default to false
.
Checked commit skateman@ec5601f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Sorry, I didn't realize this was sitting for 2 weeks. I'd like @simaishi to confirm this is ok since I have very little confidence in what this would mean for the build process or live loading of assets in cases where the asset wasn't properly included. We can merge for now if it's blocking you but I'd rather wait for the people who know the process to approve of it. If we fail to include an asset due to a mistake or a build problems, am I correct in assuming this will now create errors where previously it would have silently compiled the asset on the fly? |
I don't see any issue with the change |
All our assets are served through the asset pipeline so this should be disabled.
@miq-bot add_reviewer @martinpovolny
@miq-bot add_reviewer @himdel
@miq-bot add_label enhancement