Friday, March 14, 2025

Continuous integration at your fingertips

Posted by claudiob

Hi, it’s Claudio Baccigalupo. Let’s explore this week’s changes in the Rails codebase.

Structured CI with bin/ci
Introduce bin/ci to standardize CI workflows based on a new DSL for declaring workflow steps in config/ci.rb. bin/ci runs your all tests, linters, and security scanners. And it optionally signs off on your work by giving your PR a green status.

Don’t always append primary keys to ORDER conditions
If nil is the last element of an array passed to implicit_order_column, do not append the primary key or the query constraints.

Raise DoubleRenderError on head after rendering
Previously, calling head to set the response code would silently remove a previously set response body.

Make importmap changes invalidate HTML etags
Previously you needed to manually add an etag to the ApplicationController to ensure any changes would invalidate the HTML response etag.

Generate session controller tests for auth generator
This PR ensures that that authentication generated controllers include functional tests.

Fix regression in ActiveRecord::Result#column_types
When a column type is nil in the original column_types array, the previous implementation was returning nil instead of falling back to the default type.

Fix SQLite3 adapter to quote Infinity and NaN
When SQL strings are built by the sqlite3 adapter (for example when using upsert), the values “Infinity”, “-Infinity”, and “NaN” should be quoted.

Add respond_to_missing? in ActiveRecord::Migration
This complements the existing method_missing method.

Add inspect to ActiveStorage::Service, Registry, and Configurator
Previously, pretty-printing ActiveStorage::Blob.services could leak the entire configuration, including secrets.

Fixed race condition in PostgreSQL type_map initialization
The issue has been fixed in two consecutive Pull Requests.

You can view the whole list of changes here. We had 31 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.