Dynflow / dynflow

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

Fix warnings that started popping up when running on ruby 3 #441

Closed adamruzicka closed 7 months ago

adamruzicka commented 8 months ago

These were fixed

lib/dynflow/coordinator.rb:149: warning: method redefined; discarding old to_s
lib/dynflow/coordinator.rb:133: warning: previous definition of to_s was here
lib/dynflow/persistence_adapters/sequel.rb:102: warning: assigned but unused variable - output_chunks
lib/dynflow/action/timeouts.rb:13: warning: mismatched indentations at 'end' with 'module' at 3
lib/dynflow/executors/parallel.rb:27: warning: assigned but unused variable - error
lib/dynflow/executors/parallel/pool.rb:27: warning: method redefined; discarding old queue_size
lib/dynflow/executors/parallel/pool.rb:19: warning: previous definition of queue_size was here
lib/dynflow/world.rb:300: warning: assigned but unused variable - e
lib/dynflow/telemetry.rb:21: warning: `&' interpreted as argument prefix
lib/dynflow/testing/mimic.rb:33: warning: `&' interpreted as argument prefix
lib/dynflow/testing/mimic.rb:35: warning: `&' interpreted as argument prefix
lib/dynflow/testing/factories.rb:42: warning: `*' interpreted as argument prefix
lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:2: warning: method redefined; discarding old to_uuid lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:2: warning: previous definition of to_uuid was here
lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:6: warning: method redefined; discarding old from_uuid
lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:6: warning: previous definition of from_uuid was here lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:10: warning: method redefined; discarding old with_foreign_key_recreation
lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb:10: warning: previous definition of with_foreign_key_recreation was here

The following three come from us dynamically generating methods and then overriding some of them

lib/dynflow/config.rb:105: warning: method redefined; discarding old validate_executor!
lib/dynflow/config.rb:9: warning: previous definition of validate_executor! was here
lib/dynflow/testing/mimic.rb:15: warning: method redefined; discarding old ===

CC @ofedoren I was seeing these when running smart_proxy_dynflow tests with ruby 3

ofedoren commented 8 months ago

Failures seem to be still related to the changes in sequel_migrations/018_add_uuid_column.rb. Now it seems to call alter_table in the scope of helper, which obviously won't work :/ Could we maybe somehow return the previous implementation and simply ignore some Ruby warnings? :)

adamruzicka commented 8 months ago

How about now?