gitlab-qa 12.1.0 → 12.2.1
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab/qa/component/gitaly_cluster.rb +1 -0
- data/lib/gitlab/qa/support/gitlab_version_info.rb +27 -5
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d415adc65e11bf7cb6e51536436a6569e8477bb37cb16ef6834148e1966b3a97
|
4
|
+
data.tar.gz: 18bb3333e27085779c061807124eef6921cb9e272d1bbca9f36f4c5b8fc1e703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3af2c133956e35c0fc594811d9027a0a61798407632c790dbefb7873605db3701ec56c0b7c7f2dc046ea4b0f711b15a40d8bb746b15c2f0d285b8bb942b7a1a
|
7
|
+
data.tar.gz: f188e6ea775ecc41d6e31de86a609a2ce479ab52055cb28f9e3c6c08feeea8d549494e578dd3c09daa46e659a654fed1ef464ab465a67033b0b7ecb6f211f9c4
|
data/Gemfile.lock
CHANGED
@@ -47,6 +47,10 @@ module Gitlab
|
|
47
47
|
|
48
48
|
private
|
49
49
|
|
50
|
+
MAX_TAGS_HTTP_REQUESTS = 50
|
51
|
+
# https://docs.docker.com/docker-hub/api/latest/#tag/images/operation/GetNamespacesRepositoriesImages
|
52
|
+
TAGS_PER_PAGE = 100
|
53
|
+
|
50
54
|
attr_reader :current_version, :edition, :logger
|
51
55
|
|
52
56
|
# Current versions major version
|
@@ -158,22 +162,40 @@ module Gitlab
|
|
158
162
|
def tags
|
159
163
|
return @tags if defined?(@tags)
|
160
164
|
|
161
|
-
|
165
|
+
MAX_TAGS_HTTP_REQUESTS.times do |index|
|
166
|
+
tag_list, more_data = fetch_tags(page: index + 1)
|
167
|
+
|
168
|
+
if tag_list
|
169
|
+
@tags = Array(@tags)
|
170
|
+
@tags += tag_list
|
171
|
+
end
|
172
|
+
|
173
|
+
break if tag_list.nil? || more_data.nil?
|
174
|
+
end
|
175
|
+
|
176
|
+
@tags
|
177
|
+
end
|
178
|
+
|
179
|
+
def fetch_tags(page:, per_page: TAGS_PER_PAGE)
|
180
|
+
logger.info("Fetching Docker tags page #{page} from 'gitlab/gitlab-#{edition}' registry")
|
162
181
|
response = HttpRequest.make_http_request(
|
163
|
-
url: "https://registry.hub.docker.com/v2/namespaces/gitlab/repositories/gitlab-#{edition}/tags?page_size
|
182
|
+
url: "https://registry.hub.docker.com/v2/namespaces/gitlab/repositories/gitlab-#{edition}/tags?page=#{page}&page_size=#{per_page}",
|
164
183
|
fail_on_error: false
|
165
184
|
)
|
166
185
|
|
167
186
|
unless response.code == 200
|
168
187
|
logger.error(" failed to fetch docker tags - code: #{response.code}, response: '#{response.body}'")
|
169
|
-
return
|
188
|
+
return nil
|
170
189
|
end
|
171
190
|
|
172
|
-
|
173
|
-
|
191
|
+
response = JSON.parse(response.body, symbolize_names: true)
|
192
|
+
matching_tags = response
|
174
193
|
.fetch(:results)
|
175
194
|
.map { |tag| tag[:name] }
|
176
195
|
.grep(VERSION_PATTERN)
|
196
|
+
more_data = response.fetch(:next)
|
197
|
+
|
198
|
+
[matching_tags, more_data]
|
177
199
|
end
|
178
200
|
end
|
179
201
|
end
|
data/lib/gitlab/qa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.1
|
4
|
+
version: 12.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab Quality
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|