Log a warning when running SQLite in production by intrip · Pull Request #42191...
source link: https://github.com/rails/rails/pull/42191
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
@eileencodes thanks for the review! I've applied the suggestion and added the CL entry
I find this change a bit strange. SQLite is a good production-like database. Shouldn't this change be about reporting mismatch between dev and production environment rather than suggesting that SQLite is not a good database?
You can find all the conversations + the reasons of this change in #34715
I reread it and I am very disappointed. Seriously folks! The argument is that SQLite doesn't scale beyond a certain point? As long as it's a supported database in Rails, this change should be reverted.
@strzibny That's fair, and there is nothing stopping you from using SQLite in production. This warning is intended to notify people who might not be as comfortable managing that database in a production environment, if you're comfortable choosing that database as your preferred solution more power to you.
@zzak The problem is that you got it backward I think.
Managing SQLite is super simple whereas making a production-grade MySQL/PostgreSQL deployment is much more daunting. A lot of beginners have trouble making even a development environment work -- I know, because in my early days I used some Mac OS app to do it for me, and it was something I didn't understand.
Nobody should be forced to suddenly stop - and go learn about production-grade PostgreSQL deployment only to finish the deployment of their simple projects on a virtual server. They could just carry on with SQLite. It's a great first step. I and you understand that the warning is in fact wrong, but those starting would take it as a serious recommendation.
I always liked that Rails supported SQLite so that beginners (but also professionals) can make a simple app/showcase and also put it into production with very little effort. I compare it with Phoenix where we still don't have a good SQLite story and it's in fact a bit annoying. Deploying databases is not an easy feat! It requires some studying to do it right. But for SQLite? No issue. Can you manage a file? Then you can manage SQLite.
I am trying to recheck the guides https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails and there is nothing about SQLite not being supported for production.
I think this is about expectations. Is SQLite supported as a production database in Rails? If yes, there cannot be a warning about using it in production. If not, I would expect we change the docs to mention it.
Users (especially beginners) shouldn't find out the database they chose is not supported once they actually go and deploy. That's very unergnomic.
@strzibny I appreciate your perspective and concern, but the core team discussed this on the issue and came to a consensus to add this logged warning. It doesn't prevent you from using sqlite. We don't have plans to revert this at the moment.
Okay. It's unfortunate, but it's up to you.
@eileencodes can you please confirm or deny whether SQLite is still supported for production use in Rails? The guides mention SQLite all the time, but it's actually not clear to me if this is supported now or not.
@strzibny it's a single warning issued on boot in the production env. Nothing is preventing you from using SQLIite in any environment. It is still supported the same as it was before, just with a little warning in your logs.
All the reasoning for adding this was explained in the issue. You're free to dislike it and you're free to keep using sqlite. However, please stop arguing with us about this. We are not reverting this change and I will lock this PR if you keep arguing with us because it's not productive.
No one assigned
None yet
No milestone
Successfully merging this pull request may close these issues.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK