Skip to content
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

Merged
merged 6 commits into from
Mar 27, 2018
Merged

Conversation

niezbop
Copy link
Member

@niezbop niezbop commented Mar 14, 2018

Pull Request Checklist

  • My pull request has been rebased on master
  • I ran bundle exec rspec to make sure that my PR didn't break any test
  • I ran bundle exec rubocop to make sure that my PR is inline with our code style
  • I have read the code of conduct

Pull 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.

@niezbop niezbop requested a review from lacostej March 14, 2018 18:10
require 'json'

module U3d
class FailureReporter
Copy link
Member

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 = {
Copy link
Member

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.

@lacostej
Copy link
Member

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?

@niezbop niezbop force-pushed the feature/failure_reporter branch from d518cd6 to 879c6a8 Compare March 26, 2018 15:20
@niezbop
Copy link
Member Author

niezbop commented Mar 26, 2018

I'm not sure about u3d.log. Wouldn't this clutter the project? I believe that this can generate quite a lot of files so that's why I was keeping them in a separate place. Plus it would make cross-project comparison easier. Plus, they are mostly as hard to find as the default u3d.log I believe.

WDYT?

@lacostej
Copy link
Member

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.

@niezbop niezbop force-pushed the feature/failure_reporter branch from 509dea1 to 42ba0c5 Compare March 27, 2018 09:09
@niezbop niezbop merged commit 1469ec0 into DragonBox:master Mar 27, 2018
@niezbop niezbop deleted the feature/failure_reporter branch March 27, 2018 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants