Ruby on Rails

Ruby on Rails: CI Gets a Speed Boost and Developer Experience Improvements

This episode covers four merged pull requests bringing practical improvements to Rails, including parallel CI step execution for faster builds, new time comparison methods, and important fixes for event filtering and transaction instrumentation. Donal McBreen led the charge with three significant contributions, while Matheus Richard added some sweet syntactic sugar for date comparisons.

Duration: PT3M55S

https://podlog.io/listen/ruby-on-rails-87e2c2b6/episode/ruby-on-rails-ci-gets-a-speed-boost-and-developer-experience-improvements-7d30851a

Transcript

Hey there, Rails developers! Welcome back to another episode of Ruby on Rails. I'm your host, and wow, do we have some exciting updates from the Rails core team today. February 19th brought us four fantastic pull requests that are all about making your development life better, faster, and more enjoyable.

Let's dive right into the biggest story of the day - and honestly, this one's going to make a lot of teams very happy. Donal McBreen just landed a massive improvement to Rails' CI runner with parallel step groups. If you've ever sat there watching your CI pipeline crawl through security checks one by one while thinking "why can't these just run at the same time?" - well, your prayers have been answered!

Here's the beautiful part: you can now group your CI steps and run them in parallel. Picture this - instead of waiting for Rubocop to finish, then Brakeman, then your gem audit, you can wrap them in a group with `parallel: 3` and watch them all run simultaneously. The implementation is really thoughtful too. They're using PTY to capture output so nothing gets jumbled together, and you get a nice live progress indicator showing which steps are running.

But wait, it gets even better! You can nest groups, so if you have some steps that need to run sequentially within your parallel group, that's totally supported. It's like having the best of both worlds - speed where you can get it, order where you need it.

Now, speaking of making life easier, Matheus Richard brought us something that's going to make your view logic so much cleaner. We now have `in_this_week?`, `in_this_month?`, and `in_this_year?` methods for Date and Time objects. These join the family with `today?`, `tomorrow?`, and `yesterday?`, and honestly, I can't believe we didn't have these before!

Think about all those times you've written gnarly date comparison logic to show different UI elements based on when something happened. Now you can just say `unless some_date.in_this_week?` and boom, you're done. It's one of those features that's so obvious once you see it, you wonder how you lived without it.

Donal wasn't done making our lives better though. He also fixed a really annoying bug with event filtering that was causing SQL query names to get filtered out of logs. You know how you set `config.filter_parameters` to hide sensitive stuff? Well, it was being a little too aggressive and turning your nice "Person Load" SQL logs into just "[FILTERED]" which made debugging a real pain. That's fixed now, so your logs will be clean but still useful.

And in the "performance improvements you'll probably never notice but are still awesome" category, Donal also fixed a transaction instrumentation issue where BEGIN statements were getting double-counted in timing measurements. It's one of those subtle bugs that could make your metrics look weird, especially if you're running queries against a database in another datacenter.

Finally, we had Jean Boussier doing some internal cleanup work, refactoring how `exec_insert_all` handles insert managers. It's the kind of behind-the-scenes work that keeps the Rails codebase healthy and maintainable.

What I love about today's updates is how they show the Rails team's commitment to the complete developer experience. We've got speed improvements for CI, convenience methods for common operations, bug fixes for annoying edge cases, and ongoing maintenance work. It's like getting your car serviced - new features, fixes, and tune-ups all in one go.

Today's focus: If you're using Rails' CI runner, definitely check out those parallel step groups. Even if you're not ready to implement them today, understanding how they work will help you think about optimizing your build pipeline. And if you're doing any date-based conditionals in your views, those new time comparison methods are going to clean up your code beautifully.

That's a wrap on today's Rails roundup! Keep building amazing things, and I'll catch you in the next episode. Happy coding!