Skip to content

Releases: palkan/isolator

1.1.0

12 Aug 20:01
Compare
Choose a tag to compare

Features

  • Added support for ActiveJob::Base.enqueue_after_transaction_commit.
  • Added ignore_on: (obj) -> bool option for adapters.
  • Added ActionCable adapter.

1.0.0

11 Jan 17:20
Compare
Choose a tag to compare

Features

  • Improved transactions tracking for Rails 7.1+ (handles closed connections and other edge cases)
  • Add Isolator.on_transaction_begin and Isolator.on_transaction_end callbacks
  • Add ability to track concurrent transactions within the same thread (e.g., to multiple databases)

This feature is disabled by default, opt-in via: Isolator.config.disallow_per_thread_concurrent_transactions = true

Changes

  • Drop Ruby 2.6 and Rails 5 support

0.11.0

28 Sep 00:18
Compare
Choose a tag to compare

Changes

0.7.0

25 Sep 12:54
Compare
Choose a tag to compare

This release brings two major features: multiple databases support and verbose output.

Multiple databases

Isolator was designed years ago with the assumption that there is only one DB connection per thread exists (which is true when you have a single DB pool). Since Rails 6, multi-database applications became more popular and revealed that this original assumption wasn't good enough to last for ages.

For this release, we refactored the internals to track connections separately, thus, supporting multiple databases.

NOTE: Although we tested this feature in multiple projects, there still could be some edge cases we're not aware of. Please, submit an issue if encounter problems with this release in your single- or multi-database application.

Thanks to @mquan and @bibendi for helping in implementing and testing this feature.

Debug output

Sometimes it's useful to know which actions initiated the transaction causing an Isolator exception. For that, you can now use a verbose logging feature of Isolator.

To enable Isolator logs, provide ISOLATOR_DEBUG=true environment variable or manually via Isolator.debug_enabled option, for example:

$ ISOLATOR_DEBUG=true bundle exec rspec

[ISOLATOR DEBUG] Threshold value was changed for connection 47316728757800: 2
[ISOLATOR DEBUG] Transaction opened for connection 47316728757800 (total: 1, threshold: 2)
  ↳ /app/lib/testing/shared_contexts/shared_user.rb:7:in `block (2 levels) in <main>'
...

By default, Rails.backtrace_cleaner is used to filter the stacktrace. You can specify your own filter via Isolator.backtrace_cleaner option:

Isolator.backtrace_cleaner = ->(locations) { locations.grep(/my_app/) }

You can also change the number of stack trace lines to display via ISOLATOR_BACKTRACE_LENGTH environmental variable or manually via Isolator.backtrace_length option.

0.1.0 (alpha)

19 Feb 13:23
Compare
Choose a tag to compare

Initial release with basic functionality:

  • HTTP watchers (though Sniffer)
  • Background jobs watchers for ActiveJob and Sidekiq
  • Mail gem watcher (detects emails delivery)
  • WebMock integration.