gitlab-qa 7.31.0 → 7.34.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: 950731b29895b80ed3a174ade472d58c7496fc60620959224790f007a0beff79
4
- data.tar.gz: 66d92f34024e8c9a4b679424c0f1994713ac7180eadd875f732d8c4d8f741a9b
3
+ metadata.gz: 917c47b2fbead3c77db3cd6c441995a8324ed73735262542dcd94de854022a35
4
+ data.tar.gz: 7785db11c9eb0f1f7ff2ecf32b16b8fd95ad9bab9391711f2d0af05a7e903153
5
5
  SHA512:
6
- metadata.gz: fab55c1cfbcaa92e9b24156a61d1314e28565be51c1d0e06387445554f25dd1f170f192d2784a2d1bd40d7ff28de484ceba9830bcb16dd1d792a11c2253171c8
7
- data.tar.gz: 663d5d28fa646a0b19ac84b292b61879b8ebc238657d99928d10ffee995dfc12dd56419cfbdd5cf1b9384c665dc6e54cedde4136c2b32fd4810982821f2cd4af
6
+ metadata.gz: c509e252f4bd1e7d405d517920e306e2cdf5233cd73a5fbf25a878cbb863a7c21e5fedb007c8ef461f7e34e1899b27ff989d92182c427575a125f4c99a39de9d
7
+ data.tar.gz: 9011ddab65c7c0218ed49a5cbd2cdaa26f2b2ce013eb005d9ba63ee067ce18306bf8475861156ca52d7e2272cc9c94588ac86016e90e7901ecdac94d4e2f6cbf
@@ -71,7 +71,6 @@ variables:
71
71
  DOCKER_DRIVER: overlay2
72
72
  DOCKER_HOST: tcp://docker:2375
73
73
  COLORIZED_LOGS: "true"
74
- QA_DEBUG: "false"
75
74
  QA_CAN_TEST_GIT_PROTOCOL_V2: "true"
76
75
  QA_CAN_TEST_PRAEFECT: "false"
77
76
  QA_GENERATE_ALLURE_REPORT: "true"
@@ -11,7 +11,7 @@ ee:cloud-activation:
11
11
  - .combined-gitlab-qa-options-script
12
12
  variables:
13
13
  QA_RSPEC_TAGS: "--tag cloud_activation"
14
- GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --no-admin-token --seed-db license*.rb"
14
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --seed-db license*.rb"
15
15
 
16
16
  ee:cloud-activation-quarantine:
17
17
  before_script:
@@ -27,4 +27,4 @@ ee:cloud-activation-quarantine:
27
27
  - .combined-gitlab-qa-options-script
28
28
  variables:
29
29
  QA_RSPEC_TAGS: "--tag cloud_activation"
30
- GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --no-admin-token --seed-db license*.rb"
30
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --seed-db license*.rb"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (7.31.0)
4
+ gitlab-qa (7.34.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -68,7 +68,8 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
68
68
  | `QA_PRAEFECT_REPOSITORY_STORAGE` |- | The name of repository storage using Praefect. Note: Admin access is required to change repository storage. | No|
69
69
  | `QA_COOKIES` |- | Optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true". | No|
70
70
  | `QA_DEBUG` |- | Set to `true` to verbosely log page object actions. Note: if enabled be aware that sensitive data might be logged. If an input element has a QA selector with `password` in the name, data entered into the input element will be masked. If the element doesn't have `password` in its name it won't be masked. | No|
71
- | `QA_LOG_PATH` |- | Path to output debug logging to. By default `QA_ARTIFACTS_DIR` is used | No|
71
+ | `QA_LOG_LEVEL` | `info` | Logging level to use for gitlab-qa output and qa tests output | No|
72
+ | `QA_LOG_PATH` | `QA_ARTIFACTS_DIR` | Path to output debug logging to. | No|
72
73
  | `QA_CAN_TEST_GIT_PROTOCOL_V2` | `true` | Set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it. | No|
73
74
  | `QA_CAN_TEST_ADMIN_FEATURES` | `true` | Set to `false` to skip tests that require admin access. | No|
74
75
  | `QA_CAN_TEST_PRAEFECT` | `true` | Set to `false` to skip tests that require Praefect to be running. | No|
@@ -115,7 +115,7 @@ module Gitlab
115
115
  end
116
116
 
117
117
  exception['message'].gsub!(/(private_token=)[\w-]+/, '********')
118
- exception['message_lines'].each { |line| line.gsub!(/(private_token=)([\w-]+)/, '********') }
118
+ Array(exception['message_lines']).each { |line| line.gsub!(/(private_token=)([\w-]+)/, '********') }
119
119
 
120
120
  {
121
121
  'message' => "#{exception['class']}: #{exception['message']}",
@@ -16,7 +16,7 @@ module Gitlab
16
16
  log_path = Env.log_path
17
17
  ::FileUtils.mkdir_p(log_path) unless File.exist?(log_path)
18
18
 
19
- TestLogger.logger(level: Env.debug? ? "DEBUG" : Env.log_level, path: log_path)
19
+ TestLogger.logger(level: Env.log_level, path: log_path)
20
20
  end
21
21
  end
22
22
  end
@@ -20,28 +20,14 @@ module Gitlab
20
20
  end
21
21
 
22
22
  def perform(release, *rspec_args)
23
- gitaly_primary_node = gitaly(@primary_node_name, release)
24
- gitaly_secondary_node = gitaly(@secondary_node_name, release)
25
- gitaly_tertiary_node = gitaly(@tertiary_node_name, release)
26
-
27
- sql_node = Component::PostgreSQL.new.tap do |sql|
28
- sql.name = @database
29
- sql.network = @network
30
- sql.instance(skip_teardown: true) do
31
- sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"'
32
- end
33
- end
34
-
35
- praefect_node = Component::Gitlab.new.tap do |praefect|
36
- praefect.release = QA::Release.new(release)
37
- praefect.name = @praefect_node_name
38
- praefect.network = @network
39
- praefect.skip_availability_check = true
40
- praefect.seed_admin_token = false
41
-
42
- praefect.omnibus_configuration << praefect_omnibus_configuration
43
-
44
- praefect.instance(skip_teardown: true)
23
+ # The postgres container starts in seconds so not essential to parallelize it
24
+ # This also ensure that the docker network is created here, avoiding any potential race conditions later
25
+ # if the gitaly-cluster and GitLab containers attempt to create a network in parallel
26
+ @sql_node = postgres
27
+
28
+ gitaly_cluster = Thread.new do
29
+ Thread.current.abort_on_exception = true
30
+ start_gitaly_cluster(release)
45
31
  end
46
32
 
47
33
  Component::Gitlab.perform do |gitlab|
@@ -51,6 +37,8 @@ module Gitlab
51
37
 
52
38
  gitlab.omnibus_configuration << gitlab_omnibus_configuration
53
39
  gitlab.instance do
40
+ # Wait for gitaly cluster to finish booting, before attempting to run specs
41
+ gitaly_cluster.join
54
42
  Runtime::Logger.info('Running Gitaly Cluster specs!')
55
43
 
56
44
  if @tag
@@ -68,15 +56,25 @@ module Gitlab
68
56
  end
69
57
  end
70
58
  ensure
71
- praefect_node&.teardown
72
- sql_node&.teardown
73
- gitaly_primary_node&.teardown
74
- gitaly_secondary_node&.teardown
75
- gitaly_tertiary_node&.teardown
59
+ @praefect_node&.teardown
60
+ @sql_node&.teardown
61
+ @gitaly_primary_node&.teardown
62
+ @gitaly_secondary_node&.teardown
63
+ @gitaly_tertiary_node&.teardown
76
64
  end
77
65
 
78
66
  private
79
67
 
68
+ def start_gitaly_cluster(release)
69
+ Runtime::Logger.info("Starting Gitaly Cluster")
70
+ @gitaly_primary_node = gitaly(@primary_node_name, release)
71
+ @gitaly_secondary_node = gitaly(@secondary_node_name, release)
72
+ @gitaly_tertiary_node = gitaly(@tertiary_node_name, release)
73
+
74
+ @praefect_node = praefect(@praefect_node_name, release)
75
+ Runtime::Logger.info("Gitaly Cluster Ready")
76
+ end
77
+
80
78
  def disable_other_services
81
79
  <<~OMNIBUS
82
80
  postgresql['enable'] = false;
@@ -191,6 +189,30 @@ module Gitlab
191
189
  OMNIBUS
192
190
  end
193
191
 
192
+ def praefect(name, release)
193
+ Component::Gitlab.new.tap do |praefect|
194
+ praefect.release = QA::Release.new(release)
195
+ praefect.name = name
196
+ praefect.network = @network
197
+ praefect.skip_availability_check = true
198
+ praefect.seed_admin_token = false
199
+
200
+ praefect.omnibus_configuration << praefect_omnibus_configuration
201
+
202
+ praefect.instance(skip_teardown: true)
203
+ end
204
+ end
205
+
206
+ def postgres
207
+ Component::PostgreSQL.new.tap do |sql|
208
+ sql.name = @database
209
+ sql.network = @network
210
+ sql.instance(skip_teardown: true) do
211
+ sql.run_psql '-d template1 -c "CREATE DATABASE praefect_production OWNER postgres"'
212
+ end
213
+ end
214
+ end
215
+
194
216
  def gitaly(name, release)
195
217
  Component::Gitlab.new.tap do |gitaly|
196
218
  gitaly.release = QA::Release.new(release)
@@ -68,12 +68,13 @@ module Gitlab
68
68
 
69
69
  # Log message prefix
70
70
  #
71
+ # @note when outputted, the date will be formatted as "Jun 07 2022 11:30:00 UTC"
71
72
  # @param [DateTime] date
72
73
  # @param [String] source
73
74
  # @param [String] severity
74
75
  # @return [String]
75
76
  def message_prefix(date, source, severity)
76
- "[date=#{date} from=#{source}] #{severity.ljust(5)} -- "
77
+ "[#{date.strftime('%h %d %Y %H:%M:%S %Z')} (#{source})] #{severity.ljust(5)} -- "
77
78
  end
78
79
  end
79
80
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.31.0'
5
+ VERSION = '7.34.0'
6
6
  end
7
7
  end
@@ -51,6 +51,7 @@ class LicenseUsageSeed
51
51
  roles = Gitlab::Access.values
52
52
 
53
53
  GroupMember.create(user_id: user.id, access_level: roles.sample, source_id: group_id)
54
+ Users::UpdateHighestMemberRoleService.new(user).execute
54
55
  end
55
56
 
56
57
  def self.seed_users
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: 7.31.0
4
+ version: 7.34.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: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control