aws-flow-ruby
aws-flow-ruby copied to clipboard
NoMethodError on TimerDecisionStateMachine
We got a undefined method 'run' for #<AWS::Flow::TimerDecisionStateMachine:0x007fb76b535c58> exception today, originating from state_machines L138:
gems/aws-flow-1.0.8/lib/aws/decider/state_machines.rb:138 · block in <class:DecisionStateMachineBase>
gems/aws-flow-1.0.8/lib/aws/decider/state_machines.rb:75 · call
gems/aws-flow-1.0.8/lib/aws/decider/state_machines.rb:75 · consume
gems/aws-flow-1.0.8/lib/aws/decider/workflow_clock.rb:95 · block (2 levels) in create_timer
It seems that DecisionStateMachineDFA will call the transition function with itself as argument, and then the transition function calls run on it, but it has no such method?
Thanks for reporting the issue! We will look into this shortly.
Hey @pmohan6, just wanted to check if there was any update on this?
Hey @arkadiyt, unfortunately we don't have an update on this yet. I will let you know when we have a fix out for this.
Sorry for the late reply. This seems like it might have been incorrectly ported over from Java Flow. The run method mentioned here is the run method on a Runnable in Java. I'll try to dig in further. Do you happen to have a repro for this?
I don't remember how I ran into it but judging from that line in the backtrace:
add_transitions [
# ...
[:created, :cancel, :completed, lambda { |immediate_cancellation_callback| immediate_cancellation_callback.run }],
# ...
]
it seems like it happens when a timer is created and then canceled before it fires?