Skip to content

Instantly share code, notes, and snippets.

@czeise
czeise / Deprecation Subscriber.md
Created May 25, 2023 15:02
Deprecation Subscriber

Setup for Big Rails Upgrades: bootboot + DeprecationSubscriber

For setting up "big" Rails upgrades that could take a while and still allow for feature work to continue while the upgrade is in progress, at Merchants, we put together a process that combines dual booting with Shopify's bootboot gem along with adding a DeprecationSubscriber as described by Ali in this blog post.

Here I'm sharing the DeprecationSubscriber piece of this. The challenges around this were finding the correct placement/initialization process of the subscriber to ensure that it caught as many deprecations as we could, and including useful information in the local exception output and the Sentry errors.

The benefits are being able to have deprecation warning bubble up in a much more noticeable way as we're working through the Rails upgrade. This includes in tests, and usage in their staging and production environments

This was a jo

Keybase proof

I hereby claim:

  • I am czeise on github.
  • I am craigzeise (https://keybase.io/craigzeise) on keybase.
  • I have a public key ASAgXgY22IWfkv7Og1oF_pYPiHbcyIxDt0A4IBt9EhctWQo

To claim this, I am signing this object: