manageiq-cross_repo 1.1.2 → 1.1.3

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: 30b6fb35d9af6ba3cf9708da6985849f8b06d6714e5562e78d0936e0f72ab518
4
- data.tar.gz: eb2b41e92ee88223f39789b25bc3e4243bd887236a9e5656ad4c69473df1ffa4
3
+ metadata.gz: 756d32fbaca87b4fcd09bcb95dca76ad5e4560561586431dd64c7ea050d56573
4
+ data.tar.gz: 9ddbaeb1080a02757d20113cf93f6161086e24d91cc03a8793893900b9933969
5
5
  SHA512:
6
- metadata.gz: 3ee7409e50673592f3816086cef4c22cad1e60418e572032a048414f3736844c4d6f30d1bfaf3f4a63434ba980d7437e62c64cfc6b25efb1b80b946a0fd125b6
7
- data.tar.gz: 40ae9c79ca03f0329b24cc793a438f888aff92556b45c9d45dc448a8c777843f42d805e35ebe87fd60fadbc0b78fde96c98d808d2077a6bfaacb1f2401a22a3d
6
+ metadata.gz: f23fd2b6b57843d2974b06058786d1da8321d8eb83599fe4fe4935006e822ab036d5615cebc407db51c68c25f8d24bb3d78a85e37eb745565b68e66b55b35082
7
+ data.tar.gz: bd339e043a899aef5fafd10d2a8f85a59fc0d813b19d17c3b738ded4a6809b3f246e548eb2bdba0a11a5298fba3933296ffd4b1583a9fce2808ac62b503c613f
@@ -31,7 +31,9 @@ module ManageIQ::CrossRepo
31
31
  require "tmpdir"
32
32
  require "zlib"
33
33
 
34
- puts "Fetching #{tarball_url}"
34
+ retries ||= 0
35
+
36
+ puts "Fetching #{tarball_url}#{retry_count(retries)}"
35
37
 
36
38
  Dir.mktmpdir do |dir|
37
39
  Mixlib::Archive.new(open_tarball_url(tarball_url)).extract(dir)
@@ -40,6 +42,12 @@ module ManageIQ::CrossRepo
40
42
  FileUtils.mkdir_p(path.dirname)
41
43
  FileUtils.mv(content_dir, path)
42
44
  end
45
+ rescue => e
46
+ retries += 1
47
+ raise if retries > 3
48
+
49
+ sleep 1
50
+ retry
43
51
  end
44
52
 
45
53
  private
@@ -167,5 +175,11 @@ module ManageIQ::CrossRepo
167
175
  def git_pr_to_sha(url, pr)
168
176
  git_branch_to_sha(url, "refs/pull/#{pr}/merge") || git_branch_to_sha(url, "refs/pull/#{pr}/head")
169
177
  end
178
+
179
+ def retry_count(num)
180
+ return if num == 0
181
+
182
+ " (retry #{num}/3)"
183
+ end
170
184
  end
171
185
  end
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module CrossRepo
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-cross_repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Authors
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-13 00:00:00.000000000 Z
11
+ date: 2021-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: manageiq-style