gitlab-qa 14.1.0 → 14.2.1

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: acdd50bfdfe882c975ccd807c9215a3b3e598e15427a05046a0775940b5a7246
4
- data.tar.gz: f1b20ae89321a207ff4d53c00f1207344236e610eecfd30a65498ea714e672d1
3
+ metadata.gz: 4fbdad805d2a329e5680370ec5873a1d6eab6c63a86e699dd27c0f1f87acbda0
4
+ data.tar.gz: 6a7ef31aca034df274e9acc8e0e5fd333d17b7d16bd8d5a2f4d19d2d32d46cd6
5
5
  SHA512:
6
- metadata.gz: 2035dd020578666e40deb9cbfb0296f63599dcd3bd5187ccc8a8a72b9c73fbaa4649e9b9de31166393749bab2441fa2b4dd6980363892c612dad3ed2d99ce7b5
7
- data.tar.gz: 56b89359923d019df2f2383fe4629105311d5ee9c9030827cc61f89dad20502ef1897a9e7fc03ac93b03c935e33122a25a3ba8d482bf56eac2182c3be5229f82
6
+ metadata.gz: 9815bfe1067fdc4e39b0b620582ed935dc87a37335652397de7725175b2e39f270abc0d9e97c6177bdfa8fce74ad29a280cea160b6fe25dc788d306e1e733bff
7
+ data.tar.gz: 2eea71cf51311871291ccef7ae12a43b9a644f6200f36bd19ec7fc32876cfa58cc145e0e13b4847b3e7aa1a2a362ded548b140ecca6c1c3e9354842003a587e2
data/.gitignore CHANGED
@@ -14,3 +14,5 @@
14
14
  .tool-versions
15
15
  # ignore built gems
16
16
  *.gem
17
+ .vscode/task.json
18
+ .vscode/
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.1.0)
4
+ gitlab-qa (14.2.1)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -188,10 +188,39 @@ module Gitlab
188
188
  )
189
189
  end
190
190
 
191
+ # Path of the log file to write to
192
+ # @note
193
+ # if an error occurs during #reconfigure,
194
+ # "retry-{n}" is prefixed to the file name where {n} is retry number
195
+ # @return [String] the path to the log file
196
+ def log_file
197
+ retries = 0
198
+ log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-reconfigure-logs.txt"
199
+ while File.exist?(log_file)
200
+ break unless File.exist?(log_file)
201
+
202
+ retries += 1
203
+ log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-retry-#{retries}-reconfigure-logs.txt"
204
+ end
205
+
206
+ log_file
207
+ end
208
+
209
+ private :log_file
210
+
191
211
  def reconfigure
192
212
  setup_omnibus
193
-
213
+ log_file_path = log_file
214
+ config_file = File.open(log_file_path, "w")
194
215
  @docker.attach(name) do |line, _wait|
216
+ config_file.write(line, mode: 'a')
217
+
218
+ if line.include?('There was an error running gitlab-ctl reconfigure')
219
+ Runtime::Logger.error(
220
+ "Failure while running gitlab-ctl reconfigure command. Please check the #{log_file_path} in the artefact for more info"
221
+ )
222
+ end
223
+
195
224
  # TODO, workaround which allows to detach from the container
196
225
  break if line.include?('gitlab Reconfigured!')
197
226
  end
@@ -11,7 +11,7 @@ module Gitlab
11
11
  <<~OMNIBUS
12
12
  gitlab_rails['object_store']['enabled'] = true
13
13
  gitlab_rails['object_store']['proxy_download'] = false
14
- gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'region' => '#{Runtime::Env.aws_s3_region}', 'aws_access_key_id' => '#{Runtime::Env.aws_s3_key_id}', 'aws_secret_access_key' => '#{Runtime::Env.aws_s3_access_key}' }
14
+ gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'region' => '$AWS_S3_REGION', 'aws_access_key_id' => '$AWS_S3_KEY_ID', 'aws_secret_access_key' => '$AWS_S3_ACCESS_KEY' }
15
15
 
16
16
  gitlab_rails['object_store']['objects']['artifacts']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
17
17
  gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = '#{Runtime::Env.aws_s3_bucket_name}'
@@ -13,7 +13,7 @@ module Gitlab
13
13
  json_key = setup_json_key
14
14
 
15
15
  <<~OMNIBUS
16
- gitlab_rails['object_store']['connection'] = { 'provider' => 'Google', 'google_project' => '#{Runtime::Env.google_project}', 'google_client_email' => '#{Runtime::Env.google_client_email}', 'google_json_key_location' => '#{json_key.path}' }
16
+ gitlab_rails['object_store']['connection'] = { 'provider' => 'Google', 'google_project' => '$GOOGLE_PROJECT', 'google_client_email' => '$GOOGLE_CLIENT_EMAIL', 'google_json_key_location' => '#{json_key.path}' }
17
17
 
18
18
  gitlab_rails['object_store']['objects']['artifacts']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
19
19
  gitlab_rails['object_store']['objects']['external_diffs']['bucket'] = '#{Runtime::Env.gcs_bucket_name}'
@@ -9,7 +9,7 @@ module Gitlab
9
9
  Runtime::Env.require_aws_s3_environment!
10
10
 
11
11
  <<~OMNIBUS
12
- registry['storage'] = { 's3' => { 'accesskey' => '#{Runtime::Env.aws_s3_key_id}', 'secretkey' => '#{Runtime::Env.aws_s3_access_key}', 'bucket' => '#{Runtime::Env.aws_s3_bucket_name}', 'region' => '#{Runtime::Env.aws_s3_region}' } }
12
+ registry['storage'] = { 's3' => { 'accesskey' => '$AWS_S3_KEY_ID', 'secretkey' => '$AWS_S3_ACCESS_KEY', 'bucket' => '$AWS_S3_BUCKET_NAME', 'region' => '#{Runtime::Env.aws_s3_region}' } }
13
13
  OMNIBUS
14
14
  end
15
15
  end
@@ -53,12 +53,17 @@ module Gitlab
53
53
  def update(rspec_args)
54
54
  Docker::Volumes.new.with_temporary_volumes do |volumes|
55
55
  # deploy first release in upgrade path and run specs to populate db
56
+ Runtime::Logger.info("Running the first release in upgrade path: #{upgrade_path.first}")
56
57
  run_gitlab(upgrade_path.first, volumes, ["--", "--tag", "smoke"])
57
58
 
58
59
  # deploy releases in upgrade path
59
- upgrade_path[1..].each { |release| run_gitlab(release, volumes, skip_setup: true) }
60
+ upgrade_path[1..].each do |release|
61
+ Runtime::Logger.info("Upgrading GitLab to release: #{release}")
62
+ run_gitlab(release, volumes, skip_setup: true)
63
+ end
60
64
 
61
65
  # deploy current release and run tests
66
+ Runtime::Logger.info("Upgrading GitLab to current release: #{current_release}")
62
67
  run_gitlab(current_release, volumes, rspec_args, skip_setup: true)
63
68
  end
64
69
  end
@@ -94,7 +99,10 @@ module Gitlab
94
99
  # @param [Gitlab::QA::Release] release
95
100
  # @param [Array] rspec_args
96
101
  # @return [void]
97
- def run_specs(gitlab, release, rspec_args)
102
+ def run_specs(gitlab, release, rspec_args) # rubocop:disable Metrics/AbcSize
103
+ Runtime::Logger.info("Running smoke test to verify update and seed data in environment") unless upgrade_path.first != release
104
+ Runtime::Logger.info("Running smoke test to verify update") unless current_release != release
105
+
98
106
  Component::Specs.perform do |specs|
99
107
  specs.release = release
100
108
  specs.suite = 'Test::Instance::All'
@@ -105,7 +113,10 @@ module Gitlab
105
113
  specs.env = { 'QA_GENERATE_ALLURE_REPORT' => false } unless release == current_release
106
114
  end
107
115
  rescue Support::ShellCommand::StatusError => e
108
- raise e if release == current_release # only fail on current release
116
+ if release == current_release # only fail on current release
117
+ Runtime::Logger.error("Failed to run test suite after final upgrade to release '#{release}'")
118
+ raise e
119
+ end
109
120
 
110
121
  Runtime::Logger.warn("Test run for release '#{gitlab.release}' finished with errors!")
111
122
  end
@@ -68,7 +68,7 @@ module Gitlab
68
68
  #
69
69
  # @return [void]
70
70
  def fail!
71
- logger.error("Shell command output:\n#{string_output}") unless stream_output
71
+ logger.error("Shell command output:\n#{string_output}") unless @command.include?("docker attach") || stream_output
72
72
  raise StatusError, "Command `#{mask_secrets(command).truncate(100)}` failed! " + "✘".red
73
73
  end
74
74
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.1.0'
5
+ VERSION = '14.2.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: 14.1.0
4
+ version: 14.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: 2024-02-07 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control