Skip to content

Commit

Permalink
Merge pull request #117 from buildkite/update-error-messages
Browse files Browse the repository at this point in the history
Update rspec-buildkite-analytics with buildkite-test_collector
  • Loading branch information
JuanitoFatas authored Jun 9, 2022
2 parents 8157f06 + ad94a45 commit b81247b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

# Specify your gem's dependencies in rspec-buildkite-analytics.gemspec
# Specify your gem's dependencies in the gemspec
gemspec

gem "rake", "~> 13.0"
Expand Down
6 changes: 3 additions & 3 deletions lib/buildkite/test_collector/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def initialize(url, authorization_header, channel)
reconnection_count += 1
connect
rescue TimeoutError, InitialConnectionFailure => e
Buildkite::TestCollector.logger.warn("rspec-buildkite-analytics could not establish an initial connection with Buildkite due to #{e}. Attempting retry #{reconnection_count} of #{MAX_RECONNECTION_ATTEMPTS}...")
Buildkite::TestCollector.logger.warn("buildkite-test_collector could not establish an initial connection with Buildkite due to #{e}. Attempting retry #{reconnection_count} of #{MAX_RECONNECTION_ATTEMPTS}...")
if reconnection_count > MAX_RECONNECTION_ATTEMPTS
Buildkite::TestCollector.logger.error "rspec-buildkite-analytics could not establish an initial connection with Buildkite due to #{e.message} after #{MAX_RECONNECTION_ATTEMPTS} attempts. You may be missing some data for this test suite, please contact support if this issue persists."
Buildkite::TestCollector.logger.error "buildkite-test_collector could not establish an initial connection with Buildkite due to #{e.message} after #{MAX_RECONNECTION_ATTEMPTS} attempts. You may be missing some data for this test suite, please contact support if this issue persists."
else
sleep(WAIT_BETWEEN_RECONNECTIONS)
Buildkite::TestCollector.logger.warn("retrying reconnection")
Expand Down Expand Up @@ -77,7 +77,7 @@ def disconnected(connection)
rescue *DISCONNECTED_EXCEPTIONS => e
Buildkite::TestCollector.logger.warn("failed reconnection attempt #{reconnection_count} due to #{e}")
if reconnection_count > MAX_RECONNECTION_ATTEMPTS
Buildkite::TestCollector.logger.error "rspec-buildkite-analytics experienced a disconnection and could not reconnect to Buildkite due to #{e.message}. Please contact support."
Buildkite::TestCollector.logger.error "buildkite-test_collector experienced a disconnection and could not reconnect to Buildkite due to #{e.message}. Please contact support."
raise e
else
sleep(WAIT_BETWEEN_RECONNECTIONS)
Expand Down
2 changes: 1 addition & 1 deletion lib/buildkite/test_collector/uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def self.configure
end
else
request_id = response.to_hash["x-request-id"]
Buildkite::TestCollector.logger.info "rspec-buildkite-analytics could not establish an initial connection with Buildkite. You may be missing some data for this test suite, please contact support with request ID #{request_id}."
Buildkite::TestCollector.logger.info "buildkite-test_collector could not establish an initial connection with Buildkite. You may be missing some data for this test suite, please contact support with request ID #{request_id}."
end
else
if !!ENV["BUILDKITE_BUILD_ID"]
Expand Down

0 comments on commit b81247b

Please sign in to comment.