Dynflow / dynflow

DYNamic workFLOW orchestration engine
http://dynflow.github.io
MIT License
121 stars 44 forks source link

**kwargs extravaganza #439

Closed adamruzicka closed 5 months ago

adamruzicka commented 10 months ago

good enough to make examples/future_execution and examples/orchestrate_evented work

Let's see how many tests will be broken by this

adamruzicka commented 8 months ago

but I don't understand why it raises NoMethodError: undefined method 'to_hash' for Support::DummyExample::Polling:Class. It seems Support::DummyExample::Polling is Action, which should (?) respond to_hash via recursive_to_hash (?). Obviously something gets broken on a way to serialization, but no idea when.

Apparently in https://github.com/Dynflow/dynflow/blob/master/lib/dynflow/execution_plan.rb#L287 the last self argument is the execution plan. Because ExecutionPlan implements to_hash, ruby 2.7 implicitly calls it as described in https://bugs.ruby-lang.org/issues/14909

ofedoren commented 7 months ago

Seems okay-ish?.. I mean, do we need to pass **{}? Does it fail without this on Ruby 2.7?

adamruzicka commented 7 months ago

I'm afraid so. In some place we explicitly need to tell ruby to not treat the previous argument as an options hash (and not call to_hash on it) :/

adamruzicka commented 5 months ago

In the end we decided to not go down this path.