opswalrus 1.0.108 → 1.0.110

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a57c26c94a3dff09f0385653ef331bb388ac8e861a8ed0f865c9f2f752af1c68
4
- data.tar.gz: fd75b79cbb55f9f37769f5500b7ccc63ce1fc8f93e48a9289f7406de95c84043
3
+ metadata.gz: d1547e47df7a32fcfa9d418c6002c20aa1c79947aaafceacf6447823b300703c
4
+ data.tar.gz: 0cc147d636b6fc568106295233a6a30e476257fbf49d56e5c0f7072b046e33ed
5
5
  SHA512:
6
- metadata.gz: 94a3e80aea1b03018b79bcf5606e747f0ab62721481feb458691aa9c89a196954802c486603cb686dc6a11786ffd8e258d516f424ec03e378d1fd8777625eb88
7
- data.tar.gz: bbe1dbe4ac4b98c36aae37b950ae3ea784599e95f1d6b96f230033973794a77417da9cc0f5ac67acaf64fcf5f6aaf551684fd1ba27ba7b1adaa66f069383bbf8
6
+ metadata.gz: 19dfecd617331e1d3b900a6a70100ebadd312d1a2347d23f3f53daa8b2f3b5e2f8fe1230db8855daf0de2f7a7ab61737d17aa65aaad42cfa56e19d9b9b4888ba
7
+ data.tar.gz: 76dc51991fc073a8372bdd22f976403e675d668f11d36e306ca47d11823b5dcfb8de6667ecebb55a9c0796bf8470715a977b523927fbeb0f0f1656dff3a14b9e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.108)
4
+ opswalrus (1.0.110)
5
5
  activesupport (~> 7.0)
6
6
  bcrypt_pbkdf (~> 1.1)
7
7
  binding_of_caller (~> 1.0)
@@ -160,12 +160,12 @@ module OpsWalrus
160
160
  }
161
161
  end
162
162
 
163
- def autoretry(delay: 5, timeout: 300, &block)
163
+ def autoretry(delay: 5, timeout: 300, limit: 3, &block)
164
164
  attempts ||= 0
165
165
  attempts += 1
166
166
  block.call
167
167
  rescue RetriableRemoteInvocationError => e
168
- if attempts <= 3
168
+ if attempts <= limit
169
169
  reconnected = reconnect(delay, timeout)
170
170
  retry if reconnected
171
171
  end
@@ -34,7 +34,8 @@ module SSHKit
34
34
  # per https://stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby
35
35
  # and https://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio
36
36
  # the PTY can raise an Errno::EIO because the child process unexpectedly goes away
37
- rescue EOFError, Errno::EIO
37
+ # Errno::ENOENT seems to be kind of like EIO
38
+ rescue EOFError, Errno::EIO, Errno::ENOENT
38
39
  # puts "eof!"
39
40
  handle_data_for_stdout(output, cmd, buffer, stdin, true)
40
41
  stdout.close
@@ -68,7 +69,8 @@ module SSHKit
68
69
  # per https://stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby
69
70
  # and https://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio
70
71
  # the PTY can raise an Errno::EIO because the child process unexpectedly goes away
71
- rescue EOFError, Errno::EIO
72
+ # Errno::ENOENT seems to behave like EIO
73
+ rescue EOFError, Errno::EIO, Errno::ENOENT
72
74
  # puts "eof!"
73
75
  handle_data_for_stderr(output, cmd, buffer, stdin, true)
74
76
  stderr.close
@@ -40,7 +40,8 @@ module SSHKit
40
40
  # per https://stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby
41
41
  # and https://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio
42
42
  # the PTY can raise an Errno::EIO because the child process unexpectedly goes away
43
- rescue EOFError, Errno::EIO
43
+ # Errno::ENOENT seems to behave like EIO
44
+ rescue EOFError, Errno::EIO, Errno::ENOENT
44
45
  # puts "eof!"
45
46
  handle_data_for_stdout(output, cmd, buffer, stdin, true)
46
47
  stdout.close
@@ -64,6 +65,7 @@ module SSHKit
64
65
  # stderr_writer.close
65
66
  # output.log_command_data(cmd, :stderr, stderr_reader.read)
66
67
  cmd.exit_status = status.exitstatus
68
+ ensure
67
69
  output.log_command_exit(cmd)
68
70
  end
69
71
  # ensure
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.108"
2
+ VERSION = "1.0.110"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opswalrus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.108
4
+ version: 1.0.110
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ellis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport