right_chimp 2.1.15 → 2.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f28fe644c07a27aea21a4cd11a7b21223bda8159
4
- data.tar.gz: 8e1c12689609f5424d40b3835d6f0c11d0f081dc
3
+ metadata.gz: b9005af94e19fd62dbd5336cf810c160fae7a201
4
+ data.tar.gz: 35be5f24c076f7b019df1ba91d5d9166143cb2c1
5
5
  SHA512:
6
- metadata.gz: a3e7a74d5476dcfb2baefec3af913f834203118816e1ebfdb67fc736208e0bd5d0ccc365bed2782d2a9a86ebfa4c8367130119790efed28f4cd0778606313c50
7
- data.tar.gz: 61e8b9ea7fd1363c3207890e8ca99f0b9be7189bd370ca0fc7f7e679d22ec3c91ece3c8f9f26e2737ac88095e5108dd5d3722cac8add253fbb6b1f77cdf156c0
6
+ metadata.gz: 21cca557f34763e5c50be7462be5c519b101f4ffd9599426188af4e74671f7a59bd0c520f943823d7bb2f28eab697fef2a4cbfa83fd53589d91850a8686bf74f
7
+ data.tar.gz: 51c6a7fe550bfe69e559124acbee9b23d6827d264325717e9af0404328f42db1df6e31121cc6ed03ba8d0375b7a99dd057811fbe03e9a5a5db792bc7119688d7
data/CHANGES CHANGED
@@ -159,4 +159,12 @@ Version 2.1.13
159
159
 
160
160
  Version 2.1.15
161
161
  ---------------
162
- * Feature: We now are able to query a subset of job_uuids and total stats format.
162
+ * Feature: We now are able to query a subset of job_uuids and total stats format.
163
+
164
+ Version 2.1.16
165
+ --------------
166
+ * Bugfix: chimp --wait-until-done now honors the noprompt flag.
167
+
168
+ Version 2.1.17
169
+ --------------
170
+ * Bugfix: we now use 'safe_yaml' to prevent erroring out on a 422 response from the api.
data/Gemfile.lock CHANGED
@@ -1,22 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- right_chimp (2.1.15)
4
+ right_chimp (2.1.16)
5
5
  highline (~> 1.7.2)
6
6
  nokogiri (~> 1.6.7.1)
7
7
  progressbar (~> 0.11.0)
8
8
  rake (~> 10.4.2)
9
9
  right_api_client (> 1.5)
10
+ safe_yaml
10
11
 
11
12
  GEM
12
13
  remote: https://rubygems.org/
13
14
  specs:
14
15
  binding_of_caller (0.7.2)
15
16
  debug_inspector (>= 0.0.1)
16
- coderay (1.1.0)
17
+ coderay (1.1.1)
17
18
  debug_inspector (0.0.2)
18
19
  diff-lcs (1.1.3)
19
- domain_name (0.5.20160310)
20
+ domain_name (0.5.20160615)
20
21
  unf (>= 0.0.5, < 1.0.0)
21
22
  highline (1.7.8)
22
23
  http-cookie (1.0.2)
@@ -29,7 +30,7 @@ GEM
29
30
  nokogiri (1.6.7.2)
30
31
  mini_portile2 (~> 2.0.0.rc2)
31
32
  progressbar (0.11.0)
32
- pry (0.10.3)
33
+ pry (0.10.4)
33
34
  coderay (~> 1.1.0)
34
35
  method_source (~> 0.8.1)
35
36
  slop (~> 3.4)
@@ -53,6 +54,7 @@ GEM
53
54
  rspec-expectations (2.6.0)
54
55
  diff-lcs (~> 1.1.2)
55
56
  rspec-mocks (2.6.0)
57
+ safe_yaml (1.0.4)
56
58
  slop (3.6.0)
57
59
  unf (0.1.4)
58
60
  unf_ext
@@ -68,4 +70,4 @@ DEPENDENCIES
68
70
  rspec (~> 2.6.0)
69
71
 
70
72
  BUNDLED WITH
71
- 1.10.6
73
+ 1.12.5
data/chimp.gemspec CHANGED
@@ -1,33 +1,32 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "right_chimp/version"
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'right_chimp/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "right_chimp"
6
+ s.name = 'right_chimp'
7
7
  s.license = 'MIT'
8
8
 
9
9
  s.version = Chimp::VERSION
10
- s.authors = ["RightScale Operations"]
11
- s.email = ["ops@rightscale.com"]
12
- s.homepage = "https://github.com/rightscale/right_chimp"
13
- s.summary = %q{RightScale platform command-line tool}
14
- s.description = %q{The Chimp is a tool for managing servers using the RightScale platform.}
15
-
16
- # s.rubyforge_project = "chimp"
10
+ s.authors = ['RightScale Operations']
11
+ s.email = ['ops@rightscale.com']
12
+ s.homepage = 'https://github.com/rightscale/right_chimp'
13
+ s.summary = 'RightScale platform command-line tool'
14
+ s.description = 'The Chimp is a tool for managing servers using the RightScale platform.'
17
15
 
18
16
  s.files = `git ls-files`.split("\n")
19
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
- s.require_paths = ["lib"]
19
+ s.require_paths = ['lib']
22
20
 
23
- s.add_dependency "rake", "~> 10.4.2"
24
- s.add_dependency "nokogiri", "~> 1.6.7.1"
25
- s.add_dependency "progressbar", "~> 0.11.0"
26
- s.add_dependency "right_api_client", "> 1.5"
27
- s.add_dependency "highline", "~> 1.7.2"
21
+ s.add_dependency 'rake', '~> 10.4.2'
22
+ s.add_dependency 'nokogiri', '~> 1.6.7.1'
23
+ s.add_dependency 'progressbar', '~> 0.11.0'
24
+ s.add_dependency 'right_api_client', '> 1.5'
25
+ s.add_dependency 'highline', '~> 1.7.2'
26
+ s.add_dependency 'safe_yaml'
28
27
 
29
- s.add_development_dependency "rspec", "~> 2.6.0"
30
- s.add_development_dependency "pry"
31
- s.add_development_dependency "pry-stack_explorer"
28
+ s.add_development_dependency 'rspec', '~> 2.6.0'
29
+ s.add_development_dependency 'pry'
30
+ s.add_development_dependency 'pry-stack_explorer'
32
31
 
33
32
  end
data/lib/right_chimp.rb CHANGED
@@ -11,6 +11,7 @@ require 'rake'
11
11
  require 'progressbar'
12
12
  require 'json'
13
13
  require 'yaml'
14
+ require 'safe_yaml'
14
15
 
15
16
  require 'highline/import'
16
17
 
@@ -34,6 +34,7 @@ module Chimp
34
34
  @retry_count = 0
35
35
  @hold = false
36
36
  @timeout = 900
37
+ @paused = false
37
38
 
38
39
  @limit_start = 0
39
40
  @limit_end = 0
@@ -415,7 +416,7 @@ module Chimp
415
416
  when '--chimpd'
416
417
  @use_chimpd = true
417
418
  unless arg.empty?
418
- if arg =~ /[\d]+\.[\d]+\.[\d]+\.[\d]+:[\d]+/
419
+ if arg =~ /[\d]+\.[\d]+\.[\d]+\.[\d]+:[\d]+/
419
420
  @chimpd_host, @chimpd_port = arg.split(':')
420
421
  @chimpd_port = @chimpd_port.to_i
421
422
  else
@@ -991,12 +992,19 @@ module Chimp
991
992
  #
992
993
  # If no workers failed, then we're done.
993
994
  #
994
- return true if failed_workers.empty?
995
-
995
+ if failed_workers.empty?
996
+ @paused = false
997
+ return "continue"
998
+ end
996
999
  #
997
1000
  # Some workers failed; offer the user a chance to retry them
998
1001
  #
999
- verify("The following objects failed:", results_display, false)
1002
+ verify("The following objects failed:", results_display, false) unless @paused
1003
+
1004
+ unless @prompt
1005
+ @paused = true
1006
+ return "pause"
1007
+ end
1000
1008
 
1001
1009
  while true
1002
1010
  puts "(R)etry failed jobs"
@@ -1013,7 +1021,7 @@ module Chimp
1013
1021
  elsif command =~ /^r/i
1014
1022
  puts "Retrying..."
1015
1023
  ChimpQueue.instance.group[group].requeue_failed_jobs!
1016
- return false
1024
+ return "retry"
1017
1025
  end
1018
1026
  end
1019
1027
  end
@@ -1183,12 +1191,16 @@ module Chimp
1183
1191
  end
1184
1192
 
1185
1193
  #
1186
- # If verify_results returns true, then ask chimpd to requeue all failed jobs.
1194
+ # If verify_results returns false, then ask chimpd to requeue all failed jobs.
1187
1195
  #
1188
- if verify_results(@group)
1196
+ case verify_results(@group)
1197
+ when "continue"
1189
1198
  break
1190
- else
1199
+ when "retry"
1191
1200
  ChimpDaemonClient.retry_group(@chimpd_host, @chimpd_port, @group)
1201
+ when "pause"
1202
+ @paused = true
1203
+ #stuck in this loop until action is taken
1192
1204
  end
1193
1205
  end
1194
1206
  ensure
@@ -1,3 +1,3 @@
1
1
  module Chimp
2
- VERSION = "2.1.15"
2
+ VERSION = "2.1.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_chimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.15
4
+ version: 2.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - RightScale Operations
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-31 00:00:00.000000000 Z
11
+ date: 2016-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.7.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: safe_yaml
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec
85
99
  requirement: !ruby/object:Gem::Requirement