Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makara::Proxy.new calls super to use SimpleDelegate #82

Merged
merged 1 commit into from
May 16, 2015

Conversation

sax
Copy link
Contributor

@sax sax commented May 15, 2015

When ::ActiveRecord::Base.clear_active_connections! is executed in Rails 3,
it calls == on the connection. If initialize does not call super, the ==
method is not actually sent to the delegate, an ArgumentError: not delegated
error is raised.

Note that this does not happen in all instances, but is easily reproducible
when running Makara in the context of Sidekiq.

When ::ActiveRecord::Base.clear_active_connections! is executed in Rails 3,
it calls == on the connection. If initialize does not call super, the ==
method is not actually sent to the delegate, an ArgumentError: not delegated
error is raised.

Note that this does not happen in all instances, but is easily reproducible
when running Makara in the context of Sidekiq
@sax
Copy link
Contributor Author

sax commented May 15, 2015

/cc @mattcamuto

@sax
Copy link
Contributor Author

sax commented May 15, 2015

Rails 4 looks like it removed any == calls on connections when closing them. We're in progress on updating a Rails 3 app to Rails 4, starting by updating all of our gem dependencies.

mnelson added a commit that referenced this pull request May 16, 2015
Makara::Proxy.new calls super to use SimpleDelegate
@mnelson mnelson merged commit 10a161b into instacart:master May 16, 2015
@mnelson
Copy link
Contributor

mnelson commented May 16, 2015

Thanks!

@mnelson
Copy link
Contributor

mnelson commented May 16, 2015

v0.3.2 is up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants