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

Report http response errors during upoad. #223

Closed zhming0 closed 2 days ago

zhming0 commented 3 days ago

part of PIE-2813

Fix uploader so it will throw a runtime error if backend does not return 2xx. This will result in a log message if any upload fails.

Note it will not fail a build if the upload fails.

wooly commented 3 days ago

I'm not super keen on this, since it will cause people's builds to fail if the upload API is down. I always thought of the test collectors as a best-effort service.

What do you think about making this a configuration option so people could turn it on if they so wished? How does this behaviour compare to the other collectors? Do they raise an issue if the data cannot be sent?

zhming0 commented 2 days ago

I'm not super keen on this, since it will cause people's builds to fail if the upload API is down. I always thought of the test collectors as a best-effort service.

@wooly and @nprizal

It won't fail people's build. Our uploader has logic capturing the error.

It was just previously, the error reporting was never working, so we were completely in the dark about what happen in the collector.

wooly commented 2 days ago

@zhming0 ah yep I see it now, sorry for the noise!

zhming0 commented 2 days ago

@gchan I added some tests. 👍🏿