dri 0.10.2 → 0.11.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.yml +2 -2
- data/.rubocop.yml +9 -1
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/Gemfile.lock +39 -32
- data/README.md +2 -17
- data/dri.gemspec +5 -4
- data/faq.yaml +7 -7
- data/lib/dri/api_client.rb +48 -2
- data/lib/dri/cli.rb +6 -0
- data/lib/dri/command.rb +4 -1
- data/lib/dri/commands/add/fast_quarantine.rb +74 -0
- data/lib/dri/commands/add.rb +46 -0
- data/lib/dri/commands/analyze/stack_traces.rb +1 -1
- data/lib/dri/commands/faq.rb +1 -1
- data/lib/dri/commands/fetch/failures.rb +82 -23
- data/lib/dri/commands/fetch/featureflags.rb +1 -1
- data/lib/dri/commands/fetch/pipelines.rb +3 -3
- data/lib/dri/commands/fetch/runbooks.rb +1 -1
- data/lib/dri/commands/fetch/testcases.rb +1 -1
- data/lib/dri/commands/fetch/triaged.rb +1 -1
- data/lib/dri/commands/fetch.rb +0 -24
- data/lib/dri/commands/incidents.rb +1 -1
- data/lib/dri/commands/init.rb +1 -1
- data/lib/dri/commands/profile.rb +3 -3
- data/lib/dri/commands/publish/report.rb +2 -4
- data/lib/dri/commands/rm/emoji.rb +1 -1
- data/lib/dri/commands/rm/profile.rb +1 -1
- data/lib/dri/commands/rm/reports.rb +1 -1
- data/lib/dri/commands/view/fast_quarantine.rb +27 -0
- data/lib/dri/commands/view.rb +23 -0
- data/lib/dri/feature_flag_report.rb +1 -1
- data/lib/dri/report.rb +12 -52
- data/lib/dri/support/influxdb_tools.rb +37 -0
- data/lib/dri/utils/constants.rb +2 -1
- data/lib/dri/version.rb +1 -1
- metadata +26 -8
- data/lib/dri/commands/fetch/quarantines.rb +0 -55
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Test Platform
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amatch
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.21.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: influxdb-client
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.9'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: json
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,14 +268,14 @@ dependencies:
|
|
254
268
|
requirements:
|
255
269
|
- - "~>"
|
256
270
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
271
|
+
version: '10'
|
258
272
|
type: :development
|
259
273
|
prerelease: false
|
260
274
|
version_requirements: !ruby/object:Gem::Requirement
|
261
275
|
requirements:
|
262
276
|
- - "~>"
|
263
277
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
278
|
+
version: '10'
|
265
279
|
- !ruby/object:Gem::Dependency
|
266
280
|
name: pry
|
267
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -362,6 +376,8 @@ files:
|
|
362
376
|
- lib/dri/api_client.rb
|
363
377
|
- lib/dri/cli.rb
|
364
378
|
- lib/dri/command.rb
|
379
|
+
- lib/dri/commands/add.rb
|
380
|
+
- lib/dri/commands/add/fast_quarantine.rb
|
365
381
|
- lib/dri/commands/analyze.rb
|
366
382
|
- lib/dri/commands/analyze/stack_traces.rb
|
367
383
|
- lib/dri/commands/faq.rb
|
@@ -369,7 +385,6 @@ files:
|
|
369
385
|
- lib/dri/commands/fetch/failures.rb
|
370
386
|
- lib/dri/commands/fetch/featureflags.rb
|
371
387
|
- lib/dri/commands/fetch/pipelines.rb
|
372
|
-
- lib/dri/commands/fetch/quarantines.rb
|
373
388
|
- lib/dri/commands/fetch/runbooks.rb
|
374
389
|
- lib/dri/commands/fetch/testcases.rb
|
375
390
|
- lib/dri/commands/fetch/triaged.rb
|
@@ -382,15 +397,18 @@ files:
|
|
382
397
|
- lib/dri/commands/rm/emoji.rb
|
383
398
|
- lib/dri/commands/rm/profile.rb
|
384
399
|
- lib/dri/commands/rm/reports.rb
|
400
|
+
- lib/dri/commands/view.rb
|
401
|
+
- lib/dri/commands/view/fast_quarantine.rb
|
385
402
|
- lib/dri/feature_flag_report.rb
|
386
403
|
- lib/dri/gitlab/issues.rb
|
387
404
|
- lib/dri/refinements/truncate.rb
|
388
405
|
- lib/dri/report.rb
|
406
|
+
- lib/dri/support/influxdb_tools.rb
|
389
407
|
- lib/dri/utils/constants.rb
|
390
408
|
- lib/dri/utils/markdown_lists.rb
|
391
409
|
- lib/dri/utils/table.rb
|
392
410
|
- lib/dri/version.rb
|
393
|
-
homepage: https://gitlab.com/gitlab-org/
|
411
|
+
homepage: https://gitlab.com/gitlab-org/ruby/gems/dri
|
394
412
|
licenses:
|
395
413
|
- MIT
|
396
414
|
metadata: {}
|
@@ -402,7 +420,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
402
420
|
requirements:
|
403
421
|
- - ">="
|
404
422
|
- !ruby/object:Gem::Version
|
405
|
-
version:
|
423
|
+
version: 3.0.0
|
406
424
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
407
425
|
requirements:
|
408
426
|
- - ">="
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../command'
|
4
|
-
require_relative '../../utils/table'
|
5
|
-
require_relative '../../utils/constants'
|
6
|
-
|
7
|
-
module Dri
|
8
|
-
module Commands
|
9
|
-
class Fetch
|
10
|
-
class Quarantines < Dri::Command
|
11
|
-
include Dri::Utils::Table
|
12
|
-
include Dri::Utils::Constants::Triage::Labels
|
13
|
-
using Refinements
|
14
|
-
|
15
|
-
def initialize(options, search: '[QUARANTINE]')
|
16
|
-
@options = options
|
17
|
-
@search = search
|
18
|
-
|
19
|
-
@today_iso_format = Time.now.strftime('%Y-%m-%dT00:00:00Z')
|
20
|
-
end
|
21
|
-
|
22
|
-
def execute(input: $stdin, output: $stdout)
|
23
|
-
verify_config_exists
|
24
|
-
title = add_color('Example name', :bright_yellow)
|
25
|
-
url = add_color('URL', :bright_yellow)
|
26
|
-
|
27
|
-
headers = [title, url]
|
28
|
-
mrs = []
|
29
|
-
|
30
|
-
logger.info "Fetching #{@search} MRs..."
|
31
|
-
|
32
|
-
spinner.run do
|
33
|
-
response = api_client.fetch_mrs(
|
34
|
-
project_id: 'gitlab-org/gitlab',
|
35
|
-
labels: "#{QA},#{QUALITY}",
|
36
|
-
search: @search,
|
37
|
-
in: :title,
|
38
|
-
state: :opened
|
39
|
-
)
|
40
|
-
|
41
|
-
mrs = response.each_with_object([]) do |mr, found_mrs|
|
42
|
-
title = mr.title[13..].truncate(60) # remove the "[QUARANTINE] " prefix
|
43
|
-
url = mr.web_url
|
44
|
-
|
45
|
-
found_mrs << [title, url]
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
print_table(headers, mrs, alignments: [:left, :left])
|
50
|
-
output.puts "Found #{mrs.size} open #{@search} MRs"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|