Closed Bug 1275669 Opened 7 years ago Closed 7 years ago
Don't make adjust pings from automation
58 bytes, text/x-review-board-request
tldr; adjust is enabled for local & automation release & beta builds. Investigation: There are two ways I see that we can disable adjust in automation: 1) PREFS_HEALTH_REPORT_UPLOAD_ENABLED allows the user to opt-out of Adjust . However, it does not appear to be set in anyway in automation either from it's Java constant , or the Java constant's value . 2) We return a different AdjustHelper instance depending on the flags specified  – the stub helper makes the calls have no effect. We return the real helper when MOZ_INSTALL_TRACKING is defined, which occurs when RELEASE_BUILD & MOZ_NATIVE_DEVICES is defined . - MOZ_NATIVE_DEVICES is defined when we're not resource constrained , which is never since we removed Gingerbread (bug 1220184 & I filed bug 1275721 to remove the resource constrained constants). - RELEASE_BUILD reads from milestone.txt  and is defined when the the version number doesn't include "a". In the beta tree, this is defined as "47.0" , meaning both automation & local beta builds have adjust installed. I also looked when MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN is null, but it throws in that case. : https://dxr.mozilla.org/mozilla-central/rev/d6d4e8417d2fd71fdf47c319b7a217f6ace9d5a5/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#707 : https://dxr.mozilla.org/mozilla-central/search?q=PREFS_HEALTHREPORT_UPLOAD_ENABLED&redirect=false : https://dxr.mozilla.org/mozilla-central/search?q=healthreport.uploadEnabled&redirect=false : https://dxr.mozilla.org/mozilla-central/rev/d6d4e8417d2fd71fdf47c319b7a217f6ace9d5a5/mobile/android/base/AdjustConstants.java.in#25 : https://dxr.mozilla.org/mozilla-central/rev/5511d54a3f172c1d68f98cc55dce4de1d0ba1b51/mobile/android/confvars.sh#58 : https://dxr.mozilla.org/mozilla-central/rev/5511d54a3f172c1d68f98cc55dce4de1d0ba1b51/mobile/android/confvars.sh#51 : https://dxr.mozilla.org/mozilla-central/rev/5511d54a3f172c1d68f98cc55dce4de1d0ba1b51/build/moz.configure/init.configure#652 : https://dxr.mozilla.org/mozilla-beta/source/config/milestone.txt
To disable adjust in automation, we can look at the approach of bug 1270191. In that bug, I'm hoping to come up with a more comprehensive solution for disabling features during automation so we should probably wait until it lands before trying to fix this. Additionally, we have to disable Adjust for local builds, which we should be able to do by taking into account the value of the MOZILLA_OFFICIAL constant (like TelemetryConstants ). : https://dxr.mozilla.org/mozilla-central/rev/d6d4e8417d2fd71fdf47c319b7a217f6ace9d5a5/mobile/android/base/java/org/mozilla/gecko/telemetry/TelemetryConstants.java#12
Depends on: 1270191
Review commit: https://reviewboard.mozilla.org/r/57316/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/57316/
Attachment #8759325 - Flags: review?(gkruglov)
Comment on attachment 8759325 [details] Bug 1275669 - Do not enable adjust if we are in automation. https://reviewboard.mozilla.org/r/57316/#review54478 Looks good to me.
Attachment #8759325 - Flags: review?(gkruglov) → review+
https://hg.mozilla.org/integration/fx-team/rev/b5b132baef727992998454cfa8bb2c2aefe3f4ad Bug 1275669 - Do not enable adjust if we are in automation. r=grisha
7 years ago
Summary: Investigate whether we're making adjust pings from automation → Don't make adjust pings from automation
You need to log in before you can comment on or make changes to this bug.