Skip to content

Commit

Permalink
Merge pull request #298 from Shopify/cbruckmayer/ignore-ci-queue-errors
Browse files Browse the repository at this point in the history
Ignore ci-queue errors
  • Loading branch information
ChrisBr authored Dec 10, 2024
2 parents c9afcaa + 6124401 commit 6b25c40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions ruby/lib/ci/queue/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Queue
module Redis
Error = Class.new(StandardError)
LostMaster = Class.new(Error)
ReservationError = Class.new(Error)

class << self

Expand Down
2 changes: 0 additions & 2 deletions ruby/lib/ci/queue/redis/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
module CI
module Queue
module Redis
ReservationError = Class.new(StandardError)

class << self
attr_accessor :requeue_offset
end
Expand Down
7 changes: 7 additions & 0 deletions ruby/lib/minitest/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ def run_from_queue(reporter, *)
reopen_previous_step
puts red("The heartbeat process died. This worker is exiting early.")
exit!(41)
rescue CI::Queue::Redis::Error
reopen_previous_step
puts red("#{error.class}: #{error.message}")
error.backtrace.each do |frame|
puts red(frame)
end
exit!(41)
rescue => error
reopen_previous_step
queue.report_worker_error(error)
Expand Down

0 comments on commit 6b25c40

Please sign in to comment.