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

Report internal errors when serialization fails #581

Merged
merged 11 commits into from
Sep 17, 2019

Conversation

fractalwrench
Copy link
Contributor

Goal

#570 added internal error reports for deserialization, which are delivered to Bugsnag when an unanticipated error occurred. This adds similar functionality for the serialization case, which will allow us to diagnose errors when writing files.

Changeset

  • Moved delegate property to FileStore so that serialisation errors are captured for errors/session payloads
  • Sent internal reports in two additional cases:
    • When copying an NDK report to the JVM directory fails
    • When serializing a JVM report to disk fails
  • Captured the following additional diagnostic info in reports:
canRead // whether the file is readable
canWrite // whether the file is writable
exists // whether the file exists
usableSpace // the amount of usable space in bytes in the cache directory

@fractalwrench fractalwrench changed the base branch from master to next September 4, 2019 08:34
Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few concerns inline though my biggest right now is how can this change be verified? Is it tested in some way already?

@fractalwrench
Copy link
Contributor Author

I originally tested this by assembling a local artefact, altering the relevant code to always throw an exception, then checking on a local server that the payload was correct. I've also tested against our internal instance and verified the exceptions are picked up.

This doesn't seem like the sort of change that would be feasible to test in an automated way - at least, I can't think of a good way to achieve that.

CHANGELOG.md Outdated Show resolved Hide resolved
@fractalwrench fractalwrench merged commit bcf0fba into next Sep 17, 2019
@fractalwrench fractalwrench deleted the serialization-error-reporting branch September 17, 2019 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants