gitlab_quality-test_tooling 3.10.0 → 3.10.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c49f987999c6124651b5f1f21de7d588d1940749b91f8527e21b9fcbbb1921b
|
|
4
|
+
data.tar.gz: 384d0765fb0d891e373777004ad20a5cecbc2df9b07cc74ca1b70ae30a080641
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ff2cc394058616512c5c00779772d244d08986e12762a49c17ca9e31065a4af6b79beaeb8ceb7ac35c290efb10410c5888aff363b183d4190bb9b863278a418
|
|
7
|
+
data.tar.gz: 8cc8717e64a9c260ca10474897aae319bae9565a1257815e3a83e931049d8d0c61c32fb38d9b66f13976f0f0e1ec4e7d3666f5c3311c5e64cae0c25940ff5da6
|
data/AGENTS.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# gitlab_quality-test_tooling
|
|
2
|
+
|
|
3
|
+
Ruby gem providing test tooling for GitLab CI — metrics export, test quarantine, failure reporting, flaky test tracking, and code coverage analysis.
|
|
4
|
+
|
|
5
|
+
## Tech Stack
|
|
6
|
+
|
|
7
|
+
- Ruby (see `.ruby-version` and gemspec for version), gem published to RubyGems
|
|
8
|
+
- RSpec for testing, RuboCop (`gitlab-styles` base) for linting
|
|
9
|
+
- Lefthook for pre-push hooks (rspec, rubocop, changelog trailer check)
|
|
10
|
+
|
|
11
|
+
## Testing
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bundle exec rspec
|
|
15
|
+
bundle exec rubocop
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Commit Conventions
|
|
19
|
+
|
|
20
|
+
Every branch must have a `Changelog:` git trailer on its **first commit** (relative to `origin/main`).
|
|
21
|
+
|
|
22
|
+
Valid values: `added`, `fixed`, `changed`, `deprecated`, `removed`, `security`, `performance`, `other`
|
|
23
|
+
|
|
24
|
+
Example:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Fix failure_exception for MultipleExceptionError
|
|
28
|
+
|
|
29
|
+
Description of the change.
|
|
30
|
+
|
|
31
|
+
Changelog: fixed
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Enforcement
|
|
35
|
+
|
|
36
|
+
- **lefthook pre-push hook** checks the first commit on the branch
|
|
37
|
+
- **gitlab-dangerfiles** checks in CI (Danger bot comments on MRs)
|
|
38
|
+
- `--no-verify` bypasses lefthook locally, but CI will still fail without the trailer
|
|
39
|
+
|
|
40
|
+
### Choosing the right value
|
|
41
|
+
|
|
42
|
+
| Value | When to use |
|
|
43
|
+
|-------|-------------|
|
|
44
|
+
| `added` | New feature or capability |
|
|
45
|
+
| `fixed` | Bug fix |
|
|
46
|
+
| `changed` | Non-breaking change to existing behavior |
|
|
47
|
+
| `deprecated` | Feature marked for removal |
|
|
48
|
+
| `removed` | Feature removed |
|
|
49
|
+
| `security` | Security fix |
|
|
50
|
+
| `performance` | Performance improvement |
|
|
51
|
+
| `other` | Refactoring, docs, CI changes |
|
|
52
|
+
|
|
53
|
+
Reference: https://docs.gitlab.com/ee/development/changelog.html
|
|
54
|
+
|
|
55
|
+
### Commit Message Format
|
|
56
|
+
|
|
57
|
+
- Present tense ("Fix bug" not "Fixed bug")
|
|
58
|
+
- First line under 72 characters
|
|
59
|
+
- Blank line between subject and body
|
|
60
|
+
- `Changelog:` trailer at the end of the first commit's message, after a blank line
|
|
61
|
+
|
|
62
|
+
## Project Structure
|
|
63
|
+
|
|
64
|
+
| Directory | Purpose |
|
|
65
|
+
|-----------|---------|
|
|
66
|
+
| `lib/gitlab_quality/test_tooling/` | Main gem code |
|
|
67
|
+
| `exe/` | CLI executables |
|
|
68
|
+
| `spec/` | RSpec tests |
|
|
69
|
+
| `.gitlab/changelog_config.yml` | Changelog category mapping |
|
|
70
|
+
|
|
71
|
+
## Key Modules
|
|
72
|
+
|
|
73
|
+
- **TestMetricsExporter** — Serializes RSpec results to ClickHouse (exception classes, failure messages, CI metadata)
|
|
74
|
+
- **Report** — Creates/updates GitLab issues for test failures, flaky tests, slow tests
|
|
75
|
+
- **TestQuarantine** — RSpec formatter that skips quarantined tests
|
|
76
|
+
- **CodeCoverage** — Coverage analysis and responsibility patterns
|
|
77
|
+
- **ClickHouse::Client** — Batch HTTP client for pushing metrics
|
|
78
|
+
|
|
79
|
+
## Release Process
|
|
80
|
+
|
|
81
|
+
The [automated gem release process](https://gitlab.com/gitlab-org/quality/pipeline-common#release-process) publishes new versions via CI. It will:
|
|
82
|
+
|
|
83
|
+
- Publish the gem to https://rubygems.org/gems/gitlab_quality-test_tooling
|
|
84
|
+
- Create a release at https://gitlab.com/gitlab-org/ruby/gems/gitlab_quality-test_tooling/-/releases
|
|
85
|
+
- Populate release notes from changelog entries
|
|
86
|
+
|
|
87
|
+
### Steps to release
|
|
88
|
+
|
|
89
|
+
1. Create a branch (e.g., `bump-version-X-Y-Z`)
|
|
90
|
+
2. Update `lib/gitlab_quality/test_tooling/version.rb` with the new version
|
|
91
|
+
3. Run `bundle install` to update `Gemfile.lock`
|
|
92
|
+
4. Commit with message like `Update gem version to X.Y.Z` and trailer `Changelog: changed`
|
|
93
|
+
5. Create an MR using the **Release** MR template (`.gitlab/merge_request_templates/Release.md`)
|
|
94
|
+
6. Fill in the template: update the diff link, check release notes, verify SemVer
|
|
95
|
+
7. Get the MR merged by a maintainer — CI will publish the gem automatically
|
data/Gemfile.lock
CHANGED
|
@@ -161,14 +161,23 @@ module GitlabQuality
|
|
|
161
161
|
exception.all_exceptions.flatten
|
|
162
162
|
end
|
|
163
163
|
|
|
164
|
-
# Truncated exception
|
|
164
|
+
# Truncated exception message
|
|
165
|
+
#
|
|
166
|
+
# For MultipleExceptionError, returns the first wrapped exception's message
|
|
167
|
+
# instead of the unhelpful wrapper class name.
|
|
165
168
|
#
|
|
166
169
|
# @return [String]
|
|
167
170
|
def failure_exception
|
|
168
171
|
exception = example.execution_result.exception
|
|
169
172
|
return unless exception
|
|
170
173
|
|
|
171
|
-
|
|
174
|
+
source = if exception.respond_to?(:all_exceptions)
|
|
175
|
+
exception.all_exceptions.flatten.first || exception
|
|
176
|
+
else
|
|
177
|
+
exception
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
source.to_s.tr("\n", " ").slice(0, 1000)
|
|
172
181
|
end
|
|
173
182
|
|
|
174
183
|
# Test run type | suite name
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab_quality-test_tooling
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.10.
|
|
4
|
+
version: 3.10.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GitLab Quality
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: climate_control
|
|
@@ -438,6 +438,7 @@ files:
|
|
|
438
438
|
- ".rubocop_todo.yml"
|
|
439
439
|
- ".ruby-version"
|
|
440
440
|
- ".tool-versions"
|
|
441
|
+
- AGENTS.md
|
|
441
442
|
- CODE_OF_CONDUCT.md
|
|
442
443
|
- CONTRIBUTING.md
|
|
443
444
|
- Dangerfile
|