Skip to content

ActiveRecord query cache still crashing in the log subscriber #2794

@solnic

Description

@solnic

Description

Looks like #2789 did not fully address the issue where type_casted_binds are somehow not evaluated to an array when a query is cached.

Could not log "sql. active_record" event. ArgumentError: wrong number of arguments (given 1, expected 0) ["/opt/render/project/.gems/ruby/3.4.0/gems/activerecord-
8.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:312:in
'block in cache_notification_info'"
, "/opt/render/project/.gems/ruby/3.4.0/gems/sentry-rails-
6.1.1/lib/sentry/rails/1og_subscribers/active_record_subscriber.rb:58:in 'block in Sentry: :Rails: :LogSubscribers: :ActiveRecordSubscriber#sq1'",
"/opt/render/project/.gems/ruby/3.4.0/gems/sentry-rails-6.1.1/lib/sentry/rails/log_subscribers/active_record_subscriber.rb:56:in 'Array#each""
"/opt/render/project/.gems/ruby/3.4.0/gems/sentry-rails-6.1.1/1ib/sentry/rails/1og_subscribers/active_record_subscriber.rb:56:in 'Enumerable#each_with_index'",
"/opt/render/project/.gems/ruby/3.4.0/gems/sentry-rails-6.1.1/lib/sentry/rails/log_subscribers/active_record_subscriber.rb:56:in
'Sentry: :Rails: :LogSubscribers: :ActiveRecordSubscriber#sq1'", "/opt/render/project/.gems/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/subscriber.rb:138:in
'ActiveSupport: :Subscriber#call'", "/opt/render/project/.gems/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/log_subscriber.rb:147:in 'ActiveSupport: :LogSubscriber#cal1'",
"/opt/render/project/.gems/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/notifications/fanout.rb:177:in 'block in
ActiveSupport: :Notifications: :Fanout: :EventObjectGroup#finish'",
/opt/render/project/.gems/ruby/3.4.0/gems/activesupport-8.0.2/lib/active_support/notifications/fanout.rb:24:in

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions