2025/04/15分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fix find_or_create_by! not checking owner persistence:
activerecord/lib/active_record/relation.rb、
activerecord/lib/active_record/transactions.rbの修正です。
Fix create_or_find_by not rolling back a transaction:の対応の影響で、parentが保存されていないassociationに対するcreate_or_find_by!がエラーにならないバグが発生していたのを修正しています。
Fix configuring RedisCacheStore with raw: true
activesupport/lib/active_support/cache.rbの修正です。
RedisCacheStoreに対してraw: trueを指定するとエラーになってしまっていたのを修正しています。
Improve leap years counting performance in distance_of_time_in_words
actionview/lib/action_view/helpers/date_helper.rbの修正です。
distance_of_time_in_wordsメソッド内のleap yearsの計算処理で、ループ処理を無くせるようリファクタリングしています。
Merge pull request #54901 from yskkin/exceptions_app_fallback_mime
actionpack/lib/action_dispatch/middleware/public_exceptions.rbの修正です。
ActionDispatch::PublicExceptionsで、formatを取得する際に、ActionDispath::Http::MimeNegotiation::InvalidTypeでエラーになった場合の処理があったのを削除しています。Fix crash for invalid Content-Type in ShowExceptions middlewareの対応により、ここでエラーになる事は無くなった為。
Merge pull request #54883 from zzak/aj-perform-error-backtrace-cleaner
activejob/lib/active_job/log_subscriber.rbの修正です。
Active Jobでperformの処理でエラーになった際のログ内でbacktraceについて、backtrace cleanerでcleanupをtraceを設定するよう修正しています。
Fix instance variable name typo
activerecord/lib/active_record/transactions.rbの修正です。
先のcreate_or_find_by!の修正の際に、初期化するインスタンス名が誤っていたのを修正しています。
Allow to configure maximum cache key sizes
Active Supportの修正です。
cacheのkey sizeの最大値をconfigで指定出来るよう修正しています。元々は固定の値になっていた(e.g. Redis cache storeの場合は1kB)、かつ、cache storeによって値が違っていたのですが、今回の対応で全てのstoreで250 bytesをデフォルトにするよう合わせて修正しています。値を変更したい場合、storeにmax_key_sizeを指定すれば変更出来るようになっています。
config.cache_store = :redis_cache_store, { max_key_size: 64 }