Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Factorize bin/update in bin/setup, and make bin/setup idempotent #33139
I'm suggesting here that they should be a unique script, which also needs to be idempotent.
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @eileencodes (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
This repository is being automatically checked for code quality issues using Code Climate. You can see results for this analysis in the PR status below. Newly introduced issues should be fixed before a Pull Request is considered ready to review.
Please see the contribution instructions for more information.
In my experience, running
Would it be sensible to behave as follows?
Yes, in my opinion that would be a good default for
I think using the default is fine for that case:
added a commit
this pull request
Mar 27, 2019
@davidstosik Can you check a broken test? https://buildkite.com/rails/rails/builds/60152#8a78e404-15b8-48aa-beb5-6799f50be32d
Fixed the tests and pushed this in 8927eba
Pretty damn tough to debug why
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index f5f5827d04..10c09cbcd4 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -32,10 +32,12 @@ def sqlite3_connection(config) Dir.mkdir(dirname) unless File.directory?(dirname) end + puts File.exist?(Rails.root.join("db/development.sqlite3")) db = SQLite3::Database.new( config[:database].to_s, config.merge(results_as_hash: true) ) + puts File.exist?(Rails.root.join("db/development.sqlite3")) ConnectionAdapters::SQLite3Adapter.new(db, logger, nil, config) rescue Errno::ENOENT => error
The development database file isn't there before but suddenly exists afterwards.
@robertomiranda @kamipo do any of you know anything about this? Does this mean that there's a potential state where
@davidstosik not sure. I think apps will get the new
@guilleiguaran yeah, I think that makes a lot of sense! It might make even more sense to remove the reliance on