Revert "DEV: Debug AR connection pool queue on CI (#25687)" (#25714)

This reverts commit 796af077c5.

We have not seen checkout timeout errors since c30aeafd9d
This commit is contained in:
Alan Guo Xiang Tan 2024-02-16 10:11:46 +08:00 committed by GitHub
parent 64b4e0d08d
commit ad900ef9dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 42 deletions

View File

@ -244,7 +244,6 @@ jobs:
if: matrix.build_type == 'system' && matrix.target == 'plugins'
env:
CHECKOUT_TIMEOUT: 10
DEBUG_AR_CONNECTION_QUEUE: 1
run: |
GLOBIGNORE="plugins/chat/*";
LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system
@ -255,7 +254,6 @@ jobs:
if: matrix.build_type == 'system' && matrix.target == 'chat'
env:
CHECKOUT_TIMEOUT: 10
DEBUG_AR_CONNECTION_QUEUE: 1
run: LOAD_PLUGINS=1 RAILS_ENABLE_TEST_LOG=1 RAILS_TEST_LOG_LEVEL=error PARALLEL_TEST_PROCESSORS=4 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/chat/spec/system
timeout-minutes: 30

View File

@ -1,40 +0,0 @@
# frozen_string_literal: true
if ENV["DEBUG_AR_CONNECTION_QUEUE"] == "1"
module QueuePatch
# Add +element+ to the queue. Never blocks.
def add(element)
puts "::group::##{Process.pid} Adding element to the queue"
puts Thread.current.backtrace.first(30).join("\n")
puts "::endgroup::"
super
end
# If +element+ is in the queue, remove and return it, or +nil+.
def delete(element)
puts "::group::##{Process.pid} Delete element from the queue"
puts Thread.current.backtrace.first(30).join("\n")
puts "::endgroup::"
super
end
# Remove all elements from the queue.
def clear
puts "::group::##{Process.pid} Clear all elements from the queue"
puts Thread.current.backtrace.first(30).join("\n")
puts "::endgroup::"
super
end
private
def remove
puts "::group::##{Process.pid} Removing element from the queue"
puts Thread.current.backtrace.first(30).join("\n")
puts "::endgroup::"
super
end
end
ActiveRecord::ConnectionAdapters::ConnectionPool::Queue.prepend(QueuePatch)
end