gitlab-qa 10.3.0.1 → 10.4.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: cfc87eff61f4ee1948666c002738047c9061df3f669c16b87a78887b68776f3c
4
- data.tar.gz: 32514740f5d1cc8403d6b388c731048d85e5da441acaf687d7f8ddad72ad44a6
3
+ metadata.gz: fe25be14520a4bf78ee88e0d5bd7e36534d79b32c5734b92b8337736c659b6b2
4
+ data.tar.gz: c0064bfce6ed145f0e7464ac72f8ca8ddc2c2ae467a956f361645e8443f7546a
5
5
  SHA512:
6
- metadata.gz: 29a26e723aac6ac6fad94630e0e5dfe1882aa7031474dcd20f781468105dfa77f6449430202f06875a400edbc71339c0eb4183303bd3cddd432105241ce1bafc
7
- data.tar.gz: '08751aa4982005a4ac8b80998dd07ae31a4fb08c6a4539a20c09167ab382a7bed47a6c5b74478ed30bb6db05c91c2258e11d753774b4fe9d0d6b1c36ac592462'
6
+ metadata.gz: f3df8e960239e908aa0f86b7f6dcac023ce6996aadd3a4e49108cbf6f58876de94946f3d475b0828578ccb04309ca241ea8f8eeb3fa44b760624f4cb33c29b2f
7
+ data.tar.gz: 0af92a24612916090ae9a71aebef586b3261a6f99c5cd93f287199881f1f959e897bc68811f8fdb86fc607539bb4998839b6420233d300b1ceca6a3005fa7573
data/.gitlab-ci.yml CHANGED
@@ -34,7 +34,7 @@ workflow:
34
34
  # For merge requests, create a pipeline.
35
35
  - if: '$CI_MERGE_REQUEST_IID'
36
36
  # For the default branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
37
- - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/'
37
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
38
38
  # For tags, create a pipeline.
39
39
  - if: '$CI_COMMIT_TAG'
40
40
  # When using Run pipeline button in the GitLab UI, from the project’s CI/CD > Pipelines section, create a pipeline.
@@ -46,12 +46,6 @@ variables:
46
46
  BUNDLE_SILENCE_ROOT_WARNING: "true"
47
47
  BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
48
48
 
49
- # Override rules to allow creating backport releases
50
- .release-base:
51
- rules:
52
- - if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/)'
53
- changes: ["lib/**/version.rb"]
54
-
55
49
  package-and-test-env:
56
50
  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
57
51
  stage: .pre
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (10.3.0.1)
4
+ gitlab-qa (10.4.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -1072,7 +1072,10 @@ gitlab-qa Test::Integration::RegistryTLS EE --omnibus-config object_storage_aws
1072
1072
 
1073
1073
  ### `Test::Instance::Image EE --omnibus-config decomposition_single_db`
1074
1074
 
1075
- This scenario is to run tests against a GitLab instance with a [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) using a single database:
1075
+ **Note: The default Omnibus config is using a single database
1076
+ with [two database connections](https://docs.gitlab.com/omnibus/settings/database.html#configuring-multiple-database-connections)**
1077
+
1078
+ This scenario is to run tests against a GitLab instance using a single database with only one `main` connection:
1076
1079
 
1077
1080
  ```ruby
1078
1081
  gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_single_db
@@ -1080,7 +1083,7 @@ gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_single_db
1080
1083
 
1081
1084
  ### `Test::Instance::Image EE --omnibus-config decomposition_multiple_db`
1082
1085
 
1083
- This scenario is to run tests against a GitLab instance with a [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) using multiple databases:
1086
+ This scenario is to run tests against a GitLab instance using [multiple databases](https://docs.gitlab.com/ee/administration/postgresql/multiple_databases.html):
1084
1087
 
1085
1088
  ```ruby
1086
1089
  gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_multiple_db
@@ -64,9 +64,11 @@ module Gitlab
64
64
  praefect['enable'] = false;
65
65
  prometheus['enable'] = true;
66
66
  gitaly['enable'] = true;
67
- gitaly['listen_addr'] = '0.0.0.0:#{gitaly_port}';
68
- gitaly['prometheus_listen_addr'] = '0.0.0.0:9236';
69
- gitaly['auth_token'] = 'PRAEFECT_INTERNAL_TOKEN';
67
+ gitaly['configuration'] = {
68
+ 'listen_addr': '0.0.0.0:#{gitaly_port}',
69
+ 'prometheus_listen_addr': '0.0.0.0:9236',
70
+ 'auth_token': 'PRAEFECT_INTERNAL_TOKEN'
71
+ }
70
72
  gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
71
73
  gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
72
74
  git_data_dirs({
@@ -60,36 +60,46 @@ module Gitlab
60
60
  gitaly['enable'] = false;
61
61
  prometheus['enable'] = true;
62
62
  praefect['enable'] = true;
63
- praefect['listen_addr'] = '0.0.0.0:#{cluster_config.praefect_port}';
64
- praefect['prometheus_listen_addr'] = '0.0.0.0:9652';
65
- praefect['auth_token'] = 'PRAEFECT_EXTERNAL_TOKEN';
66
- praefect['reconciliation_scheduling_interval'] = '10s';
67
- praefect['database_host'] = '#{cluster_config.database_node_addr}';
68
- praefect['database_user'] = 'postgres';
69
- praefect['database_port'] = #{cluster_config.database_port};
70
- praefect['database_password'] = 'SQL_PASSWORD';
71
- praefect['database_dbname'] = 'praefect_production';
72
- praefect['database_sslmode'] = 'disable';
73
- praefect['database_direct_host'] = '#{cluster_config.database_node_addr}';
74
- praefect['database_direct_port'] = #{cluster_config.database_port};
75
- praefect['virtual_storages'] = {
76
- 'default' => {
77
- 'nodes' => {
78
- '#{cluster_config.primary_node_name}' => {
79
- 'address' => 'tcp://#{cluster_config.primary_node_addr}:#{cluster_config.primary_node_port}',
80
- 'token' => 'PRAEFECT_INTERNAL_TOKEN'
81
- },
82
- '#{cluster_config.secondary_node_name}' => {
83
- 'address' => 'tcp://#{cluster_config.secondary_node_addr}:#{cluster_config.secondary_node_port}',
84
- 'token' => 'PRAEFECT_INTERNAL_TOKEN'
85
- },
86
- '#{cluster_config.tertiary_node_name}' => {
87
- 'address' => 'tcp://#{cluster_config.tertiary_node_addr}:#{cluster_config.tertiary_node_port}',
88
- 'token' => 'PRAEFECT_INTERNAL_TOKEN'
89
- }
63
+ praefect['configuration'] = {
64
+ listen_addr: '0.0.0.0:#{cluster_config.praefect_port}',
65
+ prometheus_listen_addr: '0.0.0.0:9652',
66
+ auth: {
67
+ token: 'PRAEFECT_EXTERNAL_TOKEN'
68
+ },
69
+ reconciliation: {
70
+ scheduling_interval: '10s'
71
+ },
72
+ database: {
73
+ host: '#{cluster_config.database_node_addr}',
74
+ port: #{cluster_config.database_port},
75
+ user: 'postgres',
76
+ password: 'SQL_PASSWORD',
77
+ dbname: 'praefect_production',
78
+ sslmode: 'disable'
79
+ },
80
+ virtual_storage: [
81
+ {
82
+ name: 'default',
83
+ node: [
84
+ {
85
+ 'storage': '#{cluster_config.primary_node_name}',
86
+ 'address': 'tcp://#{cluster_config.primary_node_addr}:#{cluster_config.primary_node_port}',
87
+ 'token': 'PRAEFECT_INTERNAL_TOKEN'
88
+ },
89
+ {
90
+ 'storage': '#{cluster_config.secondary_node_name}',
91
+ 'address': 'tcp://#{cluster_config.secondary_node_addr}:#{cluster_config.secondary_node_port}',
92
+ 'token': 'PRAEFECT_INTERNAL_TOKEN'
93
+ },
94
+ {
95
+ 'storage': '#{cluster_config.tertiary_node_name}',
96
+ 'address': 'tcp://#{cluster_config.tertiary_node_addr}:#{cluster_config.tertiary_node_port}',
97
+ 'token': 'PRAEFECT_INTERNAL_TOKEN'
98
+ }
99
+ ],
90
100
  }
91
- }
92
- };
101
+ ]
102
+ }
93
103
  OMNIBUS
94
104
  end
95
105
  end
@@ -31,8 +31,6 @@ module Gitlab
31
31
  set_command_args(command)
32
32
  set_volumes(command)
33
33
  end
34
-
35
- wait_until_ready
36
34
  end
37
35
 
38
36
  def wait_until_ready(max_attempts: 20, wait: 2)
@@ -50,14 +48,15 @@ module Gitlab
50
48
  private
51
49
 
52
50
  def grid_healthy?
53
- HTTP.get('http://localhost:4444/ping').status&.success?
54
- rescue HTTP::ConnectionError => _e
51
+ HTTP.get('http://docker:4444/ping').status&.success?
52
+ rescue HTTP::ConnectionError => e
53
+ Runtime::Logger.debug(e)
55
54
  false
56
55
  end
57
56
 
58
57
  def pull_images
59
- docker.pull(image: "selenoid/chrome", tag: Runtime::Env.browser_version) if Runtime::Env.browser == :chrome && !Runtime::Env.mobile_layout?
60
- docker.pull(image: "selenoid/video-recorder", tag: "latest-release")
58
+ docker.pull(image: "selenoid/chrome", tag: Runtime::Env.browser_version) if Runtime::Env.browser == 'chrome' && !Runtime::Env.mobile_layout?
59
+ docker.pull(image: "selenoid/video-recorder", tag: "latest-release") if Runtime::Env.record_video
61
60
  end
62
61
 
63
62
  # Set custom run command arguments
@@ -22,6 +22,9 @@ module Gitlab
22
22
  'QA_REMOTE_MOBILE_DEVICE_NAME' => :remote_mobile_device_name,
23
23
  'QA_REMOTE_TUNNEL_ID' => :remote_tunnel_id,
24
24
  'QA_BROWSER' => :browser,
25
+ 'QA_BROWSER_VERSION' => :browser_version,
26
+ 'QA_RECORD_VIDEO' => :record_video,
27
+ 'QA_LAYOUT' => :layout,
25
28
  'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
26
29
  'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
27
30
  'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
@@ -364,10 +367,6 @@ module Gitlab
364
367
  env_var_value_if_defined('QA_LAYOUT')&.match?(/tablet|phone/i)
365
368
  end
366
369
 
367
- def browser_version
368
- env_var_value_if_defined('QA_BROWSER_VERSION')
369
- end
370
-
371
370
  def qa_run_type
372
371
  return env_var_value_if_defined('QA_RUN_TYPE') if env_var_value_valid?('QA_RUN_TYPE')
373
372
 
@@ -8,8 +8,7 @@ module Gitlab
8
8
  def configuration
9
9
  <<~OMNIBUS
10
10
  gitlab_rails['databases']['main']['enable'] = true
11
- gitlab_rails['databases']['ci']['enable'] = true
12
- gitlab_rails['databases']['ci']['db_database'] = 'gitlabhq_production'
11
+ gitlab_rails['databases']['ci']['enable'] = false
13
12
  OMNIBUS
14
13
  end
15
14
  end
@@ -47,10 +47,6 @@ module Gitlab
47
47
 
48
48
  private
49
49
 
50
- MAX_TAGS_HTTP_REQUESTS = 50
51
- # https://docs.docker.com/docker-hub/api/latest/#tag/images/operation/GetNamespacesRepositoriesImages
52
- TAGS_PER_PAGE = 100
53
-
54
50
  attr_reader :current_version, :edition, :logger
55
51
 
56
52
  # Current versions major version
@@ -159,44 +155,28 @@ module Gitlab
159
155
  # All available docker tags
160
156
  #
161
157
  # @return [Array<String>]
158
+ # rubocop:disable Metrics/AbcSize
162
159
  def tags
163
160
  return @tags if defined?(@tags)
164
161
 
165
- MAX_TAGS_HTTP_REQUESTS.times do |index|
166
- tag_list, more_data = fetch_tags(page: index + 1)
167
-
168
- if tag_list
169
- @tags = Array(@tags)
170
- @tags += tag_list
171
- end
172
-
173
- break if tag_list.nil? || more_data.nil?
174
- end
175
-
176
- @tags
177
- end
178
-
179
- def fetch_tags(page:, per_page: TAGS_PER_PAGE)
180
- logger.info("Fetching Docker tags page #{page} from 'gitlab/gitlab-#{edition}' registry")
162
+ logger.info("Fetching docker tags from 'gitlab/gitlab-#{edition}' registry")
181
163
  response = HttpRequest.make_http_request(
182
- url: "https://registry.hub.docker.com/v2/namespaces/gitlab/repositories/gitlab-#{edition}/tags?page=#{page}&page_size=#{per_page}",
164
+ url: "https://registry.hub.docker.com/v2/namespaces/gitlab/repositories/gitlab-#{edition}/tags?page_size=1000",
183
165
  fail_on_error: false
184
166
  )
185
167
 
186
168
  unless response.code == 200
187
169
  logger.error(" failed to fetch docker tags - code: #{response.code}, response: '#{response.body}'")
188
- return nil
170
+ return @tags = nil
189
171
  end
190
172
 
191
- response = JSON.parse(response.body, symbolize_names: true)
192
- matching_tags = response
173
+ @tags = JSON
174
+ .parse(response.body, symbolize_names: true)
193
175
  .fetch(:results)
194
176
  .map { |tag| tag[:name] }
195
- .grep(VERSION_PATTERN)
196
- more_data = response.fetch(:next)
197
-
198
- [matching_tags, more_data]
177
+ .select { |tag| tag.match?(VERSION_PATTERN) }
199
178
  end
179
+ # rubocop:enable Metrics/AbcSize
200
180
  end
201
181
  end
202
182
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '10.3.0.1'
5
+ VERSION = '10.4.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: 10.3.0.1
4
+ version: 10.4.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: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control