knapsack_pro 7.6.1 → 7.7.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/.circleci/config.yml +12 -0
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/knapsack_pro/formatters/time_tracker.rb +1 -0
- data/lib/knapsack_pro/runners/queue/base_runner.rb +28 -0
- data/lib/knapsack_pro/version.rb +1 -1
- data/spec/integration/runners/queue/rspec_runner_spec.rb +12 -0
- metadata +3 -3
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/.circleci/config.yml
CHANGED
@@ -165,6 +165,18 @@ jobs:
|
|
165
165
|
export KNAPSACK_PRO_ENDPOINT=https://api-fake.knapsackpro.com
|
166
166
|
export KNAPSACK_PRO_MAX_REQUEST_RETRIES=1
|
167
167
|
bundle exec rake knapsack_pro:rspec
|
168
|
+
- run:
|
169
|
+
working_directory: ~/rails-app-with-knapsack_pro
|
170
|
+
command: |
|
171
|
+
# ensures KnapsackPro::Formatters::TimeTracker works when the .rspec file does not exist
|
172
|
+
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--no-dot-rspec-file"
|
173
|
+
mv .rspec .rspec.off
|
174
|
+
# load test files that require spec_helper explicitly
|
175
|
+
export KNAPSACK_PRO_TEST_FILE_PATTERN="{spec/time_tracker_spec.rb}"
|
176
|
+
bundle exec rake knapsack_pro:rspec
|
177
|
+
RSPEC_EXIT_CODE=$?
|
178
|
+
mv .rspec.off .rspec
|
179
|
+
exit $RSPEC_EXIT_CODE
|
168
180
|
- run:
|
169
181
|
working_directory: ~/rails-app-with-knapsack_pro
|
170
182
|
command: |
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@
|
|
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
|
+
|
13
|
+
### 7.6.2
|
14
|
+
|
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.
|
16
|
+
|
17
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/265
|
18
|
+
|
19
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.6.1...v7.6.2
|
20
|
+
|
5
21
|
### 7.6.1
|
6
22
|
|
7
23
|
* Add support for the Timecop 0.9.9 gem version so that we could track proper tests' execution time when `Process.clock_gettime` is mocked.
|
data/README.md
CHANGED
@@ -78,7 +78,7 @@ Scripted tests can be found in the [Rails App With Knapsack Pro repository](http
|
|
78
78
|
|
79
79
|
2. Update the gem version in `lib/knapsack_pro/version.rb`
|
80
80
|
|
81
|
-
3. `git commit -am "
|
81
|
+
3. `git commit -am "Bump version x.x.x"`
|
82
82
|
|
83
83
|
4. Build, tag, push, release: `bundle exec rake release`
|
84
84
|
|
@@ -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
|