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

Ignore all failures while uploading analytics data #1858

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

bartekpacia
Copy link
Contributor

@bartekpacia bartekpacia commented Jul 31, 2024

Could not reproduce #1850, but this should fix it anyway.

@bartekpacia bartekpacia changed the title try to repro - fail (JDK17) Ignore all failures while uploading analytics data Jul 31, 2024
@bartekpacia bartekpacia marked this pull request as ready for review July 31, 2024 08:55
// This is less fine. Don't crash, but ask the user to report this.
println("Exception ocurred while uploading analytics. This is not a fatal issue, but we ask you to report it.")
println(e.message)
println(e.stackTraceToString())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we want to print it on cli?

I don't think this would have any meaning for user. For us yes then maybe log this in maestro.log or some log file instead.

Copy link
Contributor Author

@bartekpacia bartekpacia Jul 31, 2024

Choose a reason for hiding this comment

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

We want to make sure analytics data is flowing to us. If we will just swallow the exception, we will never learn if we silently break sth in analytics.

So far the only known issue w.r.t analytics is #1850 (which will be fixed by this PR), so I don't expect this to cause a lot of noise.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't really see value of showing this to user. Maybe there is a better option to provide this observability then?

Users don't really care about analytics, we do. So, maybe we opt another way for this observability WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the best solution would be to connect Sentry (or any other log reporting service)? That would be a lot of work though.

Actually, we already have an ErrorReporter. I just took a look at BigQuery, and it looks pretty solid. (query link - internal only)

The problem is that we don't wrap our whole app with the ErrorReporter, so not all errors are reported. This is a separate issue though.

For now I agree with you, let's remove this message for the good of our users.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes you can create a separate issue for this. Its definitely useful though!

return
} catch (e: Exception) {
// This is also fine. We don't want to bug the user.
// See discussion at https://github.com/mobile-dev-inc/maestro/pull/1858
Copy link
Collaborator

@amanjeetsingh150 amanjeetsingh150 Jul 31, 2024

Choose a reason for hiding this comment

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

Missing return?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's end of the function anyway, but yeah, I added the return.

@bartekpacia bartekpacia merged commit 9b2f294 into main Jul 31, 2024
4 checks passed
@bartekpacia bartekpacia deleted the fix/simulator_runtimes_npe branch July 31, 2024 10:37
// We don't care that much about analytics to bug user about it.
return
} catch (e: Exception) {
// This is also fine. We don't want to bug the user.
Copy link
Collaborator

Choose a reason for hiding this comment

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

you don't even want to log this?

quietly dropping exceptions sounds like a bad idea...

Copy link
Collaborator

Choose a reason for hiding this comment

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

We are gonna do it on separate PR as discussed above.

Copy link
Contributor Author

@bartekpacia bartekpacia Aug 2, 2024

Choose a reason for hiding this comment

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

created #1874 to track this

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.

Simulator runtimes not found. java.lang.NullPointerException: list must not be null
3 participants