gitlab-qa 15.6.0 → 15.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b800bf0843ad8f6c636de6f83713ed9c6c631d90d4140ce14670e88af7228be9
4
- data.tar.gz: 90b75c71cd03df92f810505e5f1c920845f482d508aff47fdd9a40041cfe9521
3
+ metadata.gz: 283e2b2d77e4f2a18d03c454e268b88d4bcaba6662086efe37f2045fd5a2efca
4
+ data.tar.gz: a7ca80f1ba2e9244c7b6046d47e5b154278fe062774583e8874f1da6956890e7
5
5
  SHA512:
6
- metadata.gz: 6b73f4e3a80917e77422b1a49ce6e2c2ea6525d9c5bc6ceac42495e781baa555ba2b96b2f22bee9bef7eeaa5def8053758ae71ee762bba046674a75015e2d06e
7
- data.tar.gz: ef66c9ed5786f1cc3bc2d31b6b75929c94a3737ed1af492b5d73992c2f0fa63f08d5726da3c69ba6485f8892c7e8b0b0c9d61ceedbdf655b30a4fc3fafcd56f1
6
+ metadata.gz: 77c08d80779857be0baf10a0e1690d8c96e6c107a467f7005ec1f4714ffda321e54a1bab4713a79e52570d9403e8bde33ba7b9b74c135d009a2df590cc904322
7
+ data.tar.gz: b70bc89223d607c828ecacc91b3d433f9a38a420929ca95a97d0a6574618c921e457ca58164353b30574e3a6eb7165cc3a4a6623e45d6672ef178b0a0bc795e6
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (15.6.0)
5
- activesupport (>= 6.1, < 7.2)
4
+ gitlab-qa (15.7.1)
5
+ activesupport (>= 6.1, < 8)
6
6
  ffi (~> 1.17)
7
7
  gitlab (~> 4.19)
8
8
  http (~> 5.0)
@@ -15,23 +15,24 @@ PATH
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- activesupport (7.1.2)
18
+ activesupport (7.2.1.2)
19
19
  base64
20
20
  bigdecimal
21
- concurrent-ruby (~> 1.0, >= 1.0.2)
21
+ concurrent-ruby (~> 1.0, >= 1.3.1)
22
22
  connection_pool (>= 2.2.5)
23
23
  drb
24
24
  i18n (>= 1.6, < 2)
25
+ logger (>= 1.4.2)
25
26
  minitest (>= 5.1)
26
- mutex_m
27
- tzinfo (~> 2.0)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
28
29
  addressable (2.8.1)
29
30
  public_suffix (>= 2.0.2, < 6.0)
30
31
  ast (2.4.2)
31
32
  backport (1.2.0)
32
- base64 (0.2.0)
33
+ base64 (0.3.0)
33
34
  benchmark (0.2.0)
34
- bigdecimal (3.1.5)
35
+ bigdecimal (3.3.1)
35
36
  byebug (11.1.3)
36
37
  claide (1.1.0)
37
38
  claide-plugins (0.9.2)
@@ -41,8 +42,8 @@ GEM
41
42
  climate_control (1.0.1)
42
43
  coderay (1.1.3)
43
44
  colored2 (3.1.2)
44
- concurrent-ruby (1.2.2)
45
- connection_pool (2.4.1)
45
+ concurrent-ruby (1.3.5)
46
+ connection_pool (2.5.4)
46
47
  cork (0.3.0)
47
48
  colored2 (~> 3.1)
48
49
  crack (0.4.5)
@@ -67,8 +68,7 @@ GEM
67
68
  docile (1.4.0)
68
69
  domain_name (0.5.20190701)
69
70
  unf (>= 0.0.5, < 1.0.0)
70
- drb (2.2.0)
71
- ruby2_keywords
71
+ drb (2.2.3)
72
72
  e2mmap (0.1.0)
73
73
  faraday (1.10.2)
74
74
  faraday-em_http (~> 1.0)
@@ -126,7 +126,7 @@ GEM
126
126
  httparty (0.20.0)
127
127
  mime-types (~> 3.0)
128
128
  multi_xml (>= 0.5.2)
129
- i18n (1.14.1)
129
+ i18n (1.14.7)
130
130
  concurrent-ruby (~> 1.0)
131
131
  jaro_winkler (1.5.6)
132
132
  json (2.6.3)
@@ -138,15 +138,15 @@ GEM
138
138
  llhttp-ffi (0.4.0)
139
139
  ffi-compiler (~> 1.0)
140
140
  rake (~> 13.0)
141
+ logger (1.7.0)
141
142
  method_source (1.0.0)
142
143
  mime-types (3.4.1)
143
144
  mime-types-data (~> 3.2015)
144
145
  mime-types-data (3.2022.0105)
145
146
  mini_portile2 (2.8.0)
146
- minitest (5.21.1)
147
+ minitest (5.26.1)
147
148
  multi_xml (0.6.0)
148
149
  multipart-post (2.2.3)
149
- mutex_m (0.2.0)
150
150
  nap (1.1.0)
151
151
  no_proxy_fix (0.1.2)
152
152
  nokogiri (1.13.9)
@@ -223,6 +223,7 @@ GEM
223
223
  sawyer (0.9.2)
224
224
  addressable (>= 2.3.5)
225
225
  faraday (>= 0.17.3, < 3)
226
+ securerandom (0.4.1)
226
227
  simplecov (0.22.0)
227
228
  docile (~> 1.1)
228
229
  simplecov-html (~> 0.11)
data/gitlab-qa.gemspec CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'timecop', '~> 0.9.5'
37
37
  spec.add_development_dependency 'webmock', '3.7.0'
38
38
 
39
- spec.add_runtime_dependency 'activesupport', '>= 6.1', '< 7.2'
39
+ spec.add_runtime_dependency 'activesupport', '>= 6.1', '< 8'
40
40
  spec.add_runtime_dependency 'ffi', '~> 1.17'
41
41
  spec.add_runtime_dependency 'gitlab', '~> 4.19'
42
42
  spec.add_runtime_dependency 'http', '~> 5.0'
@@ -46,6 +46,7 @@ module Gitlab
46
46
  'CI_PROJECT_DIR' => :ci_project_dir,
47
47
  'CI_RUNNER_ID' => :ci_runner_id,
48
48
  'CI_SERVER_HOST' => :ci_server_host,
49
+ 'CI_SERVER_URL' => :ci_server_url,
49
50
  'CI_SERVER_PERSONAL_ACCESS_TOKEN' => :ci_server_personal_access_token,
50
51
  'COLORIZED_LOGS' => :colorized_logs,
51
52
  'CLOUDSDK_CORE_PROJECT' => :cloudsdk_core_project,
@@ -24,6 +24,15 @@ module Gitlab
24
24
  # @param [String] semver_component version number component for previous version detection - major|minor|patch
25
25
  # @return [Gem::Version]
26
26
  def previous_version(semver_component)
27
+ # Check for environment variable override
28
+ override_key = "QA_PREVIOUS_#{semver_component.upcase}_OVERRIDE"
29
+ override_value = ENV.fetch(override_key, nil)
30
+
31
+ if override_value && !override_value.empty?
32
+ logger.info("Using override for previous #{semver_component}: #{override_value}")
33
+ return Gem::Version.new(override_value)
34
+ end
35
+
27
36
  case semver_component
28
37
  when "major"
29
38
  previous_major
@@ -60,7 +69,10 @@ module Gitlab
60
69
  # check if version is already a patch version
61
70
  return version if version.to_s.split('.').size == 3
62
71
 
63
- versions.find { |ver| ver.to_s.match?(/^#{version}\./) }.tap do |ver|
72
+ result = versions.find { |ver| ver.to_s.match?(/^#{version}\./) }
73
+ result ||= handle_latest_patch_prerelease_fallback(version) if current_version.include?('-pre')
74
+
75
+ result.tap do |ver|
64
76
  raise_version_not_found("Latest patch version for version #{version}") unless ver
65
77
  end
66
78
  end
@@ -88,6 +100,49 @@ module Gitlab
88
100
 
89
101
  private
90
102
 
103
+ def handle_latest_patch_prerelease_fallback(version)
104
+ return unless version.to_s.match?(/^\d+$/)
105
+
106
+ log_fallback_info("major", version.to_s)
107
+
108
+ fallback_major = version.segments[0] - 1
109
+ return unless fallback_major.positive?
110
+
111
+ result = versions.find { |ver| ver.to_s.match?(/^#{fallback_major}\./) }
112
+ logger.warn("🔄 Using fallback major version: #{result}") if result
113
+ result
114
+ end
115
+
116
+ def find_previous_minor_version
117
+ target_minor = current_minor - 1
118
+ result = versions.find { |version| version.to_s.match?(/^#{current_major}\.#{target_minor}/) }
119
+
120
+ return result if result
121
+ return unless current_version.include?('-pre')
122
+
123
+ find_previous_minor_prerelease_fallback(target_minor)
124
+ end
125
+
126
+ def find_previous_minor_prerelease_fallback(target_minor)
127
+ log_fallback_info("minor", "#{current_major}.#{target_minor}")
128
+
129
+ result = find_fallback_minor_version(target_minor)
130
+ return result if result
131
+
132
+ result = previous_major
133
+ logger.warn("🔄 Falling back to previous major version: #{result}") if result
134
+ result
135
+ end
136
+
137
+ def find_fallback_minor_version(target_minor)
138
+ fallback_minor_version = target_minor - 1
139
+ return unless fallback_minor_version >= 0
140
+
141
+ result = versions.find { |version| version.to_s.match?(/^#{current_major}\.#{fallback_minor_version}/) }
142
+ logger.warn("🔄 Using fallback minor version: #{result}") if result
143
+ result
144
+ end
145
+
91
146
  MAX_TAGS_HTTP_REQUESTS = 50
92
147
  # https://docs.docker.com/docker-hub/api/latest/#tag/images/operation/GetNamespacesRepositoriesImages
93
148
  TAGS_PER_PAGE = 100
@@ -138,7 +193,8 @@ module Gitlab
138
193
  return fallback_minor unless tags
139
194
  return previous_major if current_minor.zero?
140
195
 
141
- versions.find { |version| version.to_s.match?(/^#{current_major}\.#{current_minor - 1}/) }.tap do |ver|
196
+ result = find_previous_minor_version
197
+ result.tap do |ver|
142
198
  raise_version_not_found("Previous minor version for current version #{current_version}") unless ver
143
199
  end
144
200
  end
@@ -242,7 +298,105 @@ module Gitlab
242
298
  end
243
299
 
244
300
  def raise_version_not_found(error_prefix)
245
- raise(VersionNotFoundError, "#{error_prefix} not available on Dockerhub (yet)")
301
+ error_message = build_detailed_error_message(error_prefix)
302
+ raise(VersionNotFoundError, error_message)
303
+ end
304
+
305
+ # Build a detailed, helpful error message for version not found scenarios
306
+ def build_detailed_error_message(error_prefix)
307
+ separator = "=" * 80
308
+
309
+ message = <<~ERROR
310
+
311
+ #{separator}
312
+ 🚨 GITLAB QA VERSION DETECTION ERROR 🚨
313
+ #{separator}
314
+
315
+ #{error_prefix} not available on Dockerhub (yet)
316
+
317
+ CONTEXT:
318
+ • Current version: #{current_version}
319
+ • Looking for: #{describe_missing_version}
320
+ • This typically happens during GitLab's monthly release cycle
321
+
322
+ WHY THIS HAPPENS:
323
+ During the 1-day window between VERSION file updates and actual release:
324
+ 1. VERSION file gets updated to next version (e.g., 18.9.0-pre)
325
+ 2. Upgrade tests look for previous version (e.g., 18.8.x)
326
+ 3. But that version hasn't been released to Docker Hub yet
327
+
328
+ SOLUTIONS:
329
+ 1. WAIT: This will resolve automatically after the release (usually within 24 hours)
330
+ 2. OVERRIDE: Set environment variable to use a known version:
331
+ #{suggest_override_variable}
332
+ 3. SKIP: Temporarily disable these upgrade tests during pre-release periods
333
+ 4. VERIFY: Check available versions on Docker Hub:
334
+ https://hub.docker.com/r/gitlab/gitlab-#{edition}/tags
335
+
336
+ MORE INFO:
337
+ • Documentation: https://docs.gitlab.com/ee/development/testing_guide/end_to_end/
338
+ • Release schedule: https://about.gitlab.com/releases/
339
+ • Report issues: https://gitlab.com/gitlab-org/gitlab-qa/-/issues
340
+
341
+ #{separator}
342
+ ERROR
343
+
344
+ message.strip
345
+ end
346
+
347
+ # Describe what version we're looking for based on current context
348
+ def describe_missing_version
349
+ if current_version.include?('-pre')
350
+ if current_minor.positive?
351
+ "#{current_major}.#{current_minor - 1}.x versions (previous minor)"
352
+ else
353
+ "#{current_major - 1}.x.x versions (previous major)"
354
+ end
355
+ else
356
+ "Previous version for #{current_version}"
357
+ end
358
+ end
359
+
360
+ # Suggest appropriate override environment variable
361
+ def suggest_override_variable
362
+ if current_version.include?('-pre')
363
+ if current_minor.positive?
364
+ suggested_version = "#{current_major}.#{current_minor - 1}.0"
365
+ "export QA_PREVIOUS_MINOR_OVERRIDE=#{suggested_version}"
366
+ else
367
+ suggested_version = "#{current_major - 1}.12.0"
368
+ "export QA_PREVIOUS_MAJOR_OVERRIDE=#{suggested_version}"
369
+ end
370
+ else
371
+ "export QA_PREVIOUS_MINOR_OVERRIDE=<version>"
372
+ end
373
+ end
374
+
375
+ # Log helpful information when using fallback logic
376
+ def log_fallback_info(upgrade_type, missing_version)
377
+ separator = "-" * 60
378
+
379
+ logger.warn(<<~WARNING.strip)
380
+ #{separator}
381
+ 🚨 PRE-RELEASE VERSION FALLBACK ACTIVATED
382
+ #{separator}
383
+
384
+ Target #{upgrade_type} version #{missing_version} not found for pre-release #{current_version}
385
+
386
+ This is NORMAL during GitLab's monthly release cycle!
387
+
388
+ • Reason: #{missing_version} hasn't been released to Docker Hub yet
389
+ • Action: Falling back to older available version
390
+ • Impact: Tests will run against older version (still valid)
391
+
392
+ To override this behavior, set:
393
+ #{suggest_override_variable}
394
+
395
+ Or check available versions:
396
+ https://hub.docker.com/r/gitlab/gitlab-#{edition}/tags
397
+
398
+ #{separator}
399
+ WARNING
246
400
  end
247
401
  end
248
402
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '15.6.0'
5
+ VERSION = '15.7.1'
6
6
  end
7
7
  end
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: 15.6.0
4
+ version: 15.7.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: 2025-10-28 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -201,7 +201,7 @@ dependencies:
201
201
  version: '6.1'
202
202
  - - "<"
203
203
  - !ruby/object:Gem::Version
204
- version: '7.2'
204
+ version: '8'
205
205
  type: :runtime
206
206
  prerelease: false
207
207
  version_requirements: !ruby/object:Gem::Requirement
@@ -211,7 +211,7 @@ dependencies:
211
211
  version: '6.1'
212
212
  - - "<"
213
213
  - !ruby/object:Gem::Version
214
- version: '7.2'
214
+ version: '8'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: ffi
217
217
  requirement: !ruby/object:Gem::Requirement