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

Move WordPress Analytics from GravatarApi to WPAndroid #19948

Merged

Conversation

maxme
Copy link
Contributor

@maxme maxme commented Jan 15, 2024

This goes with the branch gravatar/8-change-onerror-signature


To Test:

Try to upload a new gravatar, use network throttler to generate timeout errors or proxy to generate other network issues.


Regression Notes

  1. Potential unintended areas of impact

    • ME_GRAVATAR_UPLOAD_EXCEPTION properties have changed, but looking at the existing analytics, I think the changes are actually good, this will help to differentiate the different kinds of error. For details, the Gravatar backend is actually logging those.
    • ME_GRAVATAR_UPLOAD_xxx are used in the Signup screen, I haven't changed that but the event name doesn't make sense there, we should maybe rename these events: GRAVATAR_UPLOAD_ERROR and GRAVATAR_UPLOAD_SUCCESS, this will have an impact on the history and if we do this change, we want to make sure WPiOS does the same.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • No existing automated tests
  3. What automated tests I added (or what prevented me from doing so)

    • None, but we will add some on Gravatar's side

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes Testing Checklist:

  • No UI change

@maxme maxme requested a review from hamorillo January 15, 2024 14:10
@maxme maxme added the /Me label Jan 15, 2024
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@@ -689,7 +690,6 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
fun onEventMainThread(event: GravatarUploadFinished) {
binding?.showGravatarProgressBar(false)
if (event.success) {
AnalyticsTracker.track(ME_GRAVATAR_UPLOADED)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a note here, I removed this one because ME_GRAVATAR_UPLOADED is already tracked on line 676

AppLog.i(T.NUX, "Google avatar download and Gravatar upload failed.");
// FIXME: Don't track exceptions caused by poor internet connectivity
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously some exceptions were ignored. I wasn't sure what to do, this could actually hide some underlying problems like a too short default timeout, so I decided to drop the filter.

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks better this way. We don't want to hide any exceptions, at least in the app.

Copy link
Contributor

@hamorillo hamorillo left a comment

Choose a reason for hiding this comment

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

🚀 LGTM!

@maxme maxme merged commit 2908256 into gravatar-library Jan 16, 2024
9 of 21 checks passed
@maxme maxme deleted the gravatar/10-move-analytics-on-wpandroid-side branch January 16, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants