dapp 0.13.22 → 0.13.23

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
  SHA1:
3
- metadata.gz: 328339d676470a5b9dde9b652176c9832d2d9b5f
4
- data.tar.gz: 6cb726ff189d3a830ed5a7a5951106df4f325c53
3
+ metadata.gz: e8e9a55ea77b2092ec2e1ba2a5b4197f2b3e1fc3
4
+ data.tar.gz: 00621408f78687276933849c9362f448ca16cfcb
5
5
  SHA512:
6
- metadata.gz: 6f60a9c036e8c459ff91738d1412bfe4477162357fa81765e71a253068291ec2dbca7102f82cea8aee3d8878b9d69081f10ee727216af8900f09f33ede304795
7
- data.tar.gz: f3051c94f5b2b4f9ca13fec239e8ce8d44c2996f17752f742b3460074a2cd47b9ce9d3f67e1f831256ff04efd49e36b4479e789e9c140121d9b0a20a552f6879
6
+ metadata.gz: dad09d3af9c35cc106c6984f69b2a3f1fa044514e66db9d966c76249311827ba9806480c27c6ac77afce450e18ef34787ae74752ede9cf501ed4a6b487c1d4f4
7
+ data.tar.gz: a120bef28f31c1bf00d71f3f97030b312e6f3d4c79c3d5abc4b0d369193a8f0c1907b5e908254563c59edd732c52490a6b8882ebed453f238dd3b7b09620ffff
@@ -106,13 +106,16 @@ module Dapp
106
106
  rescue Excon::Error::Timeout
107
107
  raise Error::Timeout
108
108
  rescue Error::Base => err
109
- if err.net_status[:code] == :bad_request and
110
- err.net_status[:data][:response_body] and
111
- err.net_status[:data][:response_body]['message'].end_with? 'ContainerCreating'
112
- raise Error::Pod::ContainerCreating, data: err.net_status[:data]
113
- else
114
- raise
109
+ if err.net_status[:code] == :bad_request and err.net_status[:data][:response_body]
110
+ msg = err.net_status[:data][:response_body]['message']
111
+ if msg.end_with? 'ContainerCreating'
112
+ raise Error::Pod::ContainerCreating, data: err.net_status[:data]
113
+ elsif msg.end_with? 'PodInitializing'
114
+ raise Error::Pod::PodInitializing, data: err.net_status[:data]
115
+ end
115
116
  end
117
+
118
+ raise
116
119
  end
117
120
 
118
121
  def event_list(**query_parameters)
@@ -19,11 +19,18 @@ module Dapp
19
19
 
20
20
  module Pod
21
21
  class NotFound < Kubernetes::Client::Error::NotFound ; end
22
+
22
23
  class ContainerCreating < Kubernetes::Client::Error::Base
23
24
  def initialize(**net_status)
24
25
  super({code: :container_creating}.merge(net_status))
25
26
  end
26
27
  end
28
+
29
+ class PodInitializing < Kubernetes::Client::Error::Base
30
+ def initialize(**net_status)
31
+ super({code: :pod_initializing}.merge(net_status))
32
+ end
33
+ end
27
34
  end # Pod
28
35
  end # Kubernetes::Client::Error
29
36
  end # Kube
@@ -38,7 +38,7 @@ module Dapp
38
38
  [timestamp, data]
39
39
  end
40
40
  .reject {|timestamp, _| @processed_log_timestamps.include? timestamp}
41
- rescue Kubernetes::Client::Error::Pod::ContainerCreating
41
+ rescue Kubernetes::Client::Error::Pod::ContainerCreating, Kubernetes::Client::Error::Pod::PodInitializing
42
42
  sleep 0.1
43
43
  next
44
44
  end
@@ -129,7 +129,7 @@ module Dapp
129
129
  [timestamp, data]
130
130
  end
131
131
  }.compact
132
- rescue Kubernetes::Client::Error::Pod::ContainerCreating
132
+ rescue Kubernetes::Client::Error::Pod::ContainerCreating, Kubernetes::Client::Error::Pod::PodInitializing
133
133
  next
134
134
  end
135
135
 
data/lib/dapp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Dapp
2
- VERSION = '0.13.22'.freeze
2
+ VERSION = '0.13.23'.freeze
3
3
  BUILD_CACHE_VERSION = 18
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.22
4
+ version: 0.13.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Stolyarov