2019/11/16分のコミットです。
CHANGELOGへの追加はありませんでした。
Test that query cache works correctly on multiple handlers when forking processes
activerecord/test/cases/query_cache_test.rb
の修正です。
query cacheが複数のconnection handler + forked processで正しく動作することを確認するテストを追加しています。
Writes should always clear the query cache
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
の修正です。
insert / update等の書き込み処理実行後にquery cacheが有効かどうかの設定にかかわらずquery cacheをclearするよう修正しています。
Bump GitHub Action cache version from preview to v1
.github/workflows/rubocop.yml
の修正です。
Github Action cacheのバージョンをv1に更新しています。
activesupport/lib/active_support/notifications/instrumenter.rb
の修正です。
ActiveSupport::Notifications::Instrument
でCPU時間を取得するのにProcess::CLOCK_PROCESS_CPUTIME_ID
を使用していたのを、Process::CLOCK_THREAD_CPUTIME_ID
を使用するよう修正しています。
マルチスレッド環境でも値を正しく取得出来るようにするため。
railties/lib/rails/generators/base.rb
の修正です。
Generators::Base
classにexit_on_failure?
メソッドを定義しています。
Thor 1.0で、コマンドが失敗かつ上記メソッドが定義されていない場合にdeprecateメッセージが出るようになっている為。
Also avoid deprecation warnings if command fails
railties/lib/rails/command/base.rb
の修正です。
先程のコミットと同様にRails::Command::Base
classにexit_on_failure?
メソッドを定義しています。
Don't test connecting to new database if in_memory_db?
activerecord/test/cases/query_cache_test.rb
の修正です。
in memory DBでは新しいDBに接続するテストを実行しないよう修正しています。in memory DBの場合、新しいDBにではschemaやfixtureがロードされておらずテストが継続できない為。
Merge pull request #37727 from kamipo/improve_deprecation_message
activerecord/lib/active_record/scoping/named.rb
の修正です。
receiver scopeがclass level querying methodsに影響を与えている状態でメソッドを実行した場合に出力するdeprecateメッセージで、代わりのメソッドの提案にklass.default_scoped
を追加しています。
modelにdefault scopesが定義されている場合、klass.default_scoped
を使う必要がある為。
Check the actual constant used
activesupport/lib/active_support/notifications/instrumenter.rb
の修正です。
Use per-thread CPU time clockの変更に合わせて、clock gettimeを使用出来るかどうかのチェック処理でも、Process::CLOCK_THREAD_CPUTIME_ID
が定義されているかチェックするよう修正しています。
actionpack/lib/action_controller/metal/instrumentation.rb
の修正です。
process_action.action_controller
notificationのpayloadにActionDispatch::Response
のインスタンスをまるまる含むよう修正しています。
Only test if we can use processes and it's not an in memory db
activerecord/test/cases/query_cache_test.rb
の修正です。
fork
をサポートしていない環境では、fork
を使用しているテストを実行しないよう修正しています。