gitlab-qa 14.1.0 → 14.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acdd50bfdfe882c975ccd807c9215a3b3e598e15427a05046a0775940b5a7246
4
- data.tar.gz: f1b20ae89321a207ff4d53c00f1207344236e610eecfd30a65498ea714e672d1
3
+ metadata.gz: 8ff023809865275353e982f054758e26847e64a9e1f710a73700c87c16d43129
4
+ data.tar.gz: dd0797b89d5b161161890fb5f0648c960e4e5f15209a8dabffe57bcf982c95eb
5
5
  SHA512:
6
- metadata.gz: 2035dd020578666e40deb9cbfb0296f63599dcd3bd5187ccc8a8a72b9c73fbaa4649e9b9de31166393749bab2441fa2b4dd6980363892c612dad3ed2d99ce7b5
7
- data.tar.gz: 56b89359923d019df2f2383fe4629105311d5ee9c9030827cc61f89dad20502ef1897a9e7fc03ac93b03c935e33122a25a3ba8d482bf56eac2182c3be5229f82
6
+ metadata.gz: 810852861df35f09e0faccbca9d5ce89d78439a94d57a5bb53709f2efbac07b45ea75be8a1c9edf1fc2a552a539e81932d31016f62af042b68d3eb2552aa466b
7
+ data.tar.gz: 4b08122b7343ba7a62893cb88e8b1166476cc148af4a2b86b0168fcfbdf1cfb1dab493965ac11142768b9298c7b5a516b86f6d609f1785469f63cc6f23ed120e
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.0)
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
@@ -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.0'
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.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-02-07 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control