Skip to content

Commit d8d1811

Browse files
adamruzickaofedoren
authored andcommitted
Fixes #38927 - Drop async-ssh
1 parent 533eeaa commit d8d1811

File tree

8 files changed

+6
-432
lines changed

8 files changed

+6
-432
lines changed

lib/smart_proxy_remote_execution_ssh.rb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,6 @@ def validate_mode!
2727
unless Plugin::MODES.include? Plugin.settings.mode
2828
raise "Mode has to be one of #{Plugin::MODES.join(', ')}, given #{Plugin.settings.mode}"
2929
end
30-
31-
if Plugin.settings.async_ssh
32-
Plugin.logger.warn('Option async_ssh is deprecated, use ssh-async mode instead.')
33-
34-
case Plugin.settings.mode
35-
when :ssh
36-
Plugin.logger.warn('Deprecated option async_ssh used together with ssh mode, switching mode to ssh-async.')
37-
Plugin.settings.mode = :'ssh-async'
38-
when :'ssh-async'
39-
# This is a noop
40-
else
41-
Plugin.logger.warn('Deprecated option async_ssh used together with incompatible mode, ignoring.')
42-
end
43-
end
4430
end
4531

4632
def validate_mqtt_settings!
@@ -97,11 +83,11 @@ def validate_ssh_log_level!
9783
end
9884

9985
def requires_configured_ssh?
100-
%i[ssh ssh-async].include?(Plugin.settings.mode) || Plugin.settings.cockpit_integration
86+
Plugin.settings.mode == :ssh || Plugin.settings.cockpit_integration
10187
end
10288

10389
def validate_socket_path!
104-
return unless Plugin.settings.mode == :'ssh' || Plugin.settings.mode == :'ssh-async'
90+
return unless Plugin.settings.mode == :'ssh'
10591

10692
socket_path = File.expand_path(Plugin.settings.socket_working_dir)
10793
raise "Socket path #{socket_path} is too long" if socket_path.length > Plugin::SOCKET_PATH_MAX_LENGTH

lib/smart_proxy_remote_execution_ssh/actions/run_script.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class RunScript < ::Dynflow::Action
77
def plan(*args)
88
mode = Proxy::RemoteExecution::Ssh::Plugin.settings.mode
99
case mode
10-
when :ssh, :'ssh-async'
10+
when :ssh
1111
plan_action(ScriptRunner, *args)
1212
when :pull, :'pull-mqtt'
1313
plan_action(PullScript, *args)

lib/smart_proxy_remote_execution_ssh/async_scripts/control.sh

Lines changed: 0 additions & 110 deletions
This file was deleted.

lib/smart_proxy_remote_execution_ssh/async_scripts/retrieve.sh

Lines changed: 0 additions & 151 deletions
This file was deleted.

lib/smart_proxy_remote_execution_ssh/plugin.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Proxy::RemoteExecution::Ssh
22
class Plugin < Proxy::Plugin
33
SSH_LOG_LEVELS = %w[debug info error fatal].freeze
4-
MODES = %i[ssh ssh-async pull pull-mqtt].freeze
4+
MODES = %i[ssh pull pull-mqtt].freeze
55
# Unix domain socket path length is limited to 104 (on some platforms) characters
66
# Socket path is composed of custom path (max 49 characters) + job id (37 characters)
77
# + offset(17 characters) + null terminator
@@ -61,8 +61,6 @@ def self.simulate?
6161
def self.runner_class
6262
@runner_class ||= if simulate?
6363
Runners::FakeScriptRunner
64-
elsif settings.mode == :'ssh-async'
65-
Runners::PollingScriptRunner
6664
else
6765
Runners::ScriptRunner
6866
end
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module Proxy::RemoteExecution::Ssh
22
module Runners
33
require 'smart_proxy_remote_execution_ssh/runners/script_runner'
4-
require 'smart_proxy_remote_execution_ssh/runners/polling_script_runner'
54
require 'smart_proxy_remote_execution_ssh/runners/fake_script_runner'
65
end
76
end

0 commit comments

Comments
 (0)