Skip to content

Commit 358bc09

Browse files
committed
Make dynflow an explicit dependency
Loading the smart_proxy_dynflow (or any Smart Proxy plugin really) in load_classes does not work due to the way plugin initialization happens. For this plugin to work, dynflow must be running. This uses requires to validate that dynflow is actually correctly enabled and running. This also means that if dynflow was loaded but ended up in a failed state that REX SSH also ends up in a failed state.
1 parent ef3cb66 commit 358bc09

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/smart_proxy_remote_execution_ssh/plugin.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class Plugin < Proxy::Plugin
3232

3333
plugin :ssh, Proxy::RemoteExecution::Ssh::VERSION
3434

35+
requires :dynflow, '~> 0.5'
36+
3537
load_classes do
3638
require 'smart_proxy_dynflow'
3739
require 'smart_proxy_dynflow/task_launcher'

test/integration_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_features_without_dynflow
2222

2323
mod = response['ssh']
2424
refute_nil(mod)
25-
assert_equal('running', mod['state'], Proxy::LogBuffer::Buffer.instance.info[:failed_modules][:ssh])
25+
assert_equal('failed', mod['state'], Proxy::LogBuffer::Buffer.instance.info[:failed_modules][:ssh])
2626
end
2727

2828
def test_features_with_dynflow

0 commit comments

Comments
 (0)