buildkite / test-collector-ruby

Buildkite Test Analytics collector for Ruby test frameworks
http://buildkite.com/test-analytics
MIT License
15 stars 26 forks source link

Cannot debug uploader errors #194

Closed dzunk closed 1 year ago

dzunk commented 1 year ago

Hello, we're trying out Buildkite right now and I'm trying to set up test reporting. Currently receiving the generic error:

buildkite-test_collector 2.3.0 experienced an error when sending your data, you may be missing some executions for this run.

It looks like this was recently introduced in https://github.com/buildkite/test-collector-ruby/pull/191, however the side effect is that the actual error message and backtrace are swallowed, so I don't have a way to see what the error is or continue debugging.

Potential solutions:

If the change(s) make sense to y'all, happy to contribute one or both of them.

dzunk commented 1 year ago

FWIW the error was:

VCR::Errors::UnhandledHTTPRequestError: 

================================================================================
An HTTP request has been made that VCR does not know how to handle:
  POST https://analytics-api.buildkite.com/v1/uploads

Which may be worth a brief mention in the docs. Need to set:

VCR.configure do |c|
  c.ignore_hosts "analytics-api.buildkite.com"
end
nprizal commented 1 year ago

Hi @dzunk thanks for raising this issue. We used to have a debugging support which we removed when we moved away from websocket https://github.com/buildkite/test-collector-ruby/pull/179. Adding a debugging back that will bypass the rescue and bubble the error is something we are reluctant to support because we don't want the collector to fail the builds. However, we can still log the error as you suggested.

As for the specific error that you got, I agree that it needs to mentioned in the doc. I will open a PR for this isue.

dzunk commented 1 year ago

Resolved in version 2.3.1! Thanks for the quick action