knapsack_pro 7.6.2 → 7.7.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d9f69e3b0bb57140c1efc90528f7151a7cee10998ec84fe8c87b46767a08aa7
|
4
|
+
data.tar.gz: 5a60c75f51c4909352c022eb74626c831c514ba644f3da5a368a26f2838487bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93725a31ebe826cfc133f717d02d22d502ab989eaabd7972f0955d32358301685cb3475b18714df69a77be4c04c5fc59dce7fcdc39556b9fd5d070978153a2b4
|
7
|
+
data.tar.gz: 667419cf885ebd7ee1d18420d002d4ad752d973399fb3a980321cbfb0dd41415865445851add3d7641023a05499369dd83c10fadb56171a39c08fa8a991f2b03
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
### UNRELEASED
|
4
4
|
|
5
|
+
### 7.7.0
|
6
|
+
|
7
|
+
* Log threads when the OS signal is received to simplify debugging, especially when a CI node hangs.
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/266
|
10
|
+
|
11
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.6.2...v7.7.0
|
12
|
+
|
5
13
|
### 7.6.2
|
6
14
|
|
7
15
|
* Fix an error for the `KnapsackPro::Formatters::TimeTracker` formatter in RSpec when using Knapsack Pro Regular Mode and the `.rspec` file is not present.
|
@@ -59,9 +59,37 @@ module KnapsackPro
|
|
59
59
|
Signal.trap(signal) {
|
60
60
|
puts "#{signal} signal has been received. Terminating Knapsack Pro..."
|
61
61
|
@@terminate_process = true
|
62
|
+
log_threads
|
62
63
|
}
|
63
64
|
end
|
64
65
|
end
|
66
|
+
|
67
|
+
def log_threads
|
68
|
+
threads = Thread.list
|
69
|
+
|
70
|
+
puts
|
71
|
+
puts '=' * 80
|
72
|
+
puts "Start logging #{threads.count} detected threads."
|
73
|
+
puts 'Use the following backtrace(s) to find the line of code that got stuck if the CI node hung and terminated your tests.'
|
74
|
+
|
75
|
+
threads.each do |thread|
|
76
|
+
puts
|
77
|
+
if thread == Thread.main
|
78
|
+
puts "Main thread backtrace:"
|
79
|
+
else
|
80
|
+
puts "Non-main thread inspect: #{thread.inspect}"
|
81
|
+
puts "Non-main thread backtrace:"
|
82
|
+
end
|
83
|
+
puts thread.backtrace.join("\n")
|
84
|
+
puts
|
85
|
+
end
|
86
|
+
|
87
|
+
puts
|
88
|
+
puts 'End logging threads.'
|
89
|
+
puts '=' * 80
|
90
|
+
|
91
|
+
$stdout.flush
|
92
|
+
end
|
65
93
|
end
|
66
94
|
end
|
67
95
|
end
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -1318,6 +1318,10 @@ describe "#{KnapsackPro::Runners::Queue::RSpecRunner} - Integration tests", :cle
|
|
1318
1318
|
describe 'A_describe' do
|
1319
1319
|
it 'A1 test example' do
|
1320
1320
|
expect(1).to eq 1
|
1321
|
+
|
1322
|
+
Thread.new do
|
1323
|
+
sleep 10
|
1324
|
+
end
|
1321
1325
|
end
|
1322
1326
|
end
|
1323
1327
|
SPEC
|
@@ -1406,6 +1410,14 @@ describe "#{KnapsackPro::Runners::Queue::RSpecRunner} - Integration tests", :cle
|
|
1406
1410
|
OUTPUT
|
1407
1411
|
)
|
1408
1412
|
|
1413
|
+
|
1414
|
+
expect(actual.stdout).to include('Use the following backtrace(s) to find the line of code that got stuck if the CI node hung and terminated your tests.')
|
1415
|
+
expect(actual.stdout).to include('Main thread backtrace:')
|
1416
|
+
expect(actual.stdout).to include("spec_integration/b_spec.rb:7:in `kill'")
|
1417
|
+
expect(actual.stdout).to include('Non-main thread backtrace:')
|
1418
|
+
expect(actual.stdout).to include("spec_integration/a_spec.rb:6:in `sleep'")
|
1419
|
+
|
1420
|
+
|
1409
1421
|
expect(actual.exit_code).to eq 1
|
1410
1422
|
end
|
1411
1423
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -415,7 +415,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
415
415
|
- !ruby/object:Gem::Version
|
416
416
|
version: '0'
|
417
417
|
requirements: []
|
418
|
-
rubygems_version: 3.5.
|
418
|
+
rubygems_version: 3.5.11
|
419
419
|
signing_key:
|
420
420
|
specification_version: 4
|
421
421
|
summary: Knapsack Pro splits tests across parallel CI nodes and ensures each parallel
|