bug 1435753 - Resume collection of extended data from Release Candidate builds on beta, too r?gfritzsche,froydnj
Before Firefox 58 we collected extended collection from users on nightly,
aurora, and beta. Then we had to change things (see
bug 1406391).
In doing so, we accidentally stopped receiving data from "release candidate"
beta builds. This patch resumes that collection by detecting an RC build as
having a MOZ_UPDATE_CHANNEL of "release", but an app.update.channel of "beta"
MozReview-Commit-ID: 3EzzDtQj8Kw
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -3893,19 +3893,31 @@ Preferences::InitInitialObjects()
// We only want extended data from pre-release channels due to size. We
// also want it to be recorded for local developer builds (non-official builds
// on the "default" channel).
bool developerBuild = false;
#ifndef MOZILLA_OFFICIAL
developerBuild = !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "default");
#endif
+ // Release Candidate builds are builds that think they are release builds, but
+ // are shipped to beta users. We still need extended data from these users.
+ bool releaseCandidateOnBeta = false;
+ if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "release")) {
+ nsAutoCString updateChannelPrefValue;
+ Preferences::GetCString(kChannelPref, updateChannelPrefValue,
+ PrefValueKind::Default);
+ releaseCandidateOnBeta = updateChannelPrefValue.EqualsLiteral("beta");
+ }
+
if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "nightly") ||
!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "aurora") ||
- !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta") || developerBuild) {
+ !strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta") ||
+ developerBuild ||
+ releaseCandidateOnBeta) {
Preferences::SetBoolInAnyProcess(
kTelemetryPref, true, PrefValueKind::Default);
} else {
Preferences::SetBoolInAnyProcess(
kTelemetryPref, false, PrefValueKind::Default);
}
Preferences::LockInAnyProcess(kTelemetryPref);
#endif // MOZ_WIDGET_ANDROID
--- a/toolkit/components/telemetry/TelemetryController.jsm
+++ b/toolkit/components/telemetry/TelemetryController.jsm
@@ -633,18 +633,22 @@ var Impl = {
// on Release/ESR.
let prereleaseChannels = ["nightly", "aurora", "beta"];
if (!AppConstants.MOZILLA_OFFICIAL) {
// Turn extended telemetry for local developer builds.
prereleaseChannels.push("default");
}
const isPrereleaseChannel =
prereleaseChannels.includes(AppConstants.MOZ_UPDATE_CHANNEL);
+ const isReleaseCandidateOnBeta =
+ AppConstants.MOZ_UPDATE_CHANNEL === "release" &&
+ Services.prefs.getCharPref("app.update.channel", null) === "beta";
Telemetry.canRecordBase = true;
Telemetry.canRecordExtended = isPrereleaseChannel ||
+ isReleaseCandidateOnBeta ||
Services.prefs.getBoolPref(TelemetryUtils.Preferences.OverridePreRelease, false);
} else {
// We're not on unified Telemetry, stick to the old behaviour for
// supporting Fennec.
Telemetry.canRecordBase = Telemetry.canRecordExtended = Utils.isTelemetryEnabled;
}
this._log.config("enableTelemetryRecording - canRecordBase:" + Telemetry.canRecordBase +