gitlab-qa 14.17.0 → 14.18.0
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/support/gitlab_upgrade_path.rb +24 -7
- data/lib/gitlab/qa/support/gitlab_version_info.rb +10 -3
- data/lib/gitlab/qa/version.rb +1 -1
- data/support/setup/gitlab_duo_setup.rb +11 -0
- 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: 2aca04edea5cc1cf803513ed9d4bab1ed4d73ce2126e244e1d166ddce1c8cf1c
|
4
|
+
data.tar.gz: 5e5a38423e70530828c6a86a368c6825d5247808d799fcf38c195992d1a25bb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87668dd869f1100e6a78df1273934026960903a5de2fd36c53c54be61783a61cdc798d0baa908e82d5e9b6dcf9100e147fdf3d1343afe476b2c9e042f74b7d57
|
7
|
+
data.tar.gz: e47a1c57792a1f697eec41709ffdaef17c27284b9b3c918648d850dee3d968c63783b5e3c1cd87e1b15c832c6df92a2d32f0e2f796db14fd36f03a59e369fd57
|
data/Gemfile.lock
CHANGED
@@ -26,8 +26,31 @@ module Gitlab
|
|
26
26
|
#
|
27
27
|
# @return [Array<QA::Release>]
|
28
28
|
def fetch
|
29
|
-
return
|
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
|
-
|
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
|
data/lib/gitlab/qa/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2024-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|