gitlab-qa 14.4.0 → 14.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +20 -0
- data/lefthook.yml +14 -0
- data/lib/gitlab/qa/component/ai_gateway.rb +11 -1
- data/lib/gitlab/qa/component/gitaly.rb +1 -7
- data/lib/gitlab/qa/component/gitlab.rb +3 -3
- data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +4 -2
- data/lib/gitlab/qa/support/gitlab_version_info.rb +5 -1
- data/lib/gitlab/qa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16aa0d0e3acf2f78c85344345d2d7a1637fa9c16154446020d0ffd5649687f9
|
4
|
+
data.tar.gz: 68bbb672fecd7bd17113fd7485cbacf547477cd64362e250296316a897868974
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 260445e5a526267392c3d91d81eee2baa37df00c6981acecef40f64d17ebf7a10d608d9eb3eae61a287633ca5e7446fdd4e8da70bc70d1de8a2c915065910248
|
7
|
+
data.tar.gz: fcb5cf3c6a4aa914bb089316cb1f3f1b6d8c666fc7dccf7621c79a90d92dc5dcfb6bb5aa77631059f1c841321baf898471f0e35f09ad7a6d831394badc983a67
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -121,6 +121,7 @@ All the scenarios you can run are described in the
|
|
121
121
|
|
122
122
|
Note: The GitLab QA tool requires that [Docker](https://docs.docker.com/install/) is installed.
|
123
123
|
|
124
|
+
|
124
125
|
### Command-line options
|
125
126
|
|
126
127
|
In addition to the [arguments you can use to specify the scenario and
|
@@ -166,6 +167,25 @@ useful if you want to run and debug a specific test, for example:
|
|
166
167
|
$ bundle exec bin/qa Test::Instance::All http://localhost:32768 -- qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
|
167
168
|
```
|
168
169
|
|
170
|
+
### Lefthook
|
171
|
+
|
172
|
+
[Lefthook](https://github.com/evilmartians/lefthook) is a Git hooks manager that allows
|
173
|
+
custom logic to be executed prior to Git committing or pushing. This project comes with
|
174
|
+
Lefthook configuration checked in (`lefthook.yml`), but it must be installed.
|
175
|
+
|
176
|
+
#### Install Lefthook
|
177
|
+
|
178
|
+
```shell
|
179
|
+
# Install the `lefthook` Ruby gem:
|
180
|
+
bundle install
|
181
|
+
# Initialize the lefthook config and adds to .git/hooks dir
|
182
|
+
bundle exec lefthook install
|
183
|
+
# Verify hook execution works as expected
|
184
|
+
bundle exec lefthook run pre-push
|
185
|
+
```
|
186
|
+
|
187
|
+
For a detailed guide on `lefthook` configuration see https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
|
188
|
+
|
169
189
|
### How to add new tests
|
170
190
|
|
171
191
|
Please see the [Beginner's guide to writing end-to-end tests](https://docs.gitlab.com/ee/development/testing_guide/end_to_end/beginners_guide.html).
|
data/lefthook.yml
CHANGED
@@ -10,3 +10,17 @@
|
|
10
10
|
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
|
11
11
|
glob: '*.{rb,rake}'
|
12
12
|
run: REVEAL_RUBOCOP_TODO=0 bundle exec rubocop --parallel --force-exclusion {files}
|
13
|
+
|
14
|
+
# Changelog git trailer for the first commit of the branch
|
15
|
+
changelog-on-first-commit:
|
16
|
+
run: |
|
17
|
+
git fetch origin master
|
18
|
+
first_commit_message=$(git log --format=%B -n 1 $(git log origin/master..HEAD --pretty=format:"%h" | tail -1))
|
19
|
+
if ! echo ${first_commit_message} | grep "Changelog:"; then
|
20
|
+
echo Could not find a Changelog: git trailer on the first commit for this branch.
|
21
|
+
echo
|
22
|
+
echo Please add a trailer by amending the git commit message.
|
23
|
+
echo
|
24
|
+
echo See https://docs.gitlab.com/ee/development/changelog.html#overview for more info.
|
25
|
+
exit 1
|
26
|
+
fi
|
@@ -6,17 +6,27 @@ module Gitlab
|
|
6
6
|
class AiGateway < Base
|
7
7
|
DOCKER_IMAGE = 'registry.gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/model-gateway'
|
8
8
|
DOCKER_IMAGE_TAG = 'latest'
|
9
|
+
LOG_DIR = '/var/log'
|
9
10
|
|
10
11
|
def name
|
11
12
|
@name ||= 'ai-gateway'
|
12
13
|
end
|
13
14
|
|
15
|
+
def log_volume
|
16
|
+
@log_volume ||= {
|
17
|
+
src: File.join(Runtime::Env.host_artifacts_dir, @name, 'logs'),
|
18
|
+
dest: LOG_DIR
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
14
22
|
def configure_environment(gitlab_hostname:)
|
15
23
|
@environment = {
|
16
24
|
'AIGW_GITLAB_URL' => "http://#{gitlab_hostname}",
|
17
25
|
'AIGW_GITLAB_API_URL' => "http://#{gitlab_hostname}/api/v4",
|
18
26
|
'AIGW_CUSTOMER_PORTAL_URL' => Runtime::Env.customer_portal_url,
|
19
|
-
'AIGW_USE_FAKE_MODELS' => true
|
27
|
+
'AIGW_USE_FAKE_MODELS' => true,
|
28
|
+
'AIGW_LOGGING__LEVEL' => 'debug',
|
29
|
+
'AIGW_LOGGING__TO_FILE' => "..#{LOG_DIR}/modelgateway_debug.log"
|
20
30
|
}
|
21
31
|
end
|
22
32
|
end
|
@@ -72,13 +72,7 @@ module Gitlab
|
|
72
72
|
gitlab_shell['secret_token'] = 'GITLAB_SHELL_SECRET_TOKEN';
|
73
73
|
gitlab_rails['internal_api_url'] = 'http://#{cluster_config.gitlab_name}.#{cluster_config.network}';
|
74
74
|
git_data_dirs({
|
75
|
-
'#{
|
76
|
-
'path' => '/var/opt/gitlab/git-data'
|
77
|
-
},
|
78
|
-
'#{cluster_config.secondary_node_name}' => {
|
79
|
-
'path' => '/var/opt/gitlab/git-data'
|
80
|
-
},
|
81
|
-
'#{cluster_config.tertiary_node_name}' => {
|
75
|
+
'#{name}' => {
|
82
76
|
'path' => '/var/opt/gitlab/git-data'
|
83
77
|
}
|
84
78
|
});
|
@@ -195,19 +195,19 @@ module Gitlab
|
|
195
195
|
# @return [String] the path to the log file
|
196
196
|
def log_file
|
197
197
|
retries = 0
|
198
|
-
log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-reconfigure
|
198
|
+
log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-reconfigure.log"
|
199
199
|
while File.exist?(log_file)
|
200
200
|
break unless File.exist?(log_file)
|
201
201
|
|
202
202
|
retries += 1
|
203
|
-
log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-retry-#{retries}-reconfigure
|
203
|
+
log_file = "#{Runtime::Env.host_artifacts_dir}/#{name}-retry-#{retries}-reconfigure.log"
|
204
204
|
end
|
205
205
|
|
206
206
|
log_file
|
207
207
|
end
|
208
208
|
|
209
209
|
def get_reconfigure_log_file_from_artefact
|
210
|
-
all_reconfigure_log_file = Dir["#{Runtime::Env.host_artifacts_dir}/*reconfigure
|
210
|
+
all_reconfigure_log_file = Dir["#{Runtime::Env.host_artifacts_dir}/*reconfigure.log"].sort_by { |f| File.mtime(f) }
|
211
211
|
all_reconfigure_log_file.last
|
212
212
|
end
|
213
213
|
|
@@ -109,8 +109,10 @@ module Gitlab
|
|
109
109
|
specs.hostname = "qa-e2e-specs.#{gitlab.network}"
|
110
110
|
specs.network = gitlab.network
|
111
111
|
specs.args = [gitlab.address, *rspec_args]
|
112
|
-
|
113
|
-
|
112
|
+
next if release == current_release
|
113
|
+
|
114
|
+
# do not generate reports and metrics artifacts for non release runs
|
115
|
+
specs.env = { 'QA_GENERATE_ALLURE_REPORT' => false, 'QA_SAVE_TEST_METRICS' => false }
|
114
116
|
end
|
115
117
|
rescue Support::ShellCommand::StatusError => e
|
116
118
|
if release == current_release # only fail on current release
|
@@ -38,11 +38,15 @@ module Gitlab
|
|
38
38
|
#
|
39
39
|
# @example
|
40
40
|
# latest_patch(Gem::Version.new("14.10")) => "14.10.5"
|
41
|
+
# latest_patch(Gem::Version.new("14.10.5")) => "14.10.5"
|
41
42
|
#
|
42
43
|
# @param [Gem::Version] version
|
43
44
|
# @return [String]
|
44
45
|
def latest_patch(version)
|
45
|
-
|
46
|
+
# check if version is already a patch version
|
47
|
+
return version if version.to_s.split('.').size == 3
|
48
|
+
|
49
|
+
versions.find { |ver| ver.to_s.match?(/^#{version}\./) }
|
46
50
|
end
|
47
51
|
|
48
52
|
private
|
data/lib/gitlab/qa/version.rb
CHANGED
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: 14.
|
4
|
+
version: 14.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: 2024-
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: climate_control
|