aws-flow-ruby icon indicating copy to clipboard operation
aws-flow-ruby copied to clipboard

NoMethodError on TimerDecisionStateMachine

Open arkadiyt opened this issue 11 years ago • 5 comments

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?

arkadiyt avatar Mar 17 '14 19:03 arkadiyt

Thanks for reporting the issue! We will look into this shortly.

pmohan6 avatar Mar 18 '14 06:03 pmohan6

Hey @pmohan6, just wanted to check if there was any update on this?

arkadiyt avatar Jun 09 '14 19:06 arkadiyt

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.

pmohan6 avatar Jun 11 '14 18:06 pmohan6

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?

pmohan6 avatar Aug 23 '14 01:08 pmohan6

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?

arkadiyt avatar Aug 23 '14 01:08 arkadiyt