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 +4 -4
- data/.gitignore +3 -0
- data/.gitlab/ci/jobs/decomposition_multiple_db.gitlab-ci.yml +25 -0
- data/.gitlab/ci/jobs/{ci_decomposition.gitlab-ci.yml → decomposition_single_db.gitlab-ci.yml} +4 -4
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +11 -3
- data/lib/gitlab/qa/runtime/logger.rb +1 -0
- data/lib/gitlab/qa/runtime/omnibus_configurations/{ci_decomposition.rb → decomposition_multiple_db.rb} +1 -1
- data/lib/gitlab/qa/runtime/omnibus_configurations/decomposition_single_db.rb +19 -0
- data/lib/gitlab/qa/version.rb +1 -1
- data/lib/gitlab/qa.rb +2 -1
- data/scripts/generate-qa-jobs.rb +64 -43
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950731b29895b80ed3a174ade472d58c7496fc60620959224790f007a0beff79
|
4
|
+
data.tar.gz: 66d92f34024e8c9a4b679424c0f1994713ac7180eadd875f732d8c4d8f741a9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fab55c1cfbcaa92e9b24156a61d1314e28565be51c1d0e06387445554f25dd1f170f192d2784a2d1bd40d7ff28de484ceba9830bcb16dd1d792a11c2253171c8
|
7
|
+
data.tar.gz: 663d5d28fa646a0b19ac84b292b61879b8ebc238657d99928d10ffee995dfc12dd56419cfbdd5cf1b9384c665dc6e54cedde4136c2b32fd4810982821f2cd4af
|
data/.gitignore
CHANGED
@@ -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"
|
data/.gitlab/ci/jobs/{ci_decomposition.gitlab-ci.yml → decomposition_single_db.gitlab-ci.yml}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
ce:
|
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
|
12
|
+
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_single_db"
|
13
13
|
|
14
|
-
ee:
|
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
|
25
|
+
GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config decomposition_single_db"
|
data/Gemfile.lock
CHANGED
@@ -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
|
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)
|
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
|
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`
|
@@ -4,7 +4,7 @@ module Gitlab
|
|
4
4
|
module QA
|
5
5
|
module Runtime
|
6
6
|
module OmnibusConfigurations
|
7
|
-
class
|
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
|
data/lib/gitlab/qa/version.rb
CHANGED
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 :
|
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
|
|
data/scripts/generate-qa-jobs.rb
CHANGED
@@ -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.
|
15
|
-
jobs.
|
16
|
-
jobs.
|
17
|
-
jobs.
|
18
|
-
jobs.
|
19
|
-
jobs.
|
20
|
-
jobs.
|
21
|
-
jobs.
|
22
|
-
jobs.
|
23
|
-
jobs.
|
24
|
-
jobs.
|
25
|
-
jobs.
|
26
|
-
jobs.
|
27
|
-
jobs.
|
28
|
-
jobs.
|
29
|
-
jobs.
|
30
|
-
jobs.
|
31
|
-
jobs.
|
32
|
-
jobs.
|
33
|
-
jobs.
|
34
|
-
jobs.
|
35
|
-
jobs.
|
36
|
-
jobs.
|
37
|
-
jobs.
|
38
|
-
jobs.
|
39
|
-
jobs.
|
40
|
-
jobs.
|
41
|
-
jobs.
|
42
|
-
jobs.
|
43
|
-
jobs.
|
44
|
-
jobs.
|
45
|
-
jobs.
|
46
|
-
jobs.
|
47
|
-
jobs.
|
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
|
-
#
|
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
|
-
|
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
|
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.
|
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-
|
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/
|
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
|