2024/02/14分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
bin/rails test
will no longer load files named*_test.rb
if they are located in thefixtures
folder.
- Deprecate
config.active_record.warn_on_records_fetched_greater_than
now thatsql.active_record
notification includes:row_count
field. - Add
ActiveRecord::Base.with_connection
as a shortcut for leasing a connection for a short duration.
Don't load *_test.rb
file from the "fixtures" folder:
railties/lib/rails/test_unit/runner.rb
の修正です。
bin/rails test
実行時にfixtures
フォルダ配下にあるテストファイル(*_test.rb
)をロードしないよう修正しています。
Raise error for Trilogy when prepared_statements
is true
activerecord/lib/active_record/connection_adapters/trilogy_adapter.rb
の修正です
Trilogyでサポートしていないprepared_statements: true
がconfigファイルで指定された場合に、ArgumentError
をraiseするよう修正しています。
Register autoload for ActiveJob::Arguments
Active Jobの修正です。
ActiveJob::Arguments
をautoloadの対象に追加しています。[Fix #50713] Do not trigger loading of ActiveJob::Base in ActiveJob::TestHelperの対応により、ActiveJob::Arguments
をrequireしていないが使用する、というケースがtest envで発生するようになっており、そのための対応との事です。
Merge pull request #51019 from jhawthorn/key-provider
activerecord/lib/active_record/encryption/encrypted_attribute_type.rb
、
activerecord/lib/active_record/encryption/scheme.rb
の修正です。
encryption_options
、decryption_options
、及び、key_provider
の値をメモ化しないよう修正しています。with_encryption_context
でそれらの値をoverride出来るようにするため。
Merge pull request #51035 from rails/rm-docs-actioncable
Action Cableのdocの修正です。
docのフォーマットをMarkdownに変更しています。
Merge pull request #51063 from anonychun/speedup-docker-build-time
railtiesの修正です。
rails new
で生成するDockefileで、同じ依存パッケージを複数回インストールしてしまっている箇所があったのを、同じパッケージについて重複してインストール処理が実行されないよう修正しています。
Deprecate config.active_record.warn_on_records_fetched_greater_than (#51007)
activerecord/lib/active_record/railtie.rb
の修正です。
config.active_record.warn_on_records_fetched_greater_than
をdeprecatedにしています。Add row_count field to sql.active_record notificationで:row_count
fieldをsql.active_record
hookのpayloadに追加しており、レコード数のチェックをしたい場合その値を使用すれば良くなったため。
Merge pull request #51040 from hendrixfan/remove-rollup-option
actioncable/rollup.config.js
の修正です。
rollup.config.js
で不正なconfig名を指定していたのを削除しています。
Address Defining enums with keyword arguments
warning in Action Mailbox
actionmailbox/app/models/action_mailbox/inbound_email.rb
の修正です。
Deprecate defining enums with keywords argsでdeprecatedになったenumの記法を使用している箇所があったのを修正しています。
Update Method#duplicable? to be consistent with Ruby 3.4
activesupport/lib/active_support/core_ext/object/duplicable.rb
の修正です。
Method#duplicable?
がRuby 3.4でTypeError
をraiseしてしまう場合があったのを修正しています。Ruby本体でProc
, Method
, UnboundMethod
及びBinding
のclone/dupの挙動が整理された影響との事です。
参考: proc.c: get rid of CLONESETUP
Merge pull request #50938 from Shopify/refactor-query-cache-to-pool
Active Recordの修正です。
connection poolでQueryCache
を保持するようリファクタリングしています。transactional fixturesをconnectionのキャッシュに依存しないようリファクタリングした、Decouple transactional fixtures and active connectionsと同様に、connection
のキャッシュを削除しても動作するようにする為の対応の一環。
Refactor some Active Record tests
Active Recordのテストの修正です。
adapter nameを取得するのに#adapter_name
メソッドを使用するよう修正、connectionのインスタンスに対しテスト内で独自のモンキーパッチを使用していたのを既存のメソッドで対応するよう修正、及び、SCHEMA queryを無視するよう修正しています。
Add ActiveRecord::Base.with_connection
as a shortcut
Active Recordの修正です。
指定されたblockの中でのActiveRecord::Base.connection
の呼び出しが全て同じconnectionを返すための、ActiveRecord::Base.with_connection
を追加しています。 特定のリクエストやジョブの実行時で、同じconnectionで処理が実行される事を保証したい場合に使用する事を想定しているようです。
activerecord/lib/active_record/connection_handling.rb
の修正です。
先程追加されたActiveRecord::Base.with_connection
がAPI docに表示されるよう修正しています。
Improve ConnectionHandlingTest
activerecord/test/cases/connection_handling_test.rb
の修正です。
assertionでチェックするconnectionを間違えている箇所があったのを修正しています。