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

Calling save appears to always make an RPC call #91

Open
liveh2o opened this issue Apr 18, 2022 · 1 comment
Open

Calling save appears to always make an RPC call #91

liveh2o opened this issue Apr 18, 2022 · 1 comment

Comments

@liveh2o
Copy link
Owner

liveh2o commented Apr 18, 2022

Unless the behavior changed in Active Record, calling save should be a no-op on a record that has not changed. The same should be true for calling save in Active Remote, but that doesn't appear to be the case:

     Failure/Error: member.save

     Errno::ECONNREFUSED:
       Connection refused - connect(2) for "127.0.0.1" port 9399
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/socket.rb:30:in `initialize'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/socket.rb:30:in `new'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/socket.rb:30:in `connect_to_rpc_server'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/socket.rb:12:in `block in send_request'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/base.rb:191:in `timeout_wrap'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/connectors/socket.rb:10:in `send_request'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-opentracing-1.0.7/lib/protobuf/rpc/extensions/client.rb:8:in `send_request'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/protobuf-3.10.5/lib/protobuf/rpc/client.rb:129:in `method_missing'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/rpc_adapters/protobuf_adapter.rb:28:in `execute'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/rpc.rb:27:in `remote_call'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/rpc.rb:61:in `remote_call'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:168:in `remote'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/dirty.rb:34:in `remote'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:282:in `block in remote_update'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:276:in `remote_update'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/dirty.rb:84:in `remote_update'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:268:in `create_or_update'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:186:in `block in save'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/persistence.rb:185:in `save'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/dirty.rb:42:in `save'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/active_remote-6.0.1/lib/active_remote/validations.rb:17:in `save'
     # ./app/controllers/api/platform/experian/jobs_controller.rb:72:in `block in set_member'
     # ./app/controllers/api/platform/experian/jobs_controller.rb:68:in `tap'
     # ./app/controllers/api/platform/experian/jobs_controller.rb:68:in `set_member'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/md-logstasher-1.5.0/lib/logstasher/context_wrapper.rb:9:in `process_action'
     # ./app/controllers/api/platform/api_controller.rb:21:in `process_action'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/template_assertions.rb:62:in `process'
     # /Users/adam.hutchison/.rvm/gems/ruby-2.7.5@harvey/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/integration.rb:16:in `block (2 levels) in <module:Integration>'
     # ./spec/controllers/api/platform/experian/jobs_controller_spec.rb:69:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:99:in `block (2 levels) in <top (required)>'
@film42
Copy link
Collaborator

film42 commented Apr 18, 2022

Potentially a good first issue!

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

No branches or pull requests

2 participants