We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given following code: https://gist.github.com/pawelpacana/57ddc0699b775059347301b32119bac1 we encounter problem on event_store.deserialize because payload cannot be unpacked to keyword arguments.
event_store.deserialize
payload
1) backround job serialization JSON as in Sidekiq/Resque Failure/Error: client.deserialize( transport_as_json( serialized_record(event).to_h ) ) ArgumentError: wrong number of arguments (given 1, expected 0; required keywords: event_type, event_id, data, metadata)
That happens because:
irb(main):011:0> RubyEventStore::SerializedRecord.new(event_id: SecureRandom.uuid, data: '', metadata: '', event_type: 'DummyEvent').to_h => {:event_id=>"5c0f5eef-edb4-4899-9918-556e365c5acb", :data=>"", :metadata=>"", :event_type=>"DummyEvent"} irb(main):012:0> JSON.load(JSON.dump(_)) => {"event_id"=>"5c0f5eef-edb4-4899-9918-556e365c5acb", "data"=>"", "metadata"=>"", "event_type"=>"DummyEvent"}
and that is not compatible with method signature.
For reference:
Existing specs in RES skip that transport serialization (not sure about the one that uses Sidekiq::Testing.fake though):
Sidekiq::Testing.fake
rails_event_store/ruby_event_store/spec/client_spec.rb
Lines 693 to 740 in 14d73c0
rails_event_store/rails_event_store/spec/rails_event_store_spec.rb
Lines 12 to 18 in 1f61303
rails_event_store/rails_event_store/spec/protobuf_integration_spec.rb
Lines 3 to 15 in 353d614
The text was updated successfully, but these errors were encountered:
7d249f5
No branches or pull requests
Given following code: https://gist.github.com/pawelpacana/57ddc0699b775059347301b32119bac1 we encounter problem on
event_store.deserialize
becausepayload
cannot be unpacked to keyword arguments.That happens because:
and that is not compatible with method signature.
For reference:
Existing specs in RES skip that transport serialization (not sure about the one that uses
Sidekiq::Testing.fake
though):rails_event_store/ruby_event_store/spec/client_spec.rb
Lines 693 to 740 in 14d73c0
rails_event_store/rails_event_store/spec/rails_event_store_spec.rb
Lines 12 to 18 in 1f61303
rails_event_store/rails_event_store/spec/protobuf_integration_spec.rb
Lines 3 to 15 in 353d614
The text was updated successfully, but these errors were encountered: