gitlab-qa 15.4.0 → 15.6.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/.gitlab/ci/omnibus.gitlab-ci.yml +15 -0
- data/.gitlab/ci/versions.yml +6 -0
- data/.gitlab-ci.yml +15 -15
- data/.rubocop_todo.yml +0 -1
- data/Gemfile.lock +1 -1
- data/docs/what_tests_can_be_run.md +14 -2
- data/lib/gitlab/qa/component/base.rb +5 -1
- data/lib/gitlab/qa/component/gitaly.rb +7 -6
- data/lib/gitlab/qa/component/gitlab.rb +2 -2
- data/lib/gitlab/qa/component/specs.rb +24 -12
- data/lib/gitlab/qa/runtime/env.rb +12 -14
- data/lib/gitlab/qa/scenario/test/instance/airgapped.rb +3 -3
- data/lib/gitlab/qa/scenario/test/instance/any.rb +1 -0
- data/lib/gitlab/qa/scenario/test/instance/repository_storage.rb +12 -13
- data/lib/gitlab/qa/scenario/test/integration/gitaly_cluster.rb +3 -3
- data/lib/gitlab/qa/scenario/test/integration/mtls.rb +8 -9
- data/lib/gitlab/qa/scenario/test/integration/praefect.rb +5 -5
- data/lib/gitlab/qa/version.rb +1 -1
- data/rubocop/cop/gitlab/dangerous_interpolation.rb +0 -1
- metadata +4 -9
- data/lib/gitlab/qa/component/suggested_reviewer.rb +0 -47
- data/lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb +0 -62
- data/support/manifests/suggested_reviewer/authenticator.yaml +0 -41
- data/support/manifests/suggested_reviewer/postgres.yaml +0 -84
- data/support/manifests/suggested_reviewer/pubsub.yaml +0 -41
- data/support/manifests/suggested_reviewer/recommender-bot.yaml +0 -242
- data/support/manifests/suggested_reviewer/recommender.yaml +0 -52
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b800bf0843ad8f6c636de6f83713ed9c6c631d90d4140ce14670e88af7228be9
|
|
4
|
+
data.tar.gz: 90b75c71cd03df92f810505e5f1c920845f482d508aff47fdd9a40041cfe9521
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b73f4e3a80917e77422b1a49ce6e2c2ea6525d9c5bc6ceac42495e781baa555ba2b96b2f22bee9bef7eeaa5def8053758ae71ee762bba046674a75015e2d06e
|
|
7
|
+
data.tar.gz: ef66c9ed5786f1cc3bc2d31b6b75929c94a3737ed1af492b5d73992c2f0fa63f08d5726da3c69ba6485f8892c7e8b0b0c9d61ceedbdf655b30a4fc3fafcd56f1
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
include:
|
|
2
|
+
- project: gitlab-org/gitlab
|
|
3
|
+
ref: master
|
|
4
|
+
file: .gitlab/ci/test-on-omnibus/main.gitlab-ci.yml
|
|
5
|
+
|
|
6
|
+
# Override git strategy because pipeline template is designed to install 'gitlab-qa' from rubygems and thus does not require
|
|
7
|
+
# cloning the project, yet here we need to clone repo to run 'gitlab-qa' with all local changes
|
|
8
|
+
|
|
9
|
+
cache-gitlab-qa:
|
|
10
|
+
variables:
|
|
11
|
+
GIT_STRATEGY: clone
|
|
12
|
+
|
|
13
|
+
.omnibus-e2e:
|
|
14
|
+
variables:
|
|
15
|
+
GIT_STRATEGY: clone
|
data/.gitlab-ci.yml
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
- vendor/ruby
|
|
9
9
|
|
|
10
10
|
include:
|
|
11
|
+
- local: .gitlab/ci/versions.yml
|
|
11
12
|
- component: ${CI_SERVER_FQDN}/gitlab-org/components/danger-review/danger-review@1.4.0
|
|
12
13
|
inputs:
|
|
13
|
-
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}"
|
|
14
|
+
job_image: "${CI_REGISTRY}/gitlab-org/gitlab-build-images/ci/debian-${DEBIAN_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}"
|
|
14
15
|
job_stage: "check"
|
|
15
16
|
- component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
|
|
16
17
|
|
|
@@ -21,7 +22,7 @@ stages:
|
|
|
21
22
|
- deploy
|
|
22
23
|
|
|
23
24
|
default:
|
|
24
|
-
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}
|
|
25
|
+
image: ${CI_REGISTRY}/gitlab-org/gitlab-build-images/ci/debian-${DEBIAN_VERSION}-slim-ruby-${RUBY_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-${GIT_VERSION}
|
|
25
26
|
tags:
|
|
26
27
|
- gitlab-org
|
|
27
28
|
cache:
|
|
@@ -42,9 +43,6 @@ workflow:
|
|
|
42
43
|
- if: '$CI_PIPELINE_SOURCE == "web"'
|
|
43
44
|
|
|
44
45
|
variables:
|
|
45
|
-
DEBIAN_VERSION: bookworm
|
|
46
|
-
DOCKER_VERSION: "24.0.5"
|
|
47
|
-
RUBY_VERSION: "3.1.5"
|
|
48
46
|
BUNDLE_PATH: vendor
|
|
49
47
|
BUNDLE_SILENCE_ROOT_WARNING: "true"
|
|
50
48
|
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
|
|
@@ -55,7 +53,7 @@ variables:
|
|
|
55
53
|
- if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/)'
|
|
56
54
|
changes: ["lib/**/version.rb"]
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
test-on-omnibus-env:
|
|
59
57
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
|
|
60
58
|
stage: .pre
|
|
61
59
|
variables:
|
|
@@ -71,11 +69,13 @@ package-and-test-env:
|
|
|
71
69
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
72
70
|
changes:
|
|
73
71
|
- Gemfile.lock
|
|
72
|
+
- .gitlab/ci/versions.yml
|
|
74
73
|
variables:
|
|
75
74
|
UPDATE_QA_CACHE: "true"
|
|
76
75
|
- if: '$CI_MERGE_REQUEST_IID'
|
|
77
76
|
changes:
|
|
78
77
|
- Gemfile.lock
|
|
78
|
+
- .gitlab/ci/versions.yml
|
|
79
79
|
variables:
|
|
80
80
|
UPDATE_QA_CACHE: "true"
|
|
81
81
|
- when: always
|
|
@@ -94,9 +94,11 @@ cache-gems:
|
|
|
94
94
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
95
95
|
changes:
|
|
96
96
|
- Gemfile.lock
|
|
97
|
+
- .gitlab/ci/versions.yml
|
|
97
98
|
- if: '$CI_MERGE_REQUEST_IID'
|
|
98
99
|
changes:
|
|
99
100
|
- Gemfile.lock
|
|
101
|
+
- .gitlab/ci/versions.yml
|
|
100
102
|
|
|
101
103
|
danger-review:
|
|
102
104
|
needs:
|
|
@@ -125,10 +127,10 @@ rspec:
|
|
|
125
127
|
coverage_format: cobertura
|
|
126
128
|
path: coverage/coverage.xml
|
|
127
129
|
|
|
128
|
-
|
|
130
|
+
test-on-omnibus:
|
|
129
131
|
stage: qa
|
|
130
132
|
needs:
|
|
131
|
-
-
|
|
133
|
+
- test-on-omnibus-env
|
|
132
134
|
variables:
|
|
133
135
|
RELEASE: EE
|
|
134
136
|
RUN_WITH_BUNDLE: "true"
|
|
@@ -136,25 +138,23 @@ package-and-test:
|
|
|
136
138
|
SKIP_REPORT_IN_ISSUES: "true"
|
|
137
139
|
UPDATE_QA_CACHE: $UPDATE_QA_CACHE
|
|
138
140
|
GITLAB_QA_CACHE_KEY: $GITLAB_QA_CACHE_KEY
|
|
139
|
-
|
|
141
|
+
RUN_ALL_TESTS: "true"
|
|
142
|
+
QA_PATH: "."
|
|
143
|
+
QA_RETRY_FAILED_SPECS: "false" # do not retry test failures as gitlab-qa mostly affect deploy part only
|
|
140
144
|
QA_RUN_TYPE: gitlab-qa
|
|
141
145
|
QA_EXPORT_TEST_METRICS: "false" # skip metrics export as this pipeline is only used to validate gitlab-qa changes
|
|
142
146
|
inherit:
|
|
143
147
|
variables:
|
|
144
148
|
- RUBY_VERSION
|
|
145
149
|
- DEBIAN_VERSION
|
|
146
|
-
- DOCKER_VERSION
|
|
147
150
|
trigger:
|
|
151
|
+
include: .gitlab/ci/omnibus.gitlab-ci.yml
|
|
148
152
|
strategy: depend
|
|
149
153
|
forward:
|
|
150
154
|
yaml_variables: true
|
|
151
155
|
pipeline_variables: true
|
|
152
|
-
include:
|
|
153
|
-
- project: gitlab-org/gitlab
|
|
154
|
-
ref: master
|
|
155
|
-
file: .gitlab/ci/test-on-omnibus/main.gitlab-ci.yml
|
|
156
156
|
rules:
|
|
157
157
|
- if: '$CI_MERGE_REQUEST_IID'
|
|
158
158
|
when: manual
|
|
159
159
|
allow_failure: true
|
|
160
|
-
-
|
|
160
|
+
- if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable$/'
|
data/.rubocop_todo.yml
CHANGED
|
@@ -54,7 +54,6 @@ Metrics/AbcSize:
|
|
|
54
54
|
- 'lib/gitlab/qa/scenario/test/integration/registry_tls.rb'
|
|
55
55
|
- 'lib/gitlab/qa/scenario/test/integration/registry_with_cdn.rb'
|
|
56
56
|
- 'lib/gitlab/qa/scenario/test/integration/smtp.rb'
|
|
57
|
-
- 'lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb'
|
|
58
57
|
|
|
59
58
|
# Offense count: 2
|
|
60
59
|
# Configuration parameters: CheckIdentifiers, CheckConstants, CheckVariables, CheckStrings, CheckSymbols, CheckComments, CheckFilepaths, FlaggedTerms.
|
data/Gemfile.lock
CHANGED
|
@@ -56,8 +56,7 @@ All environment variables used by GitLab QA should be defined in [`lib/gitlab/qa
|
|
|
56
56
|
| `CHROME_DISABLE_DEV_SHM` | `false` | Set to `true` to disable `/dev/shm` usage in Chrome on Linux. | No|
|
|
57
57
|
| `QA_ADDITIONAL_REPOSITORY_STORAGE` |- | The name of additional, non-default storage to be used with tests tagged `repository_storage`, run via the `Test::Instance::RepositoryStorage` scenario. Note: Admin access is required to change repository storage. | No|
|
|
58
58
|
| `QA_PRAEFECT_REPOSITORY_STORAGE` |- | The name of repository storage using Praefect. Note: Admin access is required to change repository storage. | No|
|
|
59
|
-
| `QA_COOKIES` |- | Optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true". | No|
|
|
60
|
-
| `QA_DEBUG` |- | Set to `true` to verbosely log page object actions. Note: if enabled be aware that sensitive data might be logged. If an input element has a QA selector with `password` in the name, data entered into the input element will be masked. If the element doesn't have `password` in its name it won't be masked. | No|
|
|
59
|
+
| `QA_COOKIES` |- | Optionally set to "cookie1=value;cookie2=value" in order to add a cookie to every request. This can be used to set the canary cookie by setting it to "gitlab_canary=true", or to use a different cell e.g. "_gitlab_session=cell-2-please". | No|
|
|
61
60
|
| `QA_LOG_LEVEL` | `info` | Logging level to use for gitlab-qa output and qa tests output | No|
|
|
62
61
|
| `QA_LOG_PATH` | `QA_ARTIFACTS_DIR` | Path to output debug logging to. | No|
|
|
63
62
|
| `QA_CAN_TEST_GIT_PROTOCOL_V2` | `true` | Set to `false` to skip tests that require Git protocol v2 if your environment doesn't support it. | No|
|
|
@@ -864,6 +863,19 @@ $ export QA_PRAEFECT_REPOSITORY_STORAGE="nfs-file22"
|
|
|
864
863
|
$ gitlab-qa Test::Instance::Staging -- --tag smoke
|
|
865
864
|
```
|
|
866
865
|
|
|
866
|
+
#### Testing Against Different Cells
|
|
867
|
+
|
|
868
|
+
When running tests against GitLab instances that use a [cells architecture](https://docs.gitlab.com/ee/architecture/blueprints/cells/), you can target specific cells by setting the GitLab session cookie. This is useful for testing cell-specific functionality or debugging issues within a particular cell.
|
|
869
|
+
|
|
870
|
+
To direct tests to a specific cell, use the `QA_COOKIES` environment variable to set the `_gitlab_session` cookie with the target cell identifier:
|
|
871
|
+
|
|
872
|
+
```shell
|
|
873
|
+
$ export QA_COOKIES="_gitlab_session=cell-2-please"
|
|
874
|
+
$ gitlab-qa Test::Instance::Staging
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
**Note:** The actual cell identifiers depend on your GitLab instance configuration. Check with your GitLab administrator for the correct cell names in your environment.
|
|
878
|
+
|
|
867
879
|
### `Test::Instance::StagingRef`
|
|
868
880
|
|
|
869
881
|
This scenario tests that the [`Staging Ref`](https://staging-ref.gitlab.com)
|
|
@@ -176,6 +176,10 @@ module Gitlab
|
|
|
176
176
|
exec_commands.each { |command| docker.exec(name, command) }
|
|
177
177
|
end
|
|
178
178
|
|
|
179
|
+
def get_reconfigure_log_file_from_artifact
|
|
180
|
+
nil
|
|
181
|
+
end
|
|
182
|
+
|
|
179
183
|
private
|
|
180
184
|
|
|
181
185
|
attr_reader :exec_commands, :wait_until_ready, :reconfigure
|
|
@@ -200,7 +204,7 @@ module Gitlab
|
|
|
200
204
|
wait_until_ready
|
|
201
205
|
process_exec_commands
|
|
202
206
|
rescue Support::ShellCommand::StatusError => e
|
|
203
|
-
reconfigure_log_file =
|
|
207
|
+
reconfigure_log_file = get_reconfigure_log_file_from_artifact
|
|
204
208
|
# for scenarios where a service fails during startup, attempt to retry to avoid flaky failures
|
|
205
209
|
if (retries += 1) < 3
|
|
206
210
|
unless reconfigure_log_file.nil?
|
|
@@ -68,15 +68,16 @@ module Gitlab
|
|
|
68
68
|
'listen_addr': '0.0.0.0:#{gitaly_port}',
|
|
69
69
|
'prometheus_listen_addr': '0.0.0.0:9236',
|
|
70
70
|
'auth_token': 'PRAEFECT_INTERNAL_TOKEN',
|
|
71
|
-
'transactions': {'enabled': #{Runtime::Env.qa_gitaly_transactions_enabled?}}
|
|
71
|
+
'transactions': {'enabled': #{Runtime::Env.qa_gitaly_transactions_enabled?}},
|
|
72
|
+
storage: [
|
|
73
|
+
{
|
|
74
|
+
name: '#{name}',
|
|
75
|
+
path: '/var/opt/gitlab/git-data/repositories',
|
|
76
|
+
},
|
|
77
|
+
]
|
|
72
78
|
}
|
|
73
79
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
|
74
80
|
gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
|
|
75
|
-
git_data_dirs({
|
|
76
|
-
'#{name}' => {
|
|
77
|
-
'path' => '/var/opt/gitlab/git-data'
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
81
|
OMNIBUS
|
|
81
82
|
end
|
|
82
83
|
end
|
|
@@ -213,7 +213,7 @@ module Gitlab
|
|
|
213
213
|
log_file
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
-
def
|
|
216
|
+
def get_reconfigure_log_file_from_artifact
|
|
217
217
|
all_reconfigure_log_file = Dir["#{Runtime::Env.host_artifacts_dir}/*reconfigure.log"].sort_by { |f| File.mtime(f) }
|
|
218
218
|
all_reconfigure_log_file.last
|
|
219
219
|
end
|
|
@@ -229,7 +229,7 @@ module Gitlab
|
|
|
229
229
|
|
|
230
230
|
if line.include?('There was an error running gitlab-ctl reconfigure')
|
|
231
231
|
Runtime::Logger.error(
|
|
232
|
-
"Failure while running gitlab-ctl reconfigure command. Please check the #{log_file_path}
|
|
232
|
+
"Failure while running gitlab-ctl reconfigure command. Please check the #{log_file_path} artifact for more info"
|
|
233
233
|
)
|
|
234
234
|
end
|
|
235
235
|
|
|
@@ -60,19 +60,21 @@ module Gitlab
|
|
|
60
60
|
|
|
61
61
|
docker_pull_qa_image_if_needed
|
|
62
62
|
|
|
63
|
-
Runtime::Logger.info("Running test suite `#{suite}` for #{release.project_name}")
|
|
64
|
-
|
|
65
63
|
name = "#{release.project_name}-qa-#{SecureRandom.hex(4)}"
|
|
66
|
-
run_specs(name)
|
|
67
|
-
rescue Support::ShellCommand::StatusError => e
|
|
68
|
-
raise e unless retry_failed_specs
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
begin
|
|
66
|
+
Runtime::Logger.info("Running test suite `#{suite}` for #{release.project_name}")
|
|
67
|
+
run_specs(name)
|
|
68
|
+
rescue Support::ShellCommand::StatusError => e
|
|
69
|
+
raise e unless retry_failed_specs
|
|
70
|
+
|
|
71
|
+
Runtime::Logger.warn("Initial test run failed, attempting to retry failed specs in new process!")
|
|
72
|
+
results_file = File.join(host_artifacts_dir(name), LAST_RUN_FILE)
|
|
73
|
+
raise e unless valid_last_run_file?(results_file)
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
Runtime::Logger.debug("Found initial run results file '#{results_file}', retrying failed specs!")
|
|
76
|
+
run_specs(name, retry_process: true, initial_run_results_host_path: results_file)
|
|
77
|
+
end
|
|
76
78
|
end
|
|
77
79
|
|
|
78
80
|
def suite=(suite)
|
|
@@ -156,9 +158,19 @@ module Gitlab
|
|
|
156
158
|
end
|
|
157
159
|
|
|
158
160
|
def docker_pull_qa_image_if_needed
|
|
159
|
-
|
|
161
|
+
if release.login_params
|
|
162
|
+
begin
|
|
163
|
+
@docker.login(**release.login_params)
|
|
164
|
+
rescue Support::ShellCommand::StatusError => e
|
|
165
|
+
raise "Failed to login to Docker registry: #{e.message}"
|
|
166
|
+
end
|
|
167
|
+
end
|
|
160
168
|
|
|
161
|
-
|
|
169
|
+
begin
|
|
170
|
+
@docker.pull(image: qa_image) unless Runtime::Env.skip_pull?
|
|
171
|
+
rescue Support::ShellCommand::StatusError => e
|
|
172
|
+
raise "Failed to pull gitlab-qa image: #{e.message}"
|
|
173
|
+
end
|
|
162
174
|
end
|
|
163
175
|
|
|
164
176
|
def args_with_flags(feature_flag_set, retry_process: false)
|
|
@@ -107,7 +107,6 @@ module Gitlab
|
|
|
107
107
|
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
|
108
108
|
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
|
109
109
|
'QA_COOKIES' => :qa_cookie,
|
|
110
|
-
'QA_DEBUG' => :qa_debug,
|
|
111
110
|
'QA_DOCKER_NETWORK' => :docker_network,
|
|
112
111
|
'QA_EXPORT_TEST_METRICS' => :qa_export_test_metrics,
|
|
113
112
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
|
@@ -167,8 +166,7 @@ module Gitlab
|
|
|
167
166
|
'WORKSPACES_OAUTH_SIGNING_KEY' => :workspaces_oauth_signing_key,
|
|
168
167
|
'WORKSPACES_PROXY_DOMAIN' => :workspaces_proxy_domain,
|
|
169
168
|
'WORKSPACES_WILDCARD_CERT' => { name: :workspaces_wildcard_cert, type: :file },
|
|
170
|
-
'WORKSPACES_WILDCARD_KEY' => { name: :workspaces_wildcard_key, type: :file }
|
|
171
|
-
'EPIC_SYNC_TEST' => :epic_sync_test
|
|
169
|
+
'WORKSPACES_WILDCARD_KEY' => { name: :workspaces_wildcard_key, type: :file }
|
|
172
170
|
}.freeze
|
|
173
171
|
|
|
174
172
|
def variables
|
|
@@ -177,14 +175,8 @@ module Gitlab
|
|
|
177
175
|
value ||= send(method_name) # rubocop:disable GitlabSecurity/PublicSend
|
|
178
176
|
vars[env_var_name] = value if value
|
|
179
177
|
end
|
|
180
|
-
qa_variables = ENV.each_with_object({}) do |(name, _value), vars|
|
|
181
|
-
next unless name.start_with?('QA_')
|
|
182
178
|
|
|
183
|
-
|
|
184
|
-
vars[name] = var_name if var_name
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
qa_variables.merge(defined_variables)
|
|
179
|
+
qa_ci_variables.merge(defined_variables)
|
|
188
180
|
end
|
|
189
181
|
|
|
190
182
|
def admin_password
|
|
@@ -199,10 +191,6 @@ module Gitlab
|
|
|
199
191
|
variables.select { |k, _| ENV_VARIABLES[k].is_a?(Hash) && ENV_VARIABLES[k][:type] == :file }.values
|
|
200
192
|
end
|
|
201
193
|
|
|
202
|
-
def debug?
|
|
203
|
-
enabled?(ENV.fetch('QA_DEBUG', nil), default: true)
|
|
204
|
-
end
|
|
205
|
-
|
|
206
194
|
def log_level
|
|
207
195
|
env_var_value_if_defined('QA_LOG_LEVEL')&.upcase || 'INFO'
|
|
208
196
|
end
|
|
@@ -486,6 +474,16 @@ module Gitlab
|
|
|
486
474
|
|
|
487
475
|
private
|
|
488
476
|
|
|
477
|
+
def qa_ci_variables
|
|
478
|
+
prefixes = %w[QA_ GLCI_]
|
|
479
|
+
ENV.each_with_object({}) do |(name, _value), vars|
|
|
480
|
+
next unless prefixes.any? { |prefix| name.start_with?(prefix) }
|
|
481
|
+
|
|
482
|
+
var_name = env_var_name_if_defined(name)
|
|
483
|
+
vars[name] = var_name if var_name
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
|
|
489
487
|
def enabled?(value, default: true)
|
|
490
488
|
return default if value.nil?
|
|
491
489
|
|
|
@@ -102,12 +102,12 @@ module Gitlab
|
|
|
102
102
|
<<~OMNIBUS
|
|
103
103
|
external_url 'http://#{config.gitlab_name}.#{iptables_restricted_network}';
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
gitlab_rails['repositories_storages'] = {
|
|
106
106
|
'default' => {
|
|
107
|
-
'gitaly_address' =>
|
|
107
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
|
108
108
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
|
109
109
|
}
|
|
110
|
-
}
|
|
110
|
+
};
|
|
111
111
|
gitaly['enable'] = false;
|
|
112
112
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
|
113
113
|
prometheus['scrape_configs'] = [
|
|
@@ -14,6 +14,7 @@ module Gitlab
|
|
|
14
14
|
Component::Specs.perform do |specs|
|
|
15
15
|
specs.suite = 'Test::Instance::All'
|
|
16
16
|
specs.release = QA::Release.new(edition_and_tag)
|
|
17
|
+
specs.network = Runtime::Env.docker_network if ENV['QA_DOCKER_NETWORK']
|
|
17
18
|
specs.args = [address, *rspec_args]
|
|
18
19
|
end
|
|
19
20
|
end
|
|
@@ -47,20 +47,19 @@ module Gitlab
|
|
|
47
47
|
<<~OMNIBUS
|
|
48
48
|
external_url 'http://gitlab.test';
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
gitlab_rails['repositories_storages'] = {
|
|
51
|
+
"default" => {
|
|
52
|
+
"gitaly_address" => "tcp://praefect.test:2305",
|
|
53
|
+
"gitaly_token" => "PRAEFECT_EXTERNAL_TOKEN"
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'path' => '/var/opt/gitlab/git-data/gitaly'
|
|
55
|
+
"gitaly" => {
|
|
56
|
+
"gitaly_address" => "tcp://gitlab.test:8075"
|
|
58
57
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
'path' => '/var/opt/gitlab/git-data/secondary'
|
|
58
|
+
"secondary" => {
|
|
59
|
+
"gitaly_address" => "tcp://gitlab.test:8075"
|
|
62
60
|
}
|
|
63
|
-
}
|
|
61
|
+
};
|
|
62
|
+
|
|
64
63
|
gitaly['enable'] = true;
|
|
65
64
|
gitaly['configuration'] = {
|
|
66
65
|
auth: {
|
|
@@ -70,11 +69,11 @@ module Gitlab
|
|
|
70
69
|
storage: [
|
|
71
70
|
{
|
|
72
71
|
name: 'gitaly',
|
|
73
|
-
path: '/var/opt/gitlab/git-data/gitaly',
|
|
72
|
+
path: '/var/opt/gitlab/git-data/gitaly/repositories',
|
|
74
73
|
},
|
|
75
74
|
{
|
|
76
75
|
name: 'secondary',
|
|
77
|
-
path: '/var/opt/gitlab/git-data/secondary',
|
|
76
|
+
path: '/var/opt/gitlab/git-data/secondary/repositories',
|
|
78
77
|
},
|
|
79
78
|
],
|
|
80
79
|
};
|
|
@@ -51,12 +51,12 @@ module Gitlab
|
|
|
51
51
|
<<~OMNIBUS
|
|
52
52
|
external_url 'http://#{config.gitlab_name}.#{config.network}';
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
gitlab_rails['repositories_storages'] = {
|
|
55
55
|
'default' => {
|
|
56
|
-
'gitaly_address' =>
|
|
56
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
|
57
57
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
};
|
|
60
60
|
gitaly['enable'] = false;
|
|
61
61
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
|
62
62
|
prometheus['scrape_configs'] = [
|
|
@@ -73,10 +73,14 @@ module Gitlab
|
|
|
73
73
|
gitlab_rails['gitaly_token'] = 'abc123secret';
|
|
74
74
|
gitlab_shell['secret_token'] = 'shellsecret';
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
'default' => {
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
gitlab_rails['repositories_storages'] = {
|
|
77
|
+
'default' => {
|
|
78
|
+
'gitaly_address' => "tls://#{@gitaly_name}.#{@network}:9999"
|
|
79
|
+
},
|
|
80
|
+
'storage1' => {
|
|
81
|
+
'gitaly_address' => "tls://#{@gitaly_name}.#{@network}:9999"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
80
84
|
OMNIBUS
|
|
81
85
|
end
|
|
82
86
|
|
|
@@ -118,11 +122,6 @@ module Gitlab
|
|
|
118
122
|
gitlab_shell['secret_token'] = 'shellsecret';
|
|
119
123
|
|
|
120
124
|
gitlab_rails['internal_api_url'] = 'https://#{@gitlab_name}.#{@network}';
|
|
121
|
-
|
|
122
|
-
git_data_dirs({
|
|
123
|
-
'default' => { 'path' => '/var/opt/gitlab/git-data' },
|
|
124
|
-
'storage1' => { 'path' => '/mnt/gitlab/git-data' },
|
|
125
|
-
})
|
|
126
125
|
OMNIBUS
|
|
127
126
|
end
|
|
128
127
|
end
|
|
@@ -19,16 +19,16 @@ module Gitlab
|
|
|
19
19
|
<<~OMNIBUS
|
|
20
20
|
external_url 'http://#{config.gitlab_name}.#{config.network}';
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
gitlab_rails['repositories_storages'] = {
|
|
23
23
|
'default' => {
|
|
24
|
-
'gitaly_address' =>
|
|
24
|
+
'gitaly_address' => "tcp://#{config.praefect_addr}:#{config.praefect_port}",
|
|
25
25
|
'gitaly_token' => 'PRAEFECT_EXTERNAL_TOKEN'
|
|
26
26
|
},
|
|
27
27
|
'gitaly' => {
|
|
28
|
-
'gitaly_address' =>
|
|
29
|
-
'path' => '/var/opt/gitlab/git-data'
|
|
28
|
+
'gitaly_address' => "tcp://#{config.gitlab_name}.#{config.network}:8075"
|
|
30
29
|
}
|
|
31
|
-
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
32
|
gitaly['enable'] = true;
|
|
33
33
|
gitaly['configuration'] = {
|
|
34
34
|
auth: {
|
data/lib/gitlab/qa/version.rb
CHANGED
|
@@ -38,7 +38,6 @@ module RuboCop
|
|
|
38
38
|
'QA_ADDITIONAL_REPOSITORY_STORAGE' => :qa_additional_repository_storage,
|
|
39
39
|
'QA_PRAEFECT_REPOSITORY_STORAGE' => :qa_praefect_repository_storage,
|
|
40
40
|
'QA_GITALY_NON_CLUSTER_STORAGE' => :qa_gitaly_non_cluster_storage,
|
|
41
|
-
'QA_DEBUG' => :qa_debug,
|
|
42
41
|
'QA_CAN_TEST_ADMIN_FEATURES' => :qa_can_test_admin_features,
|
|
43
42
|
'QA_CAN_TEST_GIT_PROTOCOL_V2' => :qa_can_test_git_protocol_v2,
|
|
44
43
|
'QA_CAN_TEST_PRAEFECT' => :qa_can_test_praefect,
|
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: 15.
|
|
4
|
+
version: 15.6.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: 2025-
|
|
11
|
+
date: 2025-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|
|
@@ -354,6 +354,8 @@ files:
|
|
|
354
354
|
- ".gitignore"
|
|
355
355
|
- ".gitlab-ci.yml"
|
|
356
356
|
- ".gitlab/changelog_config.yml"
|
|
357
|
+
- ".gitlab/ci/omnibus.gitlab-ci.yml"
|
|
358
|
+
- ".gitlab/ci/versions.yml"
|
|
357
359
|
- ".gitlab/issue_templates/Default.md"
|
|
358
360
|
- ".gitlab/merge_request_templates/Default.md"
|
|
359
361
|
- ".gitlab/merge_request_templates/Release.md"
|
|
@@ -425,7 +427,6 @@ files:
|
|
|
425
427
|
- lib/gitlab/qa/component/specs.rb
|
|
426
428
|
- lib/gitlab/qa/component/staging.rb
|
|
427
429
|
- lib/gitlab/qa/component/staging_ref.rb
|
|
428
|
-
- lib/gitlab/qa/component/suggested_reviewer.rb
|
|
429
430
|
- lib/gitlab/qa/docker/command.rb
|
|
430
431
|
- lib/gitlab/qa/docker/engine.rb
|
|
431
432
|
- lib/gitlab/qa/docker/volumes.rb
|
|
@@ -494,7 +495,6 @@ files:
|
|
|
494
495
|
- lib/gitlab/qa/scenario/test/integration/saml.rb
|
|
495
496
|
- lib/gitlab/qa/scenario/test/integration/service_ping_disabled.rb
|
|
496
497
|
- lib/gitlab/qa/scenario/test/integration/smtp.rb
|
|
497
|
-
- lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb
|
|
498
498
|
- lib/gitlab/qa/scenario/test/omnibus/image.rb
|
|
499
499
|
- lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb
|
|
500
500
|
- lib/gitlab/qa/scenario/test/omnibus/update_from_previous_ai.rb
|
|
@@ -517,11 +517,6 @@ files:
|
|
|
517
517
|
- scripts/build-package-and-test-env
|
|
518
518
|
- support/data/admin_access_token_seed.rb
|
|
519
519
|
- support/data/license_usage_seed.rb
|
|
520
|
-
- support/manifests/suggested_reviewer/authenticator.yaml
|
|
521
|
-
- support/manifests/suggested_reviewer/postgres.yaml
|
|
522
|
-
- support/manifests/suggested_reviewer/pubsub.yaml
|
|
523
|
-
- support/manifests/suggested_reviewer/recommender-bot.yaml
|
|
524
|
-
- support/manifests/suggested_reviewer/recommender.yaml
|
|
525
520
|
- support/pipeline/create_for_projectname.rb
|
|
526
521
|
- support/setup/gitlab_duo_setup.rb
|
|
527
522
|
- tls_certificates/authority/ca.crt
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Gitlab
|
|
4
|
-
module QA
|
|
5
|
-
module Component
|
|
6
|
-
class SuggestedReviewer
|
|
7
|
-
include Scenario::Actable
|
|
8
|
-
|
|
9
|
-
# Source: https://gitlab.com/gitlab-org/modelops/applied-ml/review-recommender/cluster-management
|
|
10
|
-
MANIFESTS_PATH = File.expand_path('../../../../support/manifests/suggested_reviewer', __dir__)
|
|
11
|
-
|
|
12
|
-
def initialize
|
|
13
|
-
@cluster = Service::KubernetesCluster.new(provider_class: Service::ClusterProvider::K3d)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def name
|
|
17
|
-
@name ||= "suggested_reviewer"
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def prepare
|
|
21
|
-
@cluster.create_registry_mirror
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def create_cluster
|
|
25
|
-
@cluster.create!
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def deploy_services
|
|
29
|
-
Dir.glob(File.join(MANIFESTS_PATH, '**/*')).each do |file|
|
|
30
|
-
Runtime::Logger.info("Applying manifest #{file}")
|
|
31
|
-
@cluster.apply_manifest(File.read(file))
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def teardown
|
|
36
|
-
@cluster.remove!
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def wait_until_ready; end
|
|
40
|
-
|
|
41
|
-
def teardown?
|
|
42
|
-
!Runtime::Scenario.attributes.include?(:teardown) || Runtime::Scenario.teardown
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Gitlab
|
|
4
|
-
module QA
|
|
5
|
-
module Scenario
|
|
6
|
-
module Test
|
|
7
|
-
module Integration
|
|
8
|
-
class SuggestedReviewer < Scenario::Template
|
|
9
|
-
attr_reader :spec_suite
|
|
10
|
-
|
|
11
|
-
def initialize
|
|
12
|
-
@spec_suite = 'Test::Instance::All'
|
|
13
|
-
@network = Runtime::Env.docker_network
|
|
14
|
-
@env = {}
|
|
15
|
-
@tag = 'suggested_reviewer'
|
|
16
|
-
@gitlab_name = 'gitlab-suggested-reviewer'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def perform(release, *rspec_args)
|
|
20
|
-
Component::Gitlab.perform do |gitlab|
|
|
21
|
-
gitlab.release = QA::Release.new(release)
|
|
22
|
-
gitlab.name = @gitlab_name
|
|
23
|
-
gitlab.network = @network
|
|
24
|
-
|
|
25
|
-
gitlab.instance do
|
|
26
|
-
# Wait for the suggested reviewer services to be ready before attempting to run specs
|
|
27
|
-
@cluster = suggested_reviewer_cluster
|
|
28
|
-
@cluster.wait_until_ready
|
|
29
|
-
|
|
30
|
-
Runtime::Logger.info('Running Suggested Reviewer specs!')
|
|
31
|
-
|
|
32
|
-
if @tag
|
|
33
|
-
rspec_args << "--" unless rspec_args.include?('--')
|
|
34
|
-
rspec_args << "--tag" << @tag
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
Component::Specs.perform do |specs|
|
|
38
|
-
specs.suite = spec_suite
|
|
39
|
-
specs.release = gitlab.release
|
|
40
|
-
specs.network = gitlab.network
|
|
41
|
-
specs.args = [gitlab.address, *rspec_args]
|
|
42
|
-
specs.env = @env
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
ensure
|
|
47
|
-
@cluster&.teardown if @cluster&.teardown?
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def suggested_reviewer_cluster
|
|
51
|
-
Component::SuggestedReviewer.new.tap do |sr|
|
|
52
|
-
sr.prepare
|
|
53
|
-
sr.create_cluster
|
|
54
|
-
sr.deploy_services
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: Deployment
|
|
4
|
-
metadata:
|
|
5
|
-
name: authenticator-deployment
|
|
6
|
-
labels:
|
|
7
|
-
app: authenticator
|
|
8
|
-
spec:
|
|
9
|
-
replicas: 1
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels:
|
|
12
|
-
app: authenticator
|
|
13
|
-
template:
|
|
14
|
-
metadata:
|
|
15
|
-
labels:
|
|
16
|
-
app: authenticator
|
|
17
|
-
spec:
|
|
18
|
-
imagePullSecrets:
|
|
19
|
-
- name: gitlab-registry
|
|
20
|
-
containers:
|
|
21
|
-
- name: authenticator
|
|
22
|
-
image: registry.gitlab.com/gitlab-org/modelops/applied-ml/review-recommender/authenticator:0.1.0
|
|
23
|
-
imagePullPolicy: Always
|
|
24
|
-
ports:
|
|
25
|
-
- containerPort: 8080
|
|
26
|
-
args: []
|
|
27
|
-
env:
|
|
28
|
-
- name: AUTHENTICATOR_SERVICE_PORT
|
|
29
|
-
value: "8080"
|
|
30
|
-
---
|
|
31
|
-
apiVersion: v1
|
|
32
|
-
kind: Service
|
|
33
|
-
metadata:
|
|
34
|
-
name: authenticator-service
|
|
35
|
-
spec:
|
|
36
|
-
type: NodePort
|
|
37
|
-
ports:
|
|
38
|
-
- port: 8080
|
|
39
|
-
targetPort: 8080
|
|
40
|
-
selector:
|
|
41
|
-
app: authenticator
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: v1
|
|
3
|
-
kind: Secret
|
|
4
|
-
metadata:
|
|
5
|
-
name: postgres-secret
|
|
6
|
-
type: kubernetes.io/basic-auth
|
|
7
|
-
stringData:
|
|
8
|
-
username: reviewer-recommender
|
|
9
|
-
password: ml4dawin
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
apiVersion: v1
|
|
13
|
-
kind: PersistentVolumeClaim
|
|
14
|
-
metadata:
|
|
15
|
-
name: postgres-pvc
|
|
16
|
-
spec:
|
|
17
|
-
storageClassName: local-path
|
|
18
|
-
accessModes:
|
|
19
|
-
- ReadWriteOnce
|
|
20
|
-
resources:
|
|
21
|
-
requests:
|
|
22
|
-
storage: 1Gi
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
apiVersion: apps/v1
|
|
26
|
-
kind: Deployment
|
|
27
|
-
metadata:
|
|
28
|
-
name: postgres-deployment
|
|
29
|
-
spec:
|
|
30
|
-
replicas: 1
|
|
31
|
-
selector:
|
|
32
|
-
matchLabels:
|
|
33
|
-
app: postgres
|
|
34
|
-
template:
|
|
35
|
-
metadata:
|
|
36
|
-
labels:
|
|
37
|
-
app: postgres
|
|
38
|
-
spec:
|
|
39
|
-
containers:
|
|
40
|
-
- name: postgres
|
|
41
|
-
image: postgres:13-alpine
|
|
42
|
-
imagePullPolicy: IfNotPresent
|
|
43
|
-
ports:
|
|
44
|
-
- containerPort: 5432
|
|
45
|
-
volumeMounts:
|
|
46
|
-
- name: postgres-pv
|
|
47
|
-
mountPath: /var/lib/postgresql/data
|
|
48
|
-
subPath: postgres
|
|
49
|
-
resources:
|
|
50
|
-
limits:
|
|
51
|
-
memory: 256Mi
|
|
52
|
-
cpu: 250m
|
|
53
|
-
env:
|
|
54
|
-
- name: POSTGRES_DB
|
|
55
|
-
value: reviewer-recommender
|
|
56
|
-
- name: POSTGRES_USER
|
|
57
|
-
valueFrom:
|
|
58
|
-
secretKeyRef:
|
|
59
|
-
name: postgres-secret
|
|
60
|
-
key: username
|
|
61
|
-
- name: POSTGRES_PASSWORD
|
|
62
|
-
valueFrom:
|
|
63
|
-
secretKeyRef:
|
|
64
|
-
name: postgres-secret
|
|
65
|
-
key: password
|
|
66
|
-
volumes:
|
|
67
|
-
- name: postgres-pv
|
|
68
|
-
persistentVolumeClaim:
|
|
69
|
-
claimName: postgres-pvc
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
apiVersion: v1
|
|
73
|
-
kind: Service
|
|
74
|
-
metadata:
|
|
75
|
-
name: postgres
|
|
76
|
-
labels:
|
|
77
|
-
app: postgres
|
|
78
|
-
spec:
|
|
79
|
-
type: ClusterIP
|
|
80
|
-
selector:
|
|
81
|
-
app: postgres
|
|
82
|
-
ports:
|
|
83
|
-
- port: 5432
|
|
84
|
-
targetPort: 5432
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: Deployment
|
|
4
|
-
metadata:
|
|
5
|
-
name: pubsub-deployment
|
|
6
|
-
labels:
|
|
7
|
-
app: pubsub
|
|
8
|
-
spec:
|
|
9
|
-
replicas: 1
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels:
|
|
12
|
-
app: pubsub
|
|
13
|
-
template:
|
|
14
|
-
metadata:
|
|
15
|
-
labels:
|
|
16
|
-
app: pubsub
|
|
17
|
-
spec:
|
|
18
|
-
containers:
|
|
19
|
-
- name: pubsub
|
|
20
|
-
image: singularities/pubsub-emulator:latest
|
|
21
|
-
imagePullPolicy: IfNotPresent
|
|
22
|
-
env:
|
|
23
|
-
- name: PUBSUB_PROJECT_ID
|
|
24
|
-
value: project-test
|
|
25
|
-
- name: PUBSUB_LISTEN_ADDRESS
|
|
26
|
-
value: 0.0.0.0:8432
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
apiVersion: v1
|
|
30
|
-
kind: Service
|
|
31
|
-
metadata:
|
|
32
|
-
name: pubsub
|
|
33
|
-
labels:
|
|
34
|
-
app: pubsub
|
|
35
|
-
spec:
|
|
36
|
-
type: ClusterIP
|
|
37
|
-
selector:
|
|
38
|
-
app: pubsub
|
|
39
|
-
ports:
|
|
40
|
-
- port: 8432
|
|
41
|
-
targetPort: 8432
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: v1
|
|
3
|
-
kind: Secret
|
|
4
|
-
metadata:
|
|
5
|
-
name: gcp-credentials
|
|
6
|
-
type: Opaque
|
|
7
|
-
data:
|
|
8
|
-
gcp_json: "ewogICJjbGllbnRfaWQiOiAiMTIzNDU2Nzg5YWJjZGVmZy5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsCiAgImNsaWVudF9zZWNyZXQiOiAiZC1GTHlld3VxeWV1cXciLAogICJxdW90YV9wcm9qZWN0X2lkIjogInN1Z2dlc3RlZC1yZXZpZXdlci0xNTA0MDBlNiIsCiAgInJlZnJlc2hfdG9rZW4iOiAiMS8vMTIzNDU2NzhhYmNkZWZnIiwKICAidHlwZSI6ICJhdXRob3JpemVkX3VzZXIiCn0K"
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
apiVersion: v1
|
|
12
|
-
kind: ConfigMap
|
|
13
|
-
metadata:
|
|
14
|
-
name: recommender-bot-envoy-sidecar-config
|
|
15
|
-
labels:
|
|
16
|
-
app: recommender-bot
|
|
17
|
-
data:
|
|
18
|
-
envoy.yaml: |
|
|
19
|
-
static_resources:
|
|
20
|
-
listeners:
|
|
21
|
-
- name: "recommender-bot-http-listener"
|
|
22
|
-
address:
|
|
23
|
-
socket_address: { address: "0.0.0.0", port_value: 8282 }
|
|
24
|
-
filter_chains:
|
|
25
|
-
- filters:
|
|
26
|
-
- name: "envoy.filters.network.http_connection_manager"
|
|
27
|
-
typed_config:
|
|
28
|
-
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
|
29
|
-
stat_prefix: "grpc_json"
|
|
30
|
-
codec_type: "AUTO"
|
|
31
|
-
route_config:
|
|
32
|
-
name: "local_route"
|
|
33
|
-
virtual_hosts:
|
|
34
|
-
- name: "local_service"
|
|
35
|
-
domains: [ "*" ]
|
|
36
|
-
routes:
|
|
37
|
-
- match: { prefix: "/", grpc: {} }
|
|
38
|
-
route: { cluster: "recommender-bot", timeout: 60s }
|
|
39
|
-
http_filters:
|
|
40
|
-
- name: "envoy.filters.http.grpc_json_transcoder"
|
|
41
|
-
typed_config:
|
|
42
|
-
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder
|
|
43
|
-
proto_descriptor: "/data/protos/recommender-bot.protoset.pb"
|
|
44
|
-
services: [ "bot.RecommenderService" ]
|
|
45
|
-
print_options:
|
|
46
|
-
add_whitespace: true
|
|
47
|
-
always_print_primitive_fields: true
|
|
48
|
-
always_print_enums_as_ints: false
|
|
49
|
-
preserve_proto_field_names: false
|
|
50
|
-
convert_grpc_status: true
|
|
51
|
-
request_validation_options:
|
|
52
|
-
reject_unknown_method: true
|
|
53
|
-
reject_unknown_query_parameters: true
|
|
54
|
-
- name: "envoy.filters.http.router"
|
|
55
|
-
- name: "recommender-bot-http-auth-listener"
|
|
56
|
-
address:
|
|
57
|
-
socket_address: { address: "0.0.0.0", port_value: 8484 }
|
|
58
|
-
filter_chains:
|
|
59
|
-
- filters:
|
|
60
|
-
- name: "envoy.filters.network.http_connection_manager"
|
|
61
|
-
typed_config:
|
|
62
|
-
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
|
63
|
-
stat_prefix: "grpc_json"
|
|
64
|
-
codec_type: "AUTO"
|
|
65
|
-
route_config:
|
|
66
|
-
name: "local_route"
|
|
67
|
-
virtual_hosts:
|
|
68
|
-
- name: "local_service"
|
|
69
|
-
domains: [ "*" ]
|
|
70
|
-
routes:
|
|
71
|
-
- match: { prefix: "/", grpc: {} }
|
|
72
|
-
route: { cluster: "recommender-bot", timeout: 60s }
|
|
73
|
-
http_filters:
|
|
74
|
-
- name: "envoy.filters.http.grpc_json_transcoder"
|
|
75
|
-
typed_config:
|
|
76
|
-
"@type": type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder
|
|
77
|
-
proto_descriptor: "/data/protos/recommender-bot.protoset.pb"
|
|
78
|
-
services: [ "bot.RecommenderService" ]
|
|
79
|
-
print_options:
|
|
80
|
-
add_whitespace: true
|
|
81
|
-
always_print_primitive_fields: true
|
|
82
|
-
always_print_enums_as_ints: false
|
|
83
|
-
preserve_proto_field_names: false
|
|
84
|
-
convert_grpc_status: true
|
|
85
|
-
request_validation_options:
|
|
86
|
-
reject_unknown_method: true
|
|
87
|
-
reject_unknown_query_parameters: true
|
|
88
|
-
- name: "envoy.filters.http.ext_authz"
|
|
89
|
-
typed_config:
|
|
90
|
-
"@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz
|
|
91
|
-
http_service:
|
|
92
|
-
server_uri:
|
|
93
|
-
uri: "http://authenticator-service:8080"
|
|
94
|
-
cluster: "ext-auth"
|
|
95
|
-
timeout: 60s
|
|
96
|
-
authorization_request:
|
|
97
|
-
allowed_headers:
|
|
98
|
-
patterns:
|
|
99
|
-
- { exact: "Job-Token", ignore_case: true }
|
|
100
|
-
- { exact: "Project-Id", ignore_case: true }
|
|
101
|
-
failure_mode_allow: false
|
|
102
|
-
- name: "envoy.filters.http.router"
|
|
103
|
-
|
|
104
|
-
clusters:
|
|
105
|
-
- name: "recommender-bot"
|
|
106
|
-
connect_timeout: "1.25s"
|
|
107
|
-
type: "STATIC"
|
|
108
|
-
lb_policy: "ROUND_ROBIN"
|
|
109
|
-
dns_lookup_family: V4_ONLY
|
|
110
|
-
typed_extension_protocol_options:
|
|
111
|
-
envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
|
|
112
|
-
"@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
|
|
113
|
-
explicit_http_config:
|
|
114
|
-
http2_protocol_options: { }
|
|
115
|
-
load_assignment:
|
|
116
|
-
cluster_name: "recommender-bot"
|
|
117
|
-
endpoints:
|
|
118
|
-
- lb_endpoints:
|
|
119
|
-
- endpoint:
|
|
120
|
-
address:
|
|
121
|
-
socket_address:
|
|
122
|
-
address: "127.0.0.1"
|
|
123
|
-
port_value: 8080
|
|
124
|
-
- name: "ext-auth"
|
|
125
|
-
connect_timeout: "1.25s"
|
|
126
|
-
type: "LOGICAL_DNS"
|
|
127
|
-
lb_policy: "ROUND_ROBIN"
|
|
128
|
-
load_assignment:
|
|
129
|
-
cluster_name: "ext-auth"
|
|
130
|
-
endpoints:
|
|
131
|
-
- lb_endpoints:
|
|
132
|
-
- endpoint:
|
|
133
|
-
address:
|
|
134
|
-
socket_address:
|
|
135
|
-
address: "authenticator-service"
|
|
136
|
-
port_value: 8080
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
apiVersion: apps/v1
|
|
140
|
-
kind: Deployment
|
|
141
|
-
metadata:
|
|
142
|
-
name: recommender-bot-deployment
|
|
143
|
-
labels:
|
|
144
|
-
app: recommender-bot
|
|
145
|
-
spec:
|
|
146
|
-
replicas: 1
|
|
147
|
-
selector:
|
|
148
|
-
matchLabels:
|
|
149
|
-
app: recommender-bot
|
|
150
|
-
template:
|
|
151
|
-
metadata:
|
|
152
|
-
labels:
|
|
153
|
-
app: recommender-bot
|
|
154
|
-
spec:
|
|
155
|
-
initContainers:
|
|
156
|
-
- name: protosets
|
|
157
|
-
image: recommender-bot-service:dev
|
|
158
|
-
imagePullPolicy: Never
|
|
159
|
-
command: [sh, -c]
|
|
160
|
-
args: [cp /app/recommender-bot.protoset.pb /data/protos]
|
|
161
|
-
volumeMounts:
|
|
162
|
-
- name: grpc-protosets
|
|
163
|
-
mountPath: /data/protos
|
|
164
|
-
containers:
|
|
165
|
-
- name: recommender-bot-envoy-sidecar
|
|
166
|
-
image: envoyproxy/envoy-alpine:v1.19-latest
|
|
167
|
-
imagePullPolicy: IfNotPresent
|
|
168
|
-
ports:
|
|
169
|
-
- containerPort: 8282
|
|
170
|
-
- containerPort: 8484
|
|
171
|
-
volumeMounts:
|
|
172
|
-
- name: recommender-bot-envoy-sidecar-config
|
|
173
|
-
mountPath: /etc/envoy
|
|
174
|
-
- name: grpc-protosets
|
|
175
|
-
mountPath: /data/protos
|
|
176
|
-
readOnly: true
|
|
177
|
-
- name: recommender-bot
|
|
178
|
-
image: recommender-bot-service:dev
|
|
179
|
-
imagePullPolicy: Never
|
|
180
|
-
ports:
|
|
181
|
-
- containerPort: 8080
|
|
182
|
-
env:
|
|
183
|
-
- name: RECOMMENDER_BOT_SERVICE_PORT
|
|
184
|
-
value: "8080"
|
|
185
|
-
- name: RECOMMENDER_BOT_GITLAB_TOKEN
|
|
186
|
-
valueFrom:
|
|
187
|
-
secretKeyRef:
|
|
188
|
-
name: recommender-bot-gitlab-token
|
|
189
|
-
key: token
|
|
190
|
-
- name: RECOMMENDER_BOT_GRPC_SERVICE_URL
|
|
191
|
-
value: recommender-service:8080
|
|
192
|
-
- name: RECOMMENDER_BOT_PG_CONN_STRING
|
|
193
|
-
valueFrom:
|
|
194
|
-
secretKeyRef:
|
|
195
|
-
name: recommender-bot-pg-conn-string
|
|
196
|
-
key: pg-conn
|
|
197
|
-
- name: PUBSUB_EMULATOR_HOST
|
|
198
|
-
value: pubsub:8432
|
|
199
|
-
- name: GOOGLE_APPLICATION_CREDENTIALS
|
|
200
|
-
value: /data/gcp/gcp_credentials.json
|
|
201
|
-
- name: RECOMMENDER_BOT_PUBSUB_PROJECT_ID
|
|
202
|
-
value: project-test
|
|
203
|
-
- name: RECOMMENDER_BOT_PUBSUB_TOPIC_RECOMMENDATIONS
|
|
204
|
-
value: gitlab.merge-request-recommendations-test.1
|
|
205
|
-
volumeMounts:
|
|
206
|
-
- name: gcp-secrets
|
|
207
|
-
mountPath: /data/gcp
|
|
208
|
-
readOnly: true
|
|
209
|
-
volumes:
|
|
210
|
-
- name: grpc-protosets
|
|
211
|
-
emptyDir: {}
|
|
212
|
-
- name: recommender-bot-envoy-sidecar-config
|
|
213
|
-
configMap:
|
|
214
|
-
name: recommender-bot-envoy-sidecar-config
|
|
215
|
-
- name: gcp-secrets
|
|
216
|
-
secret:
|
|
217
|
-
secretName: gcp-credentials
|
|
218
|
-
items:
|
|
219
|
-
- key: gcp_json
|
|
220
|
-
path: gcp_credentials.json
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
apiVersion: v1
|
|
224
|
-
kind: Service
|
|
225
|
-
metadata:
|
|
226
|
-
name: recommender-bot-service
|
|
227
|
-
labels:
|
|
228
|
-
app: recommender-bot
|
|
229
|
-
spec:
|
|
230
|
-
type: NodePort
|
|
231
|
-
ports:
|
|
232
|
-
- name: http-plain
|
|
233
|
-
port: 8282
|
|
234
|
-
targetPort: 8282
|
|
235
|
-
- name: http-auth
|
|
236
|
-
port: 8484
|
|
237
|
-
targetPort: 8484
|
|
238
|
-
- name: grpc
|
|
239
|
-
port: 8080
|
|
240
|
-
targetPort: 8080
|
|
241
|
-
selector:
|
|
242
|
-
app: recommender-bot
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: Deployment
|
|
4
|
-
metadata:
|
|
5
|
-
name: recommender-deployment
|
|
6
|
-
labels:
|
|
7
|
-
app: recommender
|
|
8
|
-
spec:
|
|
9
|
-
replicas: 1
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels:
|
|
12
|
-
app: recommender
|
|
13
|
-
template:
|
|
14
|
-
metadata:
|
|
15
|
-
labels:
|
|
16
|
-
app: recommender
|
|
17
|
-
spec:
|
|
18
|
-
containers:
|
|
19
|
-
- name: recommender
|
|
20
|
-
image: recommender-service:dev
|
|
21
|
-
imagePullPolicy: Never
|
|
22
|
-
ports:
|
|
23
|
-
- containerPort: 8080
|
|
24
|
-
volumeMounts:
|
|
25
|
-
- name: models-mount
|
|
26
|
-
mountPath: /app/data/models
|
|
27
|
-
env:
|
|
28
|
-
- name: RECOMMENDER_SERVICE_PORT
|
|
29
|
-
value: "8080"
|
|
30
|
-
- name: RECOMMENDER_MODELS_STORAGE
|
|
31
|
-
value: local
|
|
32
|
-
- name: GRPC_VERBOSITY
|
|
33
|
-
value: debug
|
|
34
|
-
volumes:
|
|
35
|
-
- name: models-mount
|
|
36
|
-
hostPath:
|
|
37
|
-
path: /tmp/gitlab-qa/suggested_reviewer/data/models
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
apiVersion: v1
|
|
41
|
-
kind: Service
|
|
42
|
-
metadata:
|
|
43
|
-
name: recommender-service
|
|
44
|
-
labels:
|
|
45
|
-
app: recommender
|
|
46
|
-
spec:
|
|
47
|
-
type: ClusterIP
|
|
48
|
-
ports:
|
|
49
|
-
- port: 8080
|
|
50
|
-
targetPort: 8080
|
|
51
|
-
selector:
|
|
52
|
-
app: recommender
|