gitlab-qa 14.17.0 → 14.18.0

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: 9a30b8f1d5f38d5c3b4a48d7b1395387b4cc854e5e2ec579d3591777b7131c84
4
- data.tar.gz: 9da397c19c29ea43b5fce2b8ad441d09dbd203adfcb122aa7ac75cc707f65245
3
+ metadata.gz: 2aca04edea5cc1cf803513ed9d4bab1ed4d73ce2126e244e1d166ddce1c8cf1c
4
+ data.tar.gz: 5e5a38423e70530828c6a86a368c6825d5247808d799fcf38c195992d1a25bb7
5
5
  SHA512:
6
- metadata.gz: 1eba615ae509dc1425e85375e726604a160c05edd7c69e0bbe86d65ad7a638fdc8f062633463b442e77e6d11b4693d5c6e2738a97385b168108be1c18ac1187c
7
- data.tar.gz: 3c4a0c7c9375199ff84c86c8d2d8a2d9b8eaf93094708ea7be80ad53f98a3ee8a46807364d13ad0a7b57c45f0e06d85087b23915d78549b4baf21f5a4a810044
6
+ metadata.gz: 87668dd869f1100e6a78df1273934026960903a5de2fd36c53c54be61783a61cdc798d0baa908e82d5e9b6dcf9100e147fdf3d1343afe476b2c9e042f74b7d57
7
+ data.tar.gz: e47a1c57792a1f697eec41709ffdaef17c27284b9b3c918648d850dee3d968c63783b5e3c1cd87e1b15c832c6df92a2d32f0e2f796db14fd36f03a59e369fd57
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.17.0)
4
+ gitlab-qa (14.18.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -26,8 +26,31 @@ module Gitlab
26
26
  #
27
27
  # @return [Array<QA::Release>]
28
28
  def fetch
29
- return [release(latest_patch(previous_version))] unless major_upgrade?
29
+ return minor_upgrade_path unless major_upgrade?
30
30
 
31
+ major_upgrade_path
32
+ rescue GitlabVersionInfo::VersionNotFoundError
33
+ logger.error("Failed to construct gitlab upgrade path")
34
+ raise
35
+ end
36
+
37
+ private
38
+
39
+ delegate :latest_patch, to: :version_info
40
+
41
+ attr_reader :version_info, :current_version, :semver_component, :edition, :logger
42
+
43
+ # Upgrade path from previous minor version
44
+ #
45
+ # @return [Array]
46
+ def minor_upgrade_path
47
+ [release(latest_patch(previous_version))]
48
+ end
49
+
50
+ # Upgrade path from previous major version
51
+ #
52
+ # @return [Array]
53
+ def major_upgrade_path
31
54
  # get versions between previous major and current version in gitlab upgrade path
32
55
  path = full_upgrade_path.each_with_object([]) do |ver, arr|
33
56
  next if ver <= previous_version || ver >= current_version
@@ -40,12 +63,6 @@ module Gitlab
40
63
  end
41
64
  end
42
65
 
43
- private
44
-
45
- delegate :latest_patch, to: :version_info
46
-
47
- attr_reader :version_info, :current_version, :semver_component, :edition, :logger
48
-
49
66
  # Upgrade from previous major
50
67
  #
51
68
  # @return [Boolean]
@@ -48,7 +48,9 @@ module Gitlab
48
48
  # check if version is already a patch version
49
49
  return version if version.to_s.split('.').size == 3
50
50
 
51
- versions.find { |ver| ver.to_s.match?(/^#{version}\./) }
51
+ versions.find { |ver| ver.to_s.match?(/^#{version}\./) }.tap do |ver|
52
+ raise_version_not_found("Latest patch version for version #{version}") unless ver
53
+ end
52
54
  end
53
55
 
54
56
  private
@@ -103,8 +105,9 @@ module Gitlab
103
105
  return fallback_minor unless tags
104
106
  return previous_major if current_minor.zero?
105
107
 
106
- versions.find { |version| version.to_s.match?(/^#{current_major}\.#{current_minor - 1}/) } ||
107
- raise(VersionNotFoundError, "Previous minor version for current version #{current_version} not available on Dockerhub (yet)")
108
+ versions.find { |version| version.to_s.match?(/^#{current_major}\.#{current_minor - 1}/) }.tap do |ver|
109
+ raise_version_not_found("Previous minor version for current version #{current_version}") unless ver
110
+ end
108
111
  end
109
112
 
110
113
  # Previous first minor version
@@ -204,6 +207,10 @@ module Gitlab
204
207
 
205
208
  [matching_tags, more_data]
206
209
  end
210
+
211
+ def raise_version_not_found(error_prefix)
212
+ raise(VersionNotFoundError, "#{error_prefix} not available on Dockerhub (yet)")
213
+ end
207
214
  end
208
215
  end
209
216
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.17.0'
5
+ VERSION = '14.18.0'
6
6
  end
7
7
  end
@@ -9,6 +9,11 @@ class GitlabDuoSetup
9
9
 
10
10
  return unless enabled?('HAS_ADD_ON')
11
11
 
12
+ # The seat links endpoint in CustomersDot is rate limited and can sometimes
13
+ # prevent the service access token from being generated during license activation
14
+ # This generates the token directly, similar to the sync_service_token_worker cron job
15
+ generate_service_access_token
16
+
12
17
  # Due to the various async Sidekiq processes involved, we wait to verify
13
18
  # that the service access token has been generated before proceeding
14
19
  verify_service_access_token
@@ -31,6 +36,12 @@ class GitlabDuoSetup
31
36
  end
32
37
  end
33
38
 
39
+ def generate_service_access_token
40
+ puts 'Generating service access token...'
41
+
42
+ ::CloudConnector::SyncServiceTokenWorker.perform_async(license_id: License.current.id)
43
+ end
44
+
34
45
  def token_count
35
46
  ::CloudConnector::ServiceAccessToken.active.count
36
47
  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: 14.17.0
4
+ version: 14.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-10 00:00:00.000000000 Z
11
+ date: 2024-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control