fastlane 2.54.0.beta.20170818010002 → 2.54.0.beta.20170819010003
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +20 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa60520a646d56ac9ebd6c8fc6140053cae322a0
|
4
|
+
data.tar.gz: 0b1d7bc82b5e0053a73e6fcb58d1af7422edfe7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a18c29a23bb28aafb75028f6133ed4b213550848c6fd26fecbadd02bc3e11d84d9e81a4a3d6957d2afd39c5aa82a8487064afbf12ec12b5cef1fe5b12cf5a4
|
7
|
+
data.tar.gz: 8ac94195d4046a98e71d880f6e9046d82a8dc09cba32a1aa202ab2d474c2bbf90364c682d81be7a70d301bf49b377ac462c8e8a6148ef0202d75eec529a5a798
|
@@ -10,6 +10,10 @@ module Spaceship
|
|
10
10
|
class ITunesConnectTemporaryError < ITunesConnectError
|
11
11
|
end
|
12
12
|
|
13
|
+
# raised if the server failed to save, and it might be caused by an invisible server error
|
14
|
+
class ITunesConnectPotentialServerError < ITunesConnectError
|
15
|
+
end
|
16
|
+
|
13
17
|
attr_reader :du_client
|
14
18
|
|
15
19
|
def initialize
|
@@ -108,7 +112,9 @@ module Spaceship
|
|
108
112
|
end
|
109
113
|
|
110
114
|
# rubocop:disable Metrics/PerceivedComplexity
|
111
|
-
|
115
|
+
# If the response is coming from a flaky api, set flaky_api_call to true so we retry a little.
|
116
|
+
# Patience is a virtue.
|
117
|
+
def handle_itc_response(raw, flaky_api_call: false)
|
112
118
|
return unless raw
|
113
119
|
return unless raw.kind_of? Hash
|
114
120
|
|
@@ -164,6 +170,8 @@ module Spaceship
|
|
164
170
|
raise ITunesConnectTemporaryError.new, errors.first
|
165
171
|
elsif errors.count == 1 and errors.first.include?("Forbidden")
|
166
172
|
raise_insuffient_permission_error!
|
173
|
+
elsif flaky_api_call
|
174
|
+
raise ITunesConnectPotentialServerError.new, errors.join(' ')
|
167
175
|
else
|
168
176
|
raise ITunesConnectError.new, errors.join(' ')
|
169
177
|
end
|
@@ -343,7 +351,7 @@ module Spaceship
|
|
343
351
|
req.headers['Content-Type'] = 'application/json'
|
344
352
|
end
|
345
353
|
|
346
|
-
handle_itc_response(r.body)
|
354
|
+
handle_itc_response(r.body, flaky_api_call: true)
|
347
355
|
end
|
348
356
|
end
|
349
357
|
|
@@ -1315,7 +1323,7 @@ module Spaceship
|
|
1315
1323
|
|
1316
1324
|
private
|
1317
1325
|
|
1318
|
-
def with_tunes_retry(tries = 5, &_block)
|
1326
|
+
def with_tunes_retry(tries = 5, potential_server_error_tries = 3, &_block)
|
1319
1327
|
return yield
|
1320
1328
|
rescue Spaceship::TunesClient::ITunesConnectTemporaryError => ex
|
1321
1329
|
unless (tries -= 1).zero?
|
@@ -1326,6 +1334,15 @@ module Spaceship
|
|
1326
1334
|
retry
|
1327
1335
|
end
|
1328
1336
|
raise ex # re-raise the exception
|
1337
|
+
rescue Spaceship::TunesClient::ITunesConnectPotentialServerError => ex
|
1338
|
+
unless (potential_server_error_tries -= 1).zero?
|
1339
|
+
msg = "Potential server error received: '#{ex.message}'. Retrying after 10 seconds (remaining: #{tries})..."
|
1340
|
+
puts msg
|
1341
|
+
logger.warn msg
|
1342
|
+
sleep 10 unless defined? SpecHelper # unless FastlaneCore::Helper.is_test?
|
1343
|
+
retry
|
1344
|
+
end
|
1345
|
+
raise ex
|
1329
1346
|
end
|
1330
1347
|
|
1331
1348
|
def clear_user_cached_data
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.54.0.beta.
|
4
|
+
version: 2.54.0.beta.20170819010003
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-08-
|
18
|
+
date: 2017-08-19 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|