dri 0.10.2 → 1.1.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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab/changelog_config.yml +13 -0
  3. data/.gitlab/merge_request_templates/Default.md +27 -0
  4. data/.gitlab/merge_request_templates/Release.md +8 -23
  5. data/.gitlab-ci.yml +6 -4
  6. data/.rubocop.yml +9 -1
  7. data/.ruby-version +1 -1
  8. data/.tool-versions +1 -1
  9. data/CODE_OF_CONDUCT.md +74 -0
  10. data/Gemfile.lock +58 -32
  11. data/README.md +88 -113
  12. data/dri.gemspec +9 -4
  13. data/exe/dri +2 -1
  14. data/faq.yaml +7 -7
  15. data/lefthook.yml +24 -0
  16. data/lib/dri/api_client.rb +66 -25
  17. data/lib/dri/cli.rb +2 -11
  18. data/lib/dri/command.rb +21 -52
  19. data/lib/dri/commands/add/fast_quarantine.rb +72 -0
  20. data/lib/dri/commands/add.rb +45 -0
  21. data/lib/dri/commands/analyze/stack_traces.rb +1 -4
  22. data/lib/dri/commands/analyze.rb +0 -1
  23. data/lib/dri/commands/faq.rb +1 -2
  24. data/lib/dri/commands/fetch/failures.rb +102 -43
  25. data/lib/dri/commands/fetch/{featureflags.rb → feature_flags.rb} +1 -6
  26. data/lib/dri/commands/fetch/pipelines.rb +3 -7
  27. data/lib/dri/commands/fetch/runbooks.rb +1 -3
  28. data/lib/dri/commands/fetch/testcases.rb +1 -3
  29. data/lib/dri/commands/fetch/triaged.rb +2 -6
  30. data/lib/dri/commands/fetch.rb +0 -30
  31. data/lib/dri/commands/incidents.rb +2 -6
  32. data/lib/dri/commands/init.rb +1 -3
  33. data/lib/dri/commands/profile.rb +3 -5
  34. data/lib/dri/commands/publish/report.rb +24 -26
  35. data/lib/dri/commands/publish.rb +0 -1
  36. data/lib/dri/commands/rm/emoji.rb +1 -3
  37. data/lib/dri/commands/rm/profile.rb +1 -2
  38. data/lib/dri/commands/rm/reports.rb +1 -2
  39. data/lib/dri/commands/rm.rb +0 -3
  40. data/lib/dri/commands/view/fast_quarantine.rb +25 -0
  41. data/lib/dri/commands/view.rb +22 -0
  42. data/lib/dri/feature_flag_report.rb +1 -3
  43. data/lib/dri/refinements/gitlab.rb +22 -0
  44. data/lib/dri/refinements/string.rb +19 -0
  45. data/lib/dri/report.rb +13 -55
  46. data/lib/dri/support/configuration.rb +62 -0
  47. data/lib/dri/support/influxdb_tools.rb +37 -0
  48. data/lib/dri/utils/constants.rb +2 -1
  49. data/lib/dri/utils/helpers.rb +15 -0
  50. data/lib/dri/version.rb +1 -1
  51. data/lib/dri.rb +8 -1
  52. metadata +96 -16
  53. data/lib/dri/commands/fetch/quarantines.rb +0 -55
  54. data/lib/dri/gitlab/issues.rb +0 -19
  55. data/lib/dri/refinements/truncate.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 958c7eb6122525773d9bde35f97de76f3a30cb0377a9379805dd7967a92b69ec
4
- data.tar.gz: 47982fd399963bfc28559a1c7b6f7305da3167f2eb787ab4a71f7a571d87d171
3
+ metadata.gz: 5645bd9d3338211c2358afd90fdc3ad69c1ba60f517024978601fa7c8f2893e1
4
+ data.tar.gz: b047d324d60bb9e23e39b66e3fad29c7e27be5867c463d8a15abdc901251e161
5
5
  SHA512:
6
- metadata.gz: a7d0d91a974b2070b1137d8f88bc515823b1279c0fcc8a4768d9d4ad5ce498f0400d8e0fac988a74ab0847edf111c9438d87678aa560d3167d95a6937a4f8096
7
- data.tar.gz: f167422d5531320a5eb0efd4efa9f1c77c7bed7d7eba0432c3c9235330e9511aa657a19fc8a77b043e139c4b217e0886424aa1d2cbb5c925b8a702ff1b2085cc
6
+ metadata.gz: bf9d19efe7b0a7ad7afa547d89a330adc31bde0a3f7dfc1c95fe23929aef56bd173bf7ee942a5afcf3e63593ae8d87a968a0c9b1f62d58750adfa7d8a5a24597
7
+ data.tar.gz: c1a9095caf1824f2865e49deeaaef8293e86925edb3e92c47518f5355fa87efe97ee9364eea98cd1096d548290db5a417d0bdc044b10cb0f0d799cdb22d2073e
@@ -0,0 +1,13 @@
1
+ ---
2
+ # Settings for generating changelogs using the GitLab API. See
3
+ # https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data for
4
+ # more information.
5
+ categories:
6
+ added: Added
7
+ fixed: Fixed
8
+ changed: Changed
9
+ deprecated: Deprecated
10
+ removed: Removed
11
+ security: Security
12
+ performance: Performance
13
+ other: Other
@@ -0,0 +1,27 @@
1
+ ## What does this MR do and why?
2
+
3
+ _Describe in detail what your merge request does and why._
4
+
5
+ <!--
6
+ Please keep this description updated with any discussion that takes place so
7
+ that reviewers can understand your intent. Keeping the description updated is
8
+ especially important if they didn't participate in the discussion.
9
+ -->
10
+
11
+ ## Screenshots or screen recordings
12
+
13
+ _These are strongly recommended to assist reviewers and reduce the time to merge your change._
14
+
15
+ ## How to set up and validate locally
16
+
17
+ _Numbered steps to set up and validate the change are strongly suggested._
18
+
19
+ ## MR acceptance checklist
20
+
21
+ This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
22
+
23
+ * [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR.
24
+
25
+ /label ~"type::maintenance" ~Quality
26
+
27
+ <!-- template sourced from https://gitlab.com/gitlab-org/ruby/gems/dri/-/blob/master/.gitlab/merge_request_templates/Default.md -->
@@ -1,28 +1,13 @@
1
+ <!-- Replace `<PREVIOUS_VERSION>` with the previous version number here, `<COMMIT_UPDATING_VERSION>` with the latest
2
+ commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
1
3
  ## Diff
2
- <!-- Replace `v0.9.0` with the previous DRI release, and `55ddcace1c166fa2323d4e556262eba6b274230a` with the latest commit from https://gitlab.com/gitlab-org/quality/dri/-/commits/master that will be included in the release -->
3
- https://gitlab.com/gitlab-org/quality/dri/-/compare/v0.9.0...55ddcace1c166fa2323d4e556262eba6b274230a
4
4
 
5
- ## Release Notes
5
+ https://gitlab.com/gitlab-org/ruby/gems/dri/-/compare/<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
6
6
 
7
- ```markdown
8
- ### Features
9
- - !aaa <Title of the aaa MR>
7
+ ## Checklist
10
8
 
11
- ### Bug Fixes
12
- - !bbb <Title of the bbb MR>
9
+ - [ ] Diff link is up-to-date.
10
+ - [ ] Check the release notes: https://gitlab.com/api/v4/projects/gitlab-org/ruby/gems/dri/repository/changelog?version=<NEW_VERSION>
11
+ - [ ] Based on the diff and the release notes, `version.rb` is updated, according to [SemVer](https://semver.org).
13
12
 
14
- ### Maintenance
15
- - !ccc <Title of the ccc MR>
16
- ```
17
-
18
- ## Checklists
19
-
20
- ### Before merging:
21
- - [ ] MR title is set to `Bump version to <version>`, where `<version>` is the new version, according to [SemVer](https://semver.org/).
22
- - [ ] Diff link is up-to-date.
23
- - [ ] Release notes are accurate.
24
- - [ ] `lib/dri/version.rb` is updated with the new version number.
25
- - [ ] `bundle update` was run to update `Gemfile.lock` with the new version number.
26
-
27
- ### After merging:
28
- - [ ] Update the release notes for the [newly created tag](https://gitlab.com/gitlab-org/quality/dri/-/tags) with the release notes from this MR.
13
+ /label ~"type::maintenance" ~"dx::pipeline"
data/.gitlab-ci.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  .job_base:
2
- image: registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3
2
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images/${BUILD_OS}-${OS_VERSION}-ruby-${RUBY_VERSION}
3
3
  variables:
4
4
  BUNDLE_PATH: vendor/bundle
5
5
  BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
@@ -19,14 +19,16 @@
19
19
  - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
20
20
 
21
21
  include:
22
+ - component: gitlab.com/gitlab-org/components/gem-release/gem-release@~latest
22
23
  - project: gitlab-org/quality/pipeline-common
23
24
  ref: 1.2.3
24
25
  file:
25
- - /ci/gem-release.yml
26
26
  - /ci/ref-update.gitlab-ci.yml
27
27
 
28
28
  variables:
29
- RUBY_VERSION: "3.0"
29
+ BUILD_OS: "debian"
30
+ OS_VERSION: "bookworm"
31
+ RUBY_VERSION: "3.1.5"
30
32
 
31
33
  stages:
32
34
  - build
@@ -53,6 +55,6 @@ rspec:
53
55
  extends: .job_base
54
56
  parallel:
55
57
  matrix:
56
- - RUBY_VERSION: ['2.7', '3.0']
58
+ - RUBY_VERSION: ['3.1.5', '3.2.4']
57
59
  script:
58
60
  - bundle exec rspec --force-color
data/.rubocop.yml CHANGED
@@ -10,7 +10,9 @@ inherit_gem:
10
10
  - rubocop-style.yml
11
11
 
12
12
  AllCops:
13
- TargetRubyVersion: 2.7
13
+ TargetRubyVersion: 3.0
14
+ SuggestExtensions: false
15
+ NewCops: enable
14
16
 
15
17
  RSpec/MultipleMemoizedHelpers:
16
18
  Max: 25
@@ -51,3 +53,9 @@ Lint/RedundantSafeNavigation:
51
53
 
52
54
  Style/ClassEqualityComparison:
53
55
  Enabled: true
56
+
57
+ InternalAffairs/MissingCopDepartment:
58
+ Enabled: false
59
+
60
+ Gemspec/RequireMFA:
61
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.2.4
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.5
1
+ ruby 3.2.4
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at remy@rymai.me. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile.lock CHANGED
@@ -1,10 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dri (0.10.2)
4
+ dri (1.1.0)
5
+ activesupport (~> 7.1)
5
6
  amatch (~> 0.4.1)
6
7
  gitlab (~> 4.19)
7
8
  httparty (~> 0.21.0)
9
+ influxdb-client (~> 2.9)
8
10
  json (~> 2.6.1)
9
11
  launchy (~> 2.4)
10
12
  markdown-tables (~> 1.1.1)
@@ -19,14 +21,20 @@ PATH
19
21
  tty-prompt (~> 0.23.1)
20
22
  tty-spinner (~> 0.9)
21
23
  tty-table (~> 0.12.0)
24
+ zeitwerk (~> 2.6)
22
25
 
23
26
  GEM
24
27
  remote: https://rubygems.org/
25
28
  specs:
26
- activesupport (7.0.5)
29
+ activesupport (7.1.2)
30
+ base64
31
+ bigdecimal
27
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
33
+ connection_pool (>= 2.2.5)
34
+ drb
28
35
  i18n (>= 1.6, < 2)
29
36
  minitest (>= 5.1)
37
+ mutex_m
30
38
  tzinfo (~> 2.0)
31
39
  addressable (2.8.4)
32
40
  public_suffix (>= 2.0.2, < 6.0)
@@ -34,42 +42,50 @@ GEM
34
42
  mize
35
43
  tins (~> 1.0)
36
44
  ast (2.4.2)
45
+ base64 (0.2.0)
46
+ bigdecimal (3.1.5)
37
47
  coderay (1.1.3)
38
48
  concurrent-ruby (1.2.2)
49
+ connection_pool (2.4.1)
39
50
  crack (0.4.5)
40
51
  rexml
41
52
  diff-lcs (1.5.0)
53
+ drb (2.2.0)
54
+ ruby2_keywords
42
55
  gitlab (4.19.0)
43
56
  httparty (~> 0.20)
44
57
  terminal-table (>= 1.5.1)
45
- gitlab-styles (7.0.0)
46
- rubocop (~> 0.91, >= 0.91.1)
47
- rubocop-gitlab-security (~> 0.1.1)
48
- rubocop-graphql (~> 0.10)
49
- rubocop-performance (~> 1.9.2)
50
- rubocop-rails (~> 2.9)
51
- rubocop-rspec (~> 1.44)
58
+ gitlab-styles (10.1.0)
59
+ rubocop (~> 1.50.2)
60
+ rubocop-graphql (~> 0.18)
61
+ rubocop-performance (~> 1.15)
62
+ rubocop-rails (~> 2.17)
63
+ rubocop-rspec (~> 2.22)
52
64
  hashdiff (1.0.1)
53
65
  httparty (0.21.0)
54
66
  mini_mime (>= 1.0.0)
55
67
  multi_xml (>= 0.5.2)
56
- i18n (1.13.0)
68
+ i18n (1.14.1)
57
69
  concurrent-ruby (~> 1.0)
70
+ influxdb-client (2.9.0)
58
71
  json (2.6.3)
59
72
  kramdown (2.4.0)
60
73
  rexml
61
74
  launchy (2.5.2)
62
75
  addressable (~> 2.8)
76
+ lefthook (1.11.8)
63
77
  markdown-tables (1.1.1)
64
78
  method_source (1.0.0)
65
79
  mini_mime (1.1.2)
66
- minitest (5.18.0)
80
+ minitest (5.18.1)
67
81
  mize (0.4.1)
68
82
  protocol (~> 2.0)
69
83
  multi_xml (0.6.0)
84
+ mutex_m (0.2.0)
70
85
  parallel (1.23.0)
71
- parser (3.2.2.1)
86
+ parser (3.2.2.3)
72
87
  ast (~> 2.4.1)
88
+ racc
73
89
  pastel (0.8.0)
74
90
  tty-color (~> 0.5)
75
91
  protocol (2.0.0)
@@ -78,10 +94,11 @@ GEM
78
94
  coderay (~> 1.1)
79
95
  method_source (~> 1.0)
80
96
  public_suffix (5.0.1)
81
- rack (3.0.7)
97
+ racc (1.7.1)
98
+ rack (3.0.8)
82
99
  rainbow (3.1.1)
83
100
  rake (13.0.6)
84
- regexp_parser (2.8.0)
101
+ regexp_parser (2.8.1)
85
102
  rexml (3.2.5)
86
103
  rouge (4.1.1)
87
104
  rspec (3.10.0)
@@ -97,32 +114,37 @@ GEM
97
114
  diff-lcs (>= 1.2.0, < 2.0)
98
115
  rspec-support (~> 3.10.0)
99
116
  rspec-support (3.10.3)
100
- rubocop (0.93.1)
117
+ rubocop (1.50.2)
118
+ json (~> 2.3)
101
119
  parallel (~> 1.10)
102
- parser (>= 2.7.1.5)
120
+ parser (>= 3.2.0.0)
103
121
  rainbow (>= 2.2.2, < 4.0)
104
- regexp_parser (>= 1.8)
105
- rexml
106
- rubocop-ast (>= 0.6.0)
122
+ regexp_parser (>= 1.8, < 3.0)
123
+ rexml (>= 3.2.5, < 4.0)
124
+ rubocop-ast (>= 1.28.0, < 2.0)
107
125
  ruby-progressbar (~> 1.7)
108
- unicode-display_width (>= 1.4.0, < 2.0)
109
- rubocop-ast (1.28.1)
126
+ unicode-display_width (>= 2.4.0, < 3.0)
127
+ rubocop-ast (1.29.0)
110
128
  parser (>= 3.2.1.0)
111
- rubocop-gitlab-security (0.1.1)
112
- rubocop (>= 0.51)
129
+ rubocop-capybara (2.18.0)
130
+ rubocop (~> 1.41)
131
+ rubocop-factory_bot (2.23.1)
132
+ rubocop (~> 1.33)
113
133
  rubocop-graphql (0.19.0)
114
134
  rubocop (>= 0.87, < 2)
115
- rubocop-performance (1.9.2)
116
- rubocop (>= 0.90.0, < 2.0)
135
+ rubocop-performance (1.18.0)
136
+ rubocop (>= 1.7.0, < 2.0)
117
137
  rubocop-ast (>= 0.4.0)
118
- rubocop-rails (2.9.1)
138
+ rubocop-rails (2.20.2)
119
139
  activesupport (>= 4.2.0)
120
140
  rack (>= 1.1)
121
- rubocop (>= 0.90.0, < 2.0)
122
- rubocop-rspec (1.44.1)
123
- rubocop (~> 0.87)
124
- rubocop-ast (>= 0.7.1)
141
+ rubocop (>= 1.33.0, < 2.0)
142
+ rubocop-rspec (2.22.0)
143
+ rubocop (~> 1.33)
144
+ rubocop-capybara (~> 2.17)
145
+ rubocop-factory_bot (~> 2.22)
125
146
  ruby-progressbar (1.13.0)
147
+ ruby2_keywords (0.0.5)
126
148
  ruby_parser (3.20.1)
127
149
  sexp_processor (~> 4.16)
128
150
  sexp_processor (4.17.0)
@@ -173,24 +195,28 @@ GEM
173
195
  tty-screen (~> 0.8)
174
196
  tzinfo (2.0.6)
175
197
  concurrent-ruby (~> 1.0)
176
- unicode-display_width (1.8.0)
198
+ unicode-display_width (2.4.2)
177
199
  unicode_utils (1.4.0)
200
+ vcr (6.2.0)
178
201
  webmock (3.18.1)
179
202
  addressable (>= 2.8.0)
180
203
  crack (>= 0.3.2)
181
204
  hashdiff (>= 0.4.0, < 2.0.0)
182
205
  wisper (2.0.1)
206
+ zeitwerk (2.6.13)
183
207
 
184
208
  PLATFORMS
185
209
  ruby
186
210
 
187
211
  DEPENDENCIES
188
212
  dri!
189
- gitlab-styles (~> 7.0.0)
213
+ gitlab-styles (~> 10)
214
+ lefthook (~> 1.3)
190
215
  pry (~> 0.14.1)
191
216
  rake (~> 13.0)
192
217
  rspec (~> 3.10.0)
193
218
  timecop (~> 0.9.1)
219
+ vcr (~> 6.2.0)
194
220
  webmock (~> 3.5)
195
221
 
196
222
  BUNDLED WITH