gitlab-qa 7.30.0 → 7.31.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: 04b20a54aa036ec24fb463e50ad5b4be00f81a054cdae02dee966b38c0538c56
4
- data.tar.gz: d8c1715674a879d58359d8f8293452f68ae4d516e4c19d4ad888f34ac018498d
3
+ metadata.gz: 950731b29895b80ed3a174ade472d58c7496fc60620959224790f007a0beff79
4
+ data.tar.gz: 66d92f34024e8c9a4b679424c0f1994713ac7180eadd875f732d8c4d8f741a9b
5
5
  SHA512:
6
- metadata.gz: 5ccf3ee587dfef9f148fa98aa47b043bb6e2487aca12eb699f489f86fdf05f3939e5ece80ddde46a4e01b9b183dfb24742b287ac616ebc0939665786e8bbeba0
7
- data.tar.gz: bc1a167d1b2500974abe0b3ec7f7966debe7b7f211f79324f87685f2e0906606e0c2799164f03adfff69d1af97697cf10128c6fe45eec46534832ad4b4ff0fb5
6
+ metadata.gz: fab55c1cfbcaa92e9b24156a61d1314e28565be51c1d0e06387445554f25dd1f170f192d2784a2d1bd40d7ff28de484ceba9830bcb16dd1d792a11c2253171c8
7
+ data.tar.gz: 663d5d28fa646a0b19ac84b292b61879b8ebc238657d99928d10ffee995dfc12dd56419cfbdd5cf1b9384c665dc6e54cedde4136c2b32fd4810982821f2cd4af
data/.gitignore CHANGED
@@ -8,6 +8,9 @@
8
8
  /.idea
9
9
  .ruby-version
10
10
  .ruby-gemset
11
+ .DS_Store
12
+ .rakeTasks
13
+ .tool-versions
11
14
 
12
15
  # ignore built gems
13
16
  *.gem
@@ -0,0 +1,25 @@
1
+ ce:decomposition_multiple_db:
2
+ extends:
3
+ - .rules:ce-never-when-triggered-by-feature-flag-definition-change
4
+ - .rules:ce-never-when-qa-tests-specified
5
+ - .test
6
+ - .high-capacity
7
+ - .ce-variables
8
+ - .rspec-report-opts
9
+ - .combined-gitlab-qa-options-script
10
+ parallel: 5
11
+ variables:
12
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_multiple_db"
13
+
14
+ ee:decomposition_multiple_db:
15
+ extends:
16
+ - .rules:ee-never-when-triggered-by-feature-flag-definition-change
17
+ - .rules:ee-never-when-qa-tests-specified
18
+ - .test
19
+ - .ee-variables
20
+ - .high-capacity
21
+ - .rspec-report-opts
22
+ - .combined-gitlab-qa-options-script
23
+ parallel: 5
24
+ variables:
25
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_multiple_db"
@@ -1,4 +1,4 @@
1
- ce:ci_decomposition:
1
+ ce:decomposition_single_db:
2
2
  extends:
3
3
  - .rules:ce-never-when-triggered-by-feature-flag-definition-change
4
4
  - .rules:ce-never-when-qa-tests-specified
@@ -9,9 +9,9 @@ ce:ci_decomposition:
9
9
  - .combined-gitlab-qa-options-script
10
10
  parallel: 5
11
11
  variables:
12
- GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config ci_decomposition"
12
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_single_db"
13
13
 
14
- ee:ci_decomposition:
14
+ ee:decomposition_single_db:
15
15
  extends:
16
16
  - .rules:ee-never-when-triggered-by-feature-flag-definition-change
17
17
  - .rules:ee-never-when-qa-tests-specified
@@ -22,4 +22,4 @@ ee:ci_decomposition:
22
22
  - .combined-gitlab-qa-options-script
23
23
  parallel: 5
24
24
  variables:
25
- GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config ci_decomposition"
25
+ GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_single_db"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (7.30.0)
4
+ gitlab-qa (7.31.0)
5
5
  activesupport (~> 6.1)
6
6
  gitlab (~> 4.18.0)
7
7
  http (~> 5.0)
@@ -997,12 +997,20 @@ This scenario is a composition of two orchestrated scenarios. It tests the conta
997
997
  GITLAB_TLS_CERTIFICATE=$(cat /path/to/certificate.crt) gitlab-qa Test::Integration::RegistryTLS EE --omnibus-config object_storage_aws
998
998
  ```
999
999
 
1000
- ### Test::Instance::Image EE --omnibus-config ci_decomposition
1000
+ ### Test::Instance::Image EE --omnibus-config decomposition_single_db
1001
1001
 
1002
- This scenario is to run tests against GitLab instance with [decomposed database](https://gitlab.com/groups/gitlab-org/-/epics/6160) on a single Postgres:
1002
+ 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:
1003
1003
 
1004
1004
  ```ruby
1005
- gitlab-qa Test::Instance::Image EE --omnibus-config ci_decomposition
1005
+ gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_single_db
1006
+ ```
1007
+
1008
+ ### Test::Instance::Image EE --omnibus-config decomposition_multiple_db
1009
+
1010
+ 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:
1011
+
1012
+ ```ruby
1013
+ gitlab-qa Test::Instance::Image EE --omnibus-config decomposition_multiple_db
1006
1014
  ```
1007
1015
 
1008
1016
  ### `Test::Instance::Geo EE|<full image address>:nightly|latest|any_tag http://geo-primary.gitlab http://geo-secondary.gitlab`
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'forwardable'
4
+ require 'fileutils'
4
5
 
5
6
  module Gitlab
6
7
  module QA
@@ -4,7 +4,7 @@ module Gitlab
4
4
  module QA
5
5
  module Runtime
6
6
  module OmnibusConfigurations
7
- class CiDecomposition < Default
7
+ class DecompositionMultipleDb < Default
8
8
  def configuration
9
9
  # HACK: commenting commands out as these commands should be run *after* the first
10
10
  # reconfiguration (see first command in #exec_commands)
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Gitlab
4
+ module QA
5
+ module Runtime
6
+ module OmnibusConfigurations
7
+ class DecompositionSingleDb < Default
8
+ def configuration
9
+ <<~OMNIBUS
10
+ gitlab_rails['databases']['main']['enable'] = true
11
+ gitlab_rails['databases']['ci']['enable'] = true
12
+ gitlab_rails['databases']['ci']['db_database'] = 'gitlabhq_production'
13
+ OMNIBUS
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.30.0'
5
+ VERSION = '7.31.0'
6
6
  end
7
7
  end
data/lib/gitlab/qa.rb CHANGED
@@ -20,7 +20,8 @@ module Gitlab
20
20
  autoload :ObjectStorageGcs, 'gitlab/qa/runtime/omnibus_configurations/object_storage_gcs'
21
21
  autoload :LicenseMode, 'gitlab/qa/runtime/omnibus_configurations/license_mode'
22
22
  autoload :RegistryObjectStorage, 'gitlab/qa/runtime/omnibus_configurations/registry_object_storage'
23
- autoload :CiDecomposition, 'gitlab/qa/runtime/omnibus_configurations/ci_decomposition'
23
+ autoload :DecompositionSingleDb, 'gitlab/qa/runtime/omnibus_configurations/decomposition_single_db'
24
+ autoload :DecompositionMultipleDb, 'gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db'
24
25
  end
25
26
  end
26
27
 
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'yaml'
4
+
3
5
  class GenerateQAJobs
4
6
  def initialize(no_of_example_files)
5
7
  @no_of_example_files = no_of_example_files
@@ -7,63 +9,82 @@ class GenerateQAJobs
7
9
  end
8
10
 
9
11
  # rubocop:disable Metrics/AbcSize
10
- # rubocop:disable Metrics/PerceivedComplexity
11
- # rubocop:disable Metrics/CyclomaticComplexity
12
12
  def execute
13
13
  jobs = load_yml_contents('base')
14
- jobs.concat(load_yml_contents('sanity_framework'))
15
- jobs.concat(load_yml_contents('custom_parallel'))
16
- jobs.concat(load_yml_contents('instance')) if should_run?('test_instance_all')
17
- jobs.concat(load_yml_contents('relative_url')) if should_run?('test_instance_all')
18
- jobs.concat(load_yml_contents('ci_decomposition')) if should_run?('test_instance_all')
19
- jobs.concat(load_yml_contents('repository_storage')) if should_run?('test_instance_all_repository_storage')
20
- jobs.concat(load_yml_contents('omnibus_image'))
21
- jobs.concat(load_yml_contents('update')) if should_run?('test_instance_all')
22
- jobs.concat(load_yml_contents('omnibus_upgrade'))
23
- jobs.concat(load_yml_contents('ee_previous_to_ce_update'))
24
- jobs.concat(load_yml_contents('mattermost')) if should_run?('test_integration_mattermost')
25
- jobs.concat(load_yml_contents('service_ping_disabled')) if should_run?('test_integration_servicepingdisabled')
26
- jobs.concat(load_yml_contents('ldap_no_tls')) if should_run?('test_integration_ldapnotls')
27
- jobs.concat(load_yml_contents('ldap_tls')) if should_run?('test_integration_ldaptls')
28
- jobs.concat(load_yml_contents('ldap_no_server')) if should_run?('test_integration_ldapnoserver')
29
- jobs.concat(load_yml_contents('instance_saml')) if should_run?('test_integration_instancesaml')
30
- jobs.concat(load_yml_contents('group_saml')) if should_run?('test_integration_groupsaml')
31
- jobs.concat(load_yml_contents('object_storage')) if should_run?('test_instance_all_object_storage')
32
- jobs.concat(load_yml_contents('object_storage_aws')) if should_run?('test_instance_all_object_storage')
33
- jobs.concat(load_yml_contents('object_storage_gcs')) if should_run?('test_instance_all_object_storage')
34
- jobs.concat(load_yml_contents('object_storage_registry_tls')) if should_run?('test_integration_registrytls')
35
- jobs.concat(load_yml_contents('registry')) if should_run?('test_integration_registry')
36
- jobs.concat(load_yml_contents('packages')) if should_run?('test_instance_all_packages')
37
- jobs.concat(load_yml_contents('elasticsearch')) if should_run?('test_integration_elasticsearch')
38
- jobs.concat(load_yml_contents('praefect')) if should_run?('test_instance_all')
39
- jobs.concat(load_yml_contents('gitaly_cluster')) if should_run?('test_instance_all')
40
- jobs.concat(load_yml_contents('mtls')) if should_run?('test_instance_all_mtls')
41
- jobs.concat(load_yml_contents('smtp')) if should_run?('test_integration_smtp')
42
- jobs.concat(load_yml_contents('jira')) if should_run?('test_instance_all_jira')
43
- jobs.concat(load_yml_contents('integrations')) if should_run?('test_instance_all_integrations')
44
- jobs.concat(load_yml_contents('large_setup')) if should_run?('test_instance_all_can_use_large_setup')
45
- jobs.concat(load_yml_contents('cloud_activation')) if should_run?('test_instance_all_cloud_activation')
46
- jobs.concat(load_yml_contents('registry_with_cdn')) if should_run?('test_integration_registrywithcdn')
47
- jobs.concat(load_yml_contents('staging'))
14
+ jobs.merge!(load_yml_contents('sanity_framework'))
15
+ jobs.merge!(load_yml_contents('custom_parallel'))
16
+ jobs.merge!(load_yml_contents('instance', should_automatically_run?('test_instance_all')))
17
+ jobs.merge!(load_yml_contents('relative_url', should_automatically_run?('test_instance_all')))
18
+ jobs.merge!(load_yml_contents('decomposition_single_db', should_automatically_run?('test_instance_all')))
19
+ jobs.merge!(load_yml_contents('decomposition_multiple_db', should_automatically_run?('test_instance_all')))
20
+ jobs.merge!(load_yml_contents('repository_storage', should_automatically_run?('test_instance_all_repository_storage')))
21
+ jobs.merge!(load_yml_contents('omnibus_image'))
22
+ jobs.merge!(load_yml_contents('update', should_automatically_run?('test_instance_all')))
23
+ jobs.merge!(load_yml_contents('omnibus_upgrade'))
24
+ jobs.merge!(load_yml_contents('ee_previous_to_ce_update'))
25
+ jobs.merge!(load_yml_contents('mattermost', should_automatically_run?('test_integration_mattermost')))
26
+ jobs.merge!(load_yml_contents('service_ping_disabled', should_automatically_run?('test_integration_servicepingdisabled')))
27
+ jobs.merge!(load_yml_contents('ldap_no_tls', should_automatically_run?('test_integration_ldapnotls')))
28
+ jobs.merge!(load_yml_contents('ldap_tls', should_automatically_run?('test_integration_ldaptls')))
29
+ jobs.merge!(load_yml_contents('ldap_no_server', should_automatically_run?('test_integration_ldapnoserver')))
30
+ jobs.merge!(load_yml_contents('instance_saml', should_automatically_run?('test_integration_instancesaml')))
31
+ jobs.merge!(load_yml_contents('group_saml', should_automatically_run?('test_integration_groupsaml')))
32
+ jobs.merge!(load_yml_contents('object_storage', should_automatically_run?('test_instance_all_object_storage')))
33
+ jobs.merge!(load_yml_contents('object_storage_aws', should_automatically_run?('test_instance_all_object_storage')))
34
+ jobs.merge!(load_yml_contents('object_storage_gcs', should_automatically_run?('test_instance_all_object_storage')))
35
+ jobs.merge!(load_yml_contents('object_storage_registry_tls', should_automatically_run?('test_integration_registrytls')))
36
+ jobs.merge!(load_yml_contents('registry', should_automatically_run?('test_integration_registry')))
37
+ jobs.merge!(load_yml_contents('packages', should_automatically_run?('test_instance_all_packages')))
38
+ jobs.merge!(load_yml_contents('elasticsearch', should_automatically_run?('test_integration_elasticsearch')))
39
+ jobs.merge!(load_yml_contents('praefect', should_automatically_run?('test_instance_all')))
40
+ jobs.merge!(load_yml_contents('gitaly_cluster', should_automatically_run?('test_instance_all')))
41
+ jobs.merge!(load_yml_contents('mtls', should_automatically_run?('test_instance_all_mtls')))
42
+ jobs.merge!(load_yml_contents('smtp', should_automatically_run?('test_integration_smtp')))
43
+ jobs.merge!(load_yml_contents('jira', should_automatically_run?('test_instance_all_jira')))
44
+ jobs.merge!(load_yml_contents('integrations', should_automatically_run?('test_instance_all_integrations')))
45
+ jobs.merge!(load_yml_contents('large_setup', should_automatically_run?('test_instance_all_can_use_large_setup')))
46
+ jobs.merge!(load_yml_contents('cloud_activation', should_automatically_run?('test_instance_all_cloud_activation')))
47
+ jobs.merge!(load_yml_contents('registry_with_cdn', should_automatically_run?('test_integration_registrywithcdn')))
48
+ jobs.merge!(load_yml_contents('staging'))
48
49
 
49
50
  # Disabling geo jobs temporarily due to https://gitlab.com/gitlab-org/quality/team-tasks/-/issues/774
50
- # base.concat(load_yml_contents('geo')) if should_run?('scenario_test_geo')
51
+ # jobs.merge!(load_yml_contents('geo', should_automatically_run?('scenario_test_geo')))
52
+
53
+ yaml_string = jobs.to_yaml
54
+ de_stringify_reference(yaml_string)
51
55
 
52
- jobs
56
+ yaml_string
53
57
  end
58
+
54
59
  # rubocop:enable Metrics/AbcSize
55
- # rubocop:enable Metrics/PerceivedComplexity
56
- # rubocop:enable Metrics/CyclomaticComplexity
57
60
 
58
61
  private
59
62
 
60
- def should_run?(example_file_name)
63
+ def should_automatically_run?(example_file_name)
61
64
  @no_of_example_files.include?(example_file_name)
62
65
  end
63
66
 
64
- def load_yml_contents(file_prefix)
67
+ def load_yml_contents(file_prefix, automatic = true)
65
68
  jobs_dir_path = File.expand_path('../.gitlab/ci/jobs', __dir__)
66
- File.read(File.join(jobs_dir_path, "#{file_prefix}.gitlab-ci.yml"))
69
+ file_contents = File.read(File.join(jobs_dir_path, "#{file_prefix}.gitlab-ci.yml"))
70
+
71
+ # Enclose !reference in double quotes at it is not supported with YAML.load
72
+ stringify_reference(file_contents)
73
+ yaml_hash = YAML.safe_load(file_contents)
74
+
75
+ yaml_hash.each { |key, value| value.merge!("when" => "manual") } unless automatic
76
+
77
+ yaml_hash
78
+ end
79
+
80
+ def stringify_reference(str)
81
+ match_data = str.match(/!reference \[[a-zA-Z_, ]*\]/)
82
+ str.gsub!(match_data[0], "\"#{match_data[0]}\"") if match_data
83
+ end
84
+
85
+ def de_stringify_reference(str)
86
+ match_data = str.match(/"(!reference \[[a-zA-Z_, ]*\])"/)
87
+ str.gsub!(match_data[0], match_data[1]) if match_data
67
88
  end
68
89
  end
69
90
 
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: 7.30.0
4
+ version: 7.31.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: 2022-06-06 00:00:00.000000000 Z
11
+ date: 2022-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -219,9 +219,10 @@ files:
219
219
  - ".gitignore"
220
220
  - ".gitlab-ci.yml"
221
221
  - ".gitlab/ci/jobs/base.gitlab-ci.yml"
222
- - ".gitlab/ci/jobs/ci_decomposition.gitlab-ci.yml"
223
222
  - ".gitlab/ci/jobs/cloud_activation.gitlab-ci.yml"
224
223
  - ".gitlab/ci/jobs/custom_parallel.gitlab-ci.yml"
224
+ - ".gitlab/ci/jobs/decomposition_multiple_db.gitlab-ci.yml"
225
+ - ".gitlab/ci/jobs/decomposition_single_db.gitlab-ci.yml"
225
226
  - ".gitlab/ci/jobs/ee_previous_to_ce_update.gitlab-ci.yml"
226
227
  - ".gitlab/ci/jobs/elasticsearch.gitlab-ci.yml"
227
228
  - ".gitlab/ci/jobs/geo.gitlab-ci.yml"
@@ -336,7 +337,8 @@ files:
336
337
  - lib/gitlab/qa/runtime/env.rb
337
338
  - lib/gitlab/qa/runtime/logger.rb
338
339
  - lib/gitlab/qa/runtime/omnibus_configuration.rb
339
- - lib/gitlab/qa/runtime/omnibus_configurations/ci_decomposition.rb
340
+ - lib/gitlab/qa/runtime/omnibus_configurations/decomposition_multiple_db.rb
341
+ - lib/gitlab/qa/runtime/omnibus_configurations/decomposition_single_db.rb
340
342
  - lib/gitlab/qa/runtime/omnibus_configurations/default.rb
341
343
  - lib/gitlab/qa/runtime/omnibus_configurations/license_mode.rb
342
344
  - lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb