gitlab-qa 14.3.0 → 14.5.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: bef7bd332a79ee7f62016c94ad14f6f681b8c957a9f1e862e772704b0dae9e87
4
- data.tar.gz: 752ee71edfbbe0f9132da6dd54b201f8772cc396cd90947f9b9c37e5f027fd91
3
+ metadata.gz: 7b273b35fb530099bd344db6ad9f21b56476f4e5b341677e74f22a52a4fcbcad
4
+ data.tar.gz: f2712bf79d9fbfa72c89c3fb9d63bce0e4e8b82a164d435be79af21f167d81b6
5
5
  SHA512:
6
- metadata.gz: b17db04aed34a0419361afbc7a5d3986da58be13bd2cf2c446b8442e3133eb18b56822ec9a0da686e599dc32c20c1d21545029eb75983aae6b1c956a82617c59
7
- data.tar.gz: e7e6d86cd7c781c6dd4f1ab70a50e3a601338a2362e8b5ad7d7200aa43845bc0217056753f92e47de765658cdb2d8f8a3f52628ae2c139060cfbfe4c697118c3
6
+ metadata.gz: ca2c75c3082c7b613e3ca3ef6f439b0873b23842d200643864cbdbb4f4d264002c8630c8f3879c28a47dbe512f7e3560e223218718faad177502104977fdb254
7
+ data.tar.gz: bb1aa0fd9f7f850d8b441fd56e0c1691d4cac6aaee03793fc6b4b944c945b9cfb6cf8f79b10811da2a2536262d70d9bd954fdbbf01c152f17e9b633d33c03d57
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.3.0)
4
+ gitlab-qa (14.5.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
data/lefthook.yml CHANGED
@@ -10,3 +10,17 @@
10
10
  files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
11
11
  glob: '*.{rb,rake}'
12
12
  run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
13
+
14
+ # Changelog git trailer for the first commit of the branch
15
+ changelog-on-first-commit:
16
+ run: |
17
+ git fetch origin master
18
+ first_commit_message=$(git log --format=%B -n 1 $(git log origin/master..HEAD --pretty=format:"%h" | tail -1))
19
+ if ! echo ${first_commit_message} | grep "Changelog:"; then
20
+ echo Could not find a Changelog: git trailer on the first commit for this branch.
21
+ echo
22
+ echo Please add a trailer by amending the git commit message.
23
+ echo
24
+ echo See https://docs.gitlab.com/ee/development/changelog.html#overview for more info.
25
+ exit 1
26
+ fi
@@ -198,19 +198,25 @@ module Gitlab
198
198
  wait_until_ready
199
199
  process_exec_commands
200
200
  rescue Support::ShellCommand::StatusError => e
201
+ reconfigure_log_file = get_reconfigure_log_file_from_artefact
201
202
  # for scenarios where a service fails during startup, attempt to retry to avoid flaky failures
202
203
  if (retries += 1) < 3
204
+ Runtime::Logger.info(
205
+ "Follow the document " \
206
+ "https://gitlab.com/gitlab-org/quality/runbooks/-/blob/main/debug_orchestrated_test_locally/ " \
207
+ "for debugging the test failure locally.")
208
+ Runtime::Logger.error("Tailing the reconfigure log file: #{reconfigure_log_file}. Please check #{reconfigure_log_file} " \
209
+ "file in the artifacts for more details.")
203
210
  Runtime::Logger.warn(
204
211
  "Retry instance_no_teardown due to Support::ShellCommand::StatusError -- attempt #{retries}"
205
212
  )
206
- Runtime::Logger.info(
207
- "Follow the document " \
208
- "https://gitlab.com/gitlab-org/quality/runbooks/-/blob/main/debug_orchestrated_test_locally/running_update-major_and_update-minor_locally.md " \
209
- "for debugging this issue locally.")
210
213
  teardown!
211
214
  retry
212
215
  end
213
216
 
217
+ # Tailing the reconfigure logs after retries are over and before raising exception
218
+ Runtime::Logger.info("Tail of the reconfigure log file, see artifacts for full log: #{reconfigure_log_file}")
219
+ Support::ShellCommand.new("tail -n 100 #{reconfigure_log_file}", stream_output: true).execute!
214
220
  raise e
215
221
  end
216
222
 
@@ -72,13 +72,7 @@ module Gitlab
72
72
  gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
73
73
  gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
74
74
  git_data_dirs({
75
- '#{cluster_config.primary_node_name}' => {
76
- 'path' => '/var/opt/gitlab/git-data'
77
- },
78
- '#{cluster_config.secondary_node_name}' => {
79
- 'path' => '/var/opt/gitlab/git-data'
80
- },
81
- '#{cluster_config.tertiary_node_name}' => {
75
+ '#{name}' => {
82
76
  'path' => '/var/opt/gitlab/git-data'
83
77
  }
84
78
  });
@@ -195,17 +195,22 @@ module Gitlab
195
195
  # @return [String] the path to the log file
196
196
  def log_file
197
197
  retries = 0
198
- log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-reconfigure-logs.txt"
198
+ log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-reconfigure.log"
199
199
  while File.exist?(log_file)
200
200
  break unless File.exist?(log_file)
201
201
 
202
202
  retries += 1
203
- log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-retry-#{retries}-reconfigure-logs.txt"
203
+ log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-retry-#{retries}-reconfigure.log"
204
204
  end
205
205
 
206
206
  log_file
207
207
  end
208
208
 
209
+ def get_reconfigure_log_file_from_artefact
210
+ all_reconfigure_log_file = Dir["#{Runtime::Env.host_artifacts_dir}/*reconfigure.log"].sort_by { |f| File.mtime(f) }
211
+ all_reconfigure_log_file.last
212
+ end
213
+
209
214
  private :log_file
210
215
 
211
216
  def reconfigure
@@ -213,7 +218,7 @@ module Gitlab
213
218
  log_file_path = log_file
214
219
  config_file = File.open(log_file_path, "w")
215
220
  @docker.attach(name) do |line, _wait|
216
- config_file.write(line, mode: 'a')
221
+ config_file.write(line)
217
222
 
218
223
  if line.include?('There was an error running gitlab-ctl reconfigure')
219
224
  Runtime::Logger.error(
@@ -109,8 +109,10 @@ module Gitlab
109
109
  specs.hostname = "qa-e2e-specs.#{gitlab.network}"
110
110
  specs.network = gitlab.network
111
111
  specs.args = [gitlab.address, *rspec_args]
112
- # do not generate reports for non release runs
113
- specs.env = { 'QA_GENERATE_ALLURE_REPORT' => false } unless release == current_release
112
+ next if release == current_release
113
+
114
+ # do not generate reports and metrics artifacts for non release runs
115
+ specs.env = { 'QA_GENERATE_ALLURE_REPORT' => false, 'QA_SAVE_TEST_METRICS' => false }
114
116
  end
115
117
  rescue Support::ShellCommand::StatusError => e
116
118
  if release == current_release # only fail on current release
@@ -38,11 +38,15 @@ module Gitlab
38
38
  #
39
39
  # @example
40
40
  # latest_patch(Gem::Version.new("14.10")) => "14.10.5"
41
+ # latest_patch(Gem::Version.new("14.10.5")) => "14.10.5"
41
42
  #
42
43
  # @param [Gem::Version] version
43
44
  # @return [String]
44
45
  def latest_patch(version)
45
- versions.find { |ver| ver.to_s.match?(/^#{version}/) }
46
+ # check if version is already a patch version
47
+ return version if version.to_s.split('.').size == 3
48
+
49
+ versions.find { |ver| ver.to_s.match?(/^#{version}\./) }
46
50
  end
47
51
 
48
52
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.3.0'
5
+ VERSION = '14.5.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.3.0
4
+ version: 14.5.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-03-01 00:00:00.000000000 Z
11
+ date: 2024-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control