Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a link to help you read the backtrace #267

Merged
merged 4 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

### UNRELEASED

### 7.8.0

* Add a link to help you read the backtrace.

https://github.com/KnapsackPro/knapsack_pro-ruby/pull/267

https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v7.7.0...v7.8.0

### 7.7.0

* Log threads when the OS signal is received to simplify debugging, especially when a CI node hangs.
Expand Down
1 change: 1 addition & 0 deletions lib/knapsack_pro/runners/queue/base_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def log_threads
puts '=' * 80
puts "Start logging #{threads.count} detected threads."
puts 'Use the following backtrace(s) to find the line of code that got stuck if the CI node hung and terminated your tests.'
puts 'How to read the backtrace: https://knapsackpro.com/perma/ruby/backtrace-debugging'

threads.each do |thread|
puts
Expand Down
2 changes: 2 additions & 0 deletions spec/integration/runners/queue/rspec_runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,8 @@ def when_first_matching_example_defined(type:)
Thread.new do
sleep 10
end

sleep 1 # wait for the above async thread to start
end
end
SPEC
Expand Down