-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
u3d/*: failure reporter #267
Conversation
lib/u3d/failure_reporter.rb
Outdated
require 'json' | ||
|
||
module U3d | ||
class FailureReporter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document as internal?
class << self | ||
def report(failure_type: "DEFAULT", failure_message: "", data: {}) | ||
return unless ENV['U3D_REPORT_FAILURES'] | ||
report = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe wrap this into a rescue. We don't want this to fail the build in any way.
Would logging the errors in the same place as the u3d.log file be a better idea? we wouldn't have to search for them. Have you looked at how to reuse the generated json files to improve the matchers? |
d518cd6
to
879c6a8
Compare
I'm not sure about WDYT? |
My issue is that they would be on our build server, in a place where I can't really get a hold of them. Let's keep it like that for now. We might want to send them to a remote place later. |
509dea1
to
42ba0c5
Compare
Pull Request Checklist
bundle exec rspec
to make sure that my PR didn't break any testbundle exec rubocop
to make sure that my PR is inline with our code stylePull Request Description
Addresses #146
Requires #266 to be merged
This implements a simple failure report method, which stores failures so that they can be consulted later. The failure reporter is used in the log_analyzer.