Skip to content

Commit 5d7632d

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 d2c8ec5 commit 5d7632d

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
@@ -54,6 +54,8 @@ class Plugin < Proxy::Plugin
5454

5555
plugin :ssh, Proxy::RemoteExecution::Ssh::VERSION
5656

57+
requires :dynflow, '~> 0.5'
58+
5759
load_classes do
5860
require 'smart_proxy_dynflow'
5961
require 'smart_proxy_dynflow/task_launcher'

test/integration_test.rb

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

2828
mod = response['ssh']
2929
refute_nil(mod)
30-
assert_equal('running', mod['state'], Proxy::LogBuffer::Buffer.instance.info[:failed_modules][:ssh])
30+
assert_equal('failed', mod['state'], Proxy::LogBuffer::Buffer.instance.info[:failed_modules][:ssh])
3131
end
3232

3333
def test_features_with_dynflow

0 commit comments

Comments
 (0)