gitlab-qa 8.9.0 → 8.10.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: 0ffa49a5a85a5e660bb61689d01b0a7daa3a0004f7e05e5a9100dd83dbeeea55
4
- data.tar.gz: 8f158219d4c59b3db6181534eafdd55e5ca2abbcae1a0402c4f80d3f8c77fa82
3
+ metadata.gz: 81e48c81786f8f96655e3c8096e804cf08b1ca602133fb10b3238d581df26957
4
+ data.tar.gz: faf446327a9eba30bb029771ca8658097da2b3852a4389fe1d3309cf370c037f
5
5
  SHA512:
6
- metadata.gz: 7cb6f4b7197625d3db353048368716a80e7bdf17e7060cfaadf90a13d44c96805c76e396b3fa78a6e777dacad191305c12ec78e8c9e8920d3a09100f7d2ebd56
7
- data.tar.gz: cfec5285a2a0d54986d3984f333497082911febee8d3a368dc2be3f81d04753e2c8a726bd8515d1be62181a591077eb4c47555865e1fc331ace507289adc47a3
6
+ metadata.gz: ee989bb53b1fae1ff3ab34780f20b8cb609cb23aee4d74ec04d2b7f31aeae78d136157044009e79fa53084f9edb168c69150596fedab77670385b5e56803138c
7
+ data.tar.gz: 1d3355039191667d8415097781afc5f49294e4c0fe9c10407c92537085ee088e642cf167518e2a4688faeb4410f20c7e2cc9e70d7d6bd0c05539fbd0667f43c1
@@ -4,7 +4,7 @@ stages:
4
4
  - notify
5
5
 
6
6
  default:
7
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-ruby-2.7
7
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-docker-${DOCKER_VERSION}
8
8
  tags:
9
9
  - gitlab-org
10
10
  cache:
@@ -12,6 +12,7 @@ default:
12
12
  files:
13
13
  - Gemfile.lock
14
14
  - gitlab-qa.gemspec
15
+ prefix: $RUBY_VERSION
15
16
  paths:
16
17
  - vendor/ruby
17
18
  before_script:
@@ -79,6 +80,8 @@ variables:
79
80
  QA_TESTCASE_SESSIONS_PROJECT: "gitlab-org/quality/testcase-sessions"
80
81
  # QA_DEFAULT_BRANCH is the default branch name of the instance under test.
81
82
  QA_DEFAULT_BRANCH: "master"
83
+ RUBY_VERSION: "2.7"
84
+ DOCKER_VERSION: "20.10.14"
82
85
 
83
86
  .ce-variables:
84
87
  variables:
@@ -32,4 +32,4 @@ with the latest commit from https://gitlab.com/gitlab-org/gitlab-qa/commits/mast
32
32
  - Checklist after merging:
33
33
  - [ ] [Update the release notes for the newly created tag](docs/release_process.md#how-to).
34
34
 
35
- /label ~Quality ~"type::maintenance"
35
+ /label ~Quality ~"type::maintenance" ~"maintenance::dependency"
data/.gitlab-ci.yml CHANGED
@@ -5,7 +5,7 @@ stages:
5
5
  - deploy
6
6
 
7
7
  default:
8
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-ruby-2.7
8
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3
9
9
  tags:
10
10
  - gitlab-org
11
11
  cache:
@@ -13,6 +13,7 @@ default:
13
13
  files:
14
14
  - Gemfile.lock
15
15
  - gitlab-qa.gemspec
16
+ prefix: $RUBY_VERSION
16
17
  paths:
17
18
  - vendor/ruby
18
19
  before_script:
@@ -40,16 +41,24 @@ workflow:
40
41
  # When using Run pipeline button in the GitLab UI, from the project’s CI/CD > Pipelines section, create a pipeline.
41
42
  - if: '$CI_PIPELINE_SOURCE == "web"'
42
43
 
44
+ variables:
45
+ RUBY_VERSION: "2.7"
46
+
43
47
  .check-base:
44
48
  stage: check
45
- script:
46
- - bundle exec $CI_JOB_NAME --color
49
+ parallel:
50
+ matrix:
51
+ - RUBY_VERSION: ["2.7", "3.0"]
47
52
 
48
53
  rubocop:
49
54
  extends: .check-base
55
+ script:
56
+ - bundle exec rubocop --color
50
57
 
51
58
  rspec:
52
59
  extends: .check-base
60
+ script:
61
+ - bundle exec rspec --force-color
53
62
 
54
63
  prepare:
55
64
  stage: generate
data/.rubocop.yml CHANGED
@@ -39,3 +39,7 @@ Layout/SpaceBeforeFirstArg:
39
39
 
40
40
  RSpec/MultipleMemoizedHelpers:
41
41
  Enabled: false
42
+
43
+ CodeReuse/ActiveRecord:
44
+ Exclude:
45
+ - 'spec/**/*_spec.rb'
data/Gemfile.lock CHANGED
@@ -1,27 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (8.9.0)
4
+ gitlab-qa (8.10.1)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
8
8
  nokogiri (~> 1.10)
9
9
  rainbow (>= 3, < 4)
10
10
  table_print (= 1.5.7)
11
- toxiproxy (~> 2.0.2)
12
11
  zeitwerk (>= 2, < 3)
13
12
 
14
13
  GEM
15
14
  remote: https://rubygems.org/
16
15
  specs:
17
- activesupport (6.1.6.1)
16
+ activesupport (6.1.7)
18
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
18
  i18n (>= 1.6, < 2)
20
19
  minitest (>= 5.1)
21
20
  tzinfo (~> 2.0)
22
21
  zeitwerk (~> 2.3)
23
- addressable (2.8.0)
24
- public_suffix (>= 2.0.2, < 5.0)
22
+ addressable (2.8.1)
23
+ public_suffix (>= 2.0.2, < 6.0)
25
24
  ast (2.4.2)
26
25
  backport (1.2.0)
27
26
  benchmark (0.2.0)
@@ -38,7 +37,7 @@ GEM
38
37
  colored2 (~> 3.1)
39
38
  crack (0.4.5)
40
39
  rexml
41
- danger (8.6.1)
40
+ danger (9.0.0)
42
41
  claide (~> 1.0)
43
42
  claide-plugins (>= 0.9.2)
44
43
  colored2 (~> 3.1)
@@ -49,7 +48,7 @@ GEM
49
48
  kramdown (~> 2.3)
50
49
  kramdown-parser-gfm (~> 1.0)
51
50
  no_proxy_fix
52
- octokit (~> 4.7)
51
+ octokit (~> 5.0)
53
52
  terminal-table (>= 1, < 4)
54
53
  danger-gitlab (8.0.0)
55
54
  danger
@@ -58,7 +57,7 @@ GEM
58
57
  domain_name (0.5.20190701)
59
58
  unf (>= 0.0.5, < 1.0.0)
60
59
  e2mmap (0.1.0)
61
- faraday (1.10.0)
60
+ faraday (1.10.2)
62
61
  faraday-em_http (~> 1.0)
63
62
  faraday-em_synchrony (~> 1.0)
64
63
  faraday-excon (~> 1.1)
@@ -73,7 +72,7 @@ GEM
73
72
  faraday-em_http (1.0.0)
74
73
  faraday-em_synchrony (1.0.0)
75
74
  faraday-excon (1.1.0)
76
- faraday-http-cache (2.4.0)
75
+ faraday-http-cache (2.4.1)
77
76
  faraday (>= 0.8)
78
77
  faraday-httpclient (1.0.1)
79
78
  faraday-multipart (1.0.4)
@@ -87,7 +86,8 @@ GEM
87
86
  ffi-compiler (1.0.1)
88
87
  ffi (>= 1.0.0)
89
88
  rake
90
- git (1.11.0)
89
+ git (1.12.0)
90
+ addressable (~> 2.8)
91
91
  rchardet (~> 1.8)
92
92
  gitlab (4.18.0)
93
93
  httparty (~> 0.18)
@@ -128,47 +128,47 @@ GEM
128
128
  mime-types-data (~> 3.2015)
129
129
  mime-types-data (3.2022.0105)
130
130
  mini_portile2 (2.8.0)
131
- minitest (5.16.2)
131
+ minitest (5.16.3)
132
132
  multi_xml (0.6.0)
133
133
  multipart-post (2.2.3)
134
134
  nap (1.1.0)
135
135
  no_proxy_fix (0.1.2)
136
- nokogiri (1.13.8)
136
+ nokogiri (1.13.9)
137
137
  mini_portile2 (~> 2.8.0)
138
138
  racc (~> 1.4)
139
- octokit (4.25.1)
139
+ octokit (5.6.1)
140
140
  faraday (>= 1, < 3)
141
141
  sawyer (~> 0.9)
142
142
  open4 (1.3.4)
143
143
  parallel (1.22.1)
144
- parser (3.1.2.0)
144
+ parser (3.1.2.1)
145
145
  ast (~> 2.4.1)
146
146
  pry (0.14.1)
147
147
  coderay (~> 1.1)
148
148
  method_source (~> 1.0)
149
- public_suffix (4.0.7)
149
+ public_suffix (5.0.0)
150
150
  racc (1.6.0)
151
- rack (2.2.4)
152
- rainbow (3.0.0)
151
+ rack (3.0.0)
152
+ rainbow (3.1.1)
153
153
  rake (13.0.6)
154
154
  rchardet (1.8.0)
155
- regexp_parser (2.5.0)
155
+ regexp_parser (2.6.0)
156
156
  reverse_markdown (2.1.1)
157
157
  nokogiri
158
158
  rexml (3.2.5)
159
- rspec (3.11.0)
160
- rspec-core (~> 3.11.0)
161
- rspec-expectations (~> 3.11.0)
162
- rspec-mocks (~> 3.11.0)
163
- rspec-core (3.11.0)
164
- rspec-support (~> 3.11.0)
165
- rspec-expectations (3.11.0)
159
+ rspec (3.12.0)
160
+ rspec-core (~> 3.12.0)
161
+ rspec-expectations (~> 3.12.0)
162
+ rspec-mocks (~> 3.12.0)
163
+ rspec-core (3.12.0)
164
+ rspec-support (~> 3.12.0)
165
+ rspec-expectations (3.12.0)
166
166
  diff-lcs (>= 1.2.0, < 2.0)
167
- rspec-support (~> 3.11.0)
168
- rspec-mocks (3.11.1)
167
+ rspec-support (~> 3.12.0)
168
+ rspec-mocks (3.12.0)
169
169
  diff-lcs (>= 1.2.0, < 2.0)
170
- rspec-support (~> 3.11.0)
171
- rspec-support (3.11.0)
170
+ rspec-support (~> 3.12.0)
171
+ rspec-support (3.12.0)
172
172
  rubocop (0.93.1)
173
173
  parallel (~> 1.10)
174
174
  parser (>= 2.7.1.5)
@@ -178,7 +178,7 @@ GEM
178
178
  rubocop-ast (>= 0.6.0)
179
179
  ruby-progressbar (~> 1.7)
180
180
  unicode-display_width (>= 1.4.0, < 2.0)
181
- rubocop-ast (1.19.1)
181
+ rubocop-ast (1.23.0)
182
182
  parser (>= 3.1.1.0)
183
183
  rubocop-gitlab-security (0.1.1)
184
184
  rubocop (>= 0.51)
@@ -197,7 +197,7 @@ GEM
197
197
  sawyer (0.9.2)
198
198
  addressable (>= 2.3.5)
199
199
  faraday (>= 0.17.3, < 3)
200
- solargraph (0.45.0)
200
+ solargraph (0.47.2)
201
201
  backport (~> 1.2)
202
202
  benchmark
203
203
  bundler (>= 1.17.2)
@@ -217,7 +217,6 @@ GEM
217
217
  unicode-display_width (>= 1.1.1, < 3)
218
218
  thor (1.2.1)
219
219
  tilt (2.0.11)
220
- toxiproxy (2.0.2)
221
220
  tzinfo (2.0.5)
222
221
  concurrent-ruby (~> 1.0)
223
222
  unf (0.1.4)
@@ -231,7 +230,7 @@ GEM
231
230
  webrick (1.7.0)
232
231
  yard (0.9.28)
233
232
  webrick (~> 1.7.0)
234
- zeitwerk (2.6.0)
233
+ zeitwerk (2.6.1)
235
234
 
236
235
  PLATFORMS
237
236
  ruby
data/gitlab-qa.gemspec CHANGED
@@ -34,6 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_runtime_dependency 'nokogiri', '~> 1.10'
35
35
  spec.add_runtime_dependency 'rainbow', '>= 3', '< 4'
36
36
  spec.add_runtime_dependency 'table_print', '1.5.7'
37
- spec.add_runtime_dependency 'toxiproxy', '~> 2.0.2'
38
37
  spec.add_runtime_dependency 'zeitwerk', '>= 2', '< 3'
39
38
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
- require 'toxiproxy'
2
+
3
+ require 'json'
3
4
 
4
5
  module Gitlab
5
6
  module QA
@@ -26,52 +27,48 @@ module Gitlab
26
27
  command << "--publish 8474:8474"
27
28
  end
28
29
 
29
- Toxiproxy.host = "http://localhost:8474"
30
-
31
- begin
32
- attempts ||= 1
33
- Toxiproxy.populate([
34
- {
35
- name: "postgres",
36
- listen: "[::]:5432",
37
- upstream: "postgres.test:5432",
38
- "enabled": true
39
- },
40
- {
41
- name: "praefect",
42
- listen: "[::]:2305",
43
- upstream: "praefect.test:2305",
44
- "enabled": true
45
- },
46
- {
47
- name: "gitaly1",
48
- listen: "[::]:8076",
49
- upstream: "gitaly1.test:8076",
50
- "enabled": true
51
- },
52
- {
53
- name: "gitaly2",
54
- listen: "[::]:8077",
55
- upstream: "gitaly2.test:8077",
56
- "enabled": true
57
- },
58
- {
59
- name: "gitaly3",
60
- listen: "[::]:8078",
61
- upstream: "gitaly3.test:8078",
62
- "enabled": true
63
- }
64
- ])
65
- rescue StandardError => e
66
- Runtime::Logger.warn e.message
30
+ QA::Support::Shellout.shell <<~CMD
31
+ docker run --network #{@network} --rm curlimages/curl:7.85.0 \
32
+ -i -s \
33
+ -X POST http://#{name}:8474/populate \
34
+ -H 'Content-Type: application/json' \
35
+ -d '#{proxies.to_json}'
36
+ CMD
37
+ end
67
38
 
68
- # This should resolve within seconds, but give some leeway for the toxiproxy container to start
69
- if (attempts += 1) < 10
70
- Runtime::Logger.info "Waiting #{attempts} seconds before retrying setting toxiproxy config"
71
- sleep attempts
72
- retry
73
- end
74
- end
39
+ def proxies
40
+ [
41
+ {
42
+ name: "postgres",
43
+ listen: "[::]:5432",
44
+ upstream: "postgres.test:5432",
45
+ enabled: true
46
+ },
47
+ {
48
+ name: "praefect",
49
+ listen: "[::]:2305",
50
+ upstream: "praefect.test:2305",
51
+ enabled: true
52
+ },
53
+ {
54
+ name: "gitaly1",
55
+ listen: "[::]:8076",
56
+ upstream: "gitaly1.test:8076",
57
+ enabled: true
58
+ },
59
+ {
60
+ name: "gitaly2",
61
+ listen: "[::]:8077",
62
+ upstream: "gitaly2.test:8077",
63
+ enabled: true
64
+ },
65
+ {
66
+ name: "gitaly3",
67
+ listen: "[::]:8078",
68
+ upstream: "gitaly3.test:8078",
69
+ enabled: true
70
+ }
71
+ ]
75
72
  end
76
73
  end
77
74
  end
@@ -160,23 +160,27 @@ module Gitlab
160
160
  password: Runtime::Env.dev_access_token_variable,
161
161
  registry: DEV_REGISTRY
162
162
  }
163
- elsif omnibus_mirror?
164
- username, password = if Runtime::Env.ci_job_token && Runtime::Env.ci_pipeline_source.include?('pipeline')
165
- ['gitlab-ci-token', Runtime::Env.ci_job_token]
166
- elsif Runtime::Env.qa_container_registry_access_token
167
- [Runtime::Env.gitlab_username, Runtime::Env.qa_container_registry_access_token]
168
- else
169
- Runtime::Env.require_qa_access_token!
163
+ elsif omnibus_mirror? || omnibus_security?
164
+ omnibus_login_params
165
+ end
166
+ end
170
167
 
171
- [Runtime::Env.gitlab_username, Runtime::Env.qa_access_token]
172
- end
168
+ def omnibus_login_params
169
+ username, password = if Runtime::Env.ci_job_token && Runtime::Env.ci_pipeline_source.include?('pipeline')
170
+ ['gitlab-ci-token', Runtime::Env.ci_job_token]
171
+ elsif Runtime::Env.qa_container_registry_access_token
172
+ [Runtime::Env.gitlab_username, Runtime::Env.qa_container_registry_access_token]
173
+ else
174
+ Runtime::Env.require_qa_access_token!
173
175
 
174
- {
175
- username: username,
176
- password: password,
177
- registry: COM_REGISTRY
178
- }
179
- end
176
+ [Runtime::Env.gitlab_username, Runtime::Env.qa_access_token]
177
+ end
178
+
179
+ {
180
+ username: username,
181
+ password: password,
182
+ registry: COM_REGISTRY
183
+ }
180
184
  end
181
185
 
182
186
  def dev_gitlab_org?
@@ -187,6 +191,10 @@ module Gitlab
187
191
  image.start_with?("#{COM_REGISTRY}/gitlab-org/build/omnibus-gitlab-mirror/")
188
192
  end
189
193
 
194
+ def omnibus_security?
195
+ image.start_with?("#{COM_REGISTRY}/gitlab-org/security/omnibus-gitlab/")
196
+ end
197
+
190
198
  def valid?
191
199
  canonical? || release.match?(CUSTOM_GITLAB_IMAGE_REGEX)
192
200
  end
@@ -32,7 +32,7 @@ module Gitlab
32
32
 
33
33
  logger.info("Shell command: `#{mask_secrets(command).cyan}`")
34
34
 
35
- Open3.popen2e(@command.to_s) do |stdin, out, wait|
35
+ Open3.popen2e(command.to_s) do |stdin, out, wait|
36
36
  if @stdin_data
37
37
  stdin.puts(@stdin_data)
38
38
  stdin.close
@@ -90,7 +90,7 @@ module Gitlab
90
90
  # @param [String] input the string to mask
91
91
  # @return [String] The masked string
92
92
  def mask_secrets(input)
93
- @mask_secrets.each_with_object(+input) { |secret, s| s.gsub!(secret, '*****') }.to_s
93
+ @mask_secrets.reduce(input) { |s, secret| s.gsub(secret, '*****') }.to_s
94
94
  end
95
95
  end
96
96
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '8.9.0'
5
+ VERSION = '8.10.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: 8.9.0
4
+ version: 8.10.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: 2022-10-26 00:00:00.000000000 Z
11
+ date: 2022-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -212,20 +212,6 @@ dependencies:
212
212
  - - '='
213
213
  - !ruby/object:Gem::Version
214
214
  version: 1.5.7
215
- - !ruby/object:Gem::Dependency
216
- name: toxiproxy
217
- requirement: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - "~>"
220
- - !ruby/object:Gem::Version
221
- version: 2.0.2
222
- type: :runtime
223
- prerelease: false
224
- version_requirements: !ruby/object:Gem::Requirement
225
- requirements:
226
- - - "~>"
227
- - !ruby/object:Gem::Version
228
- version: 2.0.2
229
215
  - !ruby/object:Gem::Dependency
230
216
  name: zeitwerk
231
217
  requirement: !ruby/object:Gem::Requirement