The Wire · Showcase
RAILS TIGHTENS DESERIALIZATION ERROR HANDLING, PROPSHAFT EYES RUBY 4
By RepoJournal · Filed · About Rails
Rails introduces a targeted deserialization error for orphaned job records, solving a production pain point at HEY while ActiveJob remains resilient.
Rails shipped a new `ActiveJob::DeserializationError::RecordNotFound` exception [1] that lets developers distinguish between transient database connection failures and legitimate record deletions during job deserialization. This fixes a real production issue at HEY where networking blips were tanking entire job queues instead of being retried intelligently. Paired with that, Rails is optimizing how it preloads dependent associations [2], collapsing redundant scopes to eliminate n x m matching bottlenecks that slow down association loading on large record sets. Over in propshaft, the asset pipeline now runs CI against Ruby 4 [3], confirming it's ready when the language ships later this year. Propshaft also shed its deprecated internal usage of `Mime::EXTENSION_LOOKUP` [4], staying ahead of the deprecation curve Rails set in core.
Action items
- → Review your ActiveJob rescue handlers - the new RecordNotFound exception lets you retry instead of discard rails/rails [plan]
- → Update propshaft if you're on an older version to stay compatible with upcoming Rails changes rails/propshaft [monitor]
- → Test your app against Ruby 4.0 preview builds - propshaft is already green rails/rails [monitor]
References
- [1] Introduce `ActiveJob::DeserializationError::RecordNotFound` ↗ rails/rails
- [2] Combine equivalent owner-dependent preload scopes ↗ rails/rails
- [3] Add Ruby 4 to CI, bundle update, and checksums ↗ rails/propshaft
- [4] Don't use Mime::EXTENSION_LOOKUP directly ↗ rails/propshaft