зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1703313 - Remove legacy telemetry scalar binarytransparencyresult r=application-update-reviewers,bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D214313
This commit is contained in:
Родитель
871160ceb9
Коммит
0fe2f1ffc7
|
@ -5371,27 +5371,6 @@ memoryreporter:
|
|||
- 'content'
|
||||
|
||||
update:
|
||||
binarytransparencyresult:
|
||||
bug_numbers:
|
||||
- 1501889
|
||||
description: >
|
||||
If the binary transparency information for an update does not verify
|
||||
successfully, this probe will contain an error code from
|
||||
toolkit/mozapps/update/common/updatererrors.h indicating why.
|
||||
expires: "73"
|
||||
kind: uint
|
||||
keyed: true
|
||||
notification_emails:
|
||||
- application-update-telemetry-alerts@mozilla.com
|
||||
- seceng-telemetry@mozilla.com
|
||||
- dkeeler@mozilla.com
|
||||
release_channel_collection: opt-out
|
||||
products:
|
||||
- 'firefox'
|
||||
- 'fennec'
|
||||
record_in_processes:
|
||||
- main
|
||||
|
||||
bitshresult:
|
||||
bug_numbers:
|
||||
- 1343669
|
||||
|
|
|
@ -110,7 +110,6 @@ const DIR_UPDATE_DOWNLOADING = "downloading";
|
|||
const FILE_ACTIVE_UPDATE_XML = "active-update.xml";
|
||||
const FILE_BACKUP_UPDATE_LOG = "backup-update.log";
|
||||
const FILE_BACKUP_UPDATE_ELEVATED_LOG = "backup-update-elevated.log";
|
||||
const FILE_BT_RESULT = "bt.result";
|
||||
const FILE_LAST_UPDATE_LOG = "last-update.log";
|
||||
const FILE_LAST_UPDATE_ELEVATED_LOG = "last-update-elevated.log";
|
||||
const FILE_UPDATES_XML = "updates.xml";
|
||||
|
@ -1166,33 +1165,6 @@ function readStatusFile(dir) {
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the binary transparency result file from the given directory.
|
||||
* Removes the file if it is present (so don't call this twice and expect a
|
||||
* result the second time).
|
||||
* @param dir
|
||||
* The dir to look for an update.bt file in
|
||||
* @return A error code from verifying binary transparency information or null
|
||||
* if the file was not present (indicating there was no error).
|
||||
*/
|
||||
function readBinaryTransparencyResult(dir) {
|
||||
let binaryTransparencyResultFile = dir.clone();
|
||||
binaryTransparencyResultFile.append(FILE_BT_RESULT);
|
||||
let result = readStringFromFile(binaryTransparencyResultFile);
|
||||
LOG(
|
||||
"readBinaryTransparencyResult - result: " +
|
||||
result +
|
||||
", path: " +
|
||||
binaryTransparencyResultFile.path
|
||||
);
|
||||
// If result is non-null, the file exists. We should remove it to avoid
|
||||
// double-reporting this result.
|
||||
if (result) {
|
||||
binaryTransparencyResultFile.remove(false);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the current update operation/state to a file in the patch
|
||||
* directory, indicating to the patching system that operations need
|
||||
|
@ -1925,15 +1897,6 @@ function pingStateAndStatusCodes(aUpdate, aStartup, aStatus) {
|
|||
AUSTLMY.pingStatusErrorCode(suffix, statusErrorCode);
|
||||
}
|
||||
}
|
||||
let binaryTransparencyResult = readBinaryTransparencyResult(
|
||||
getReadyUpdateDir()
|
||||
);
|
||||
if (binaryTransparencyResult) {
|
||||
AUSTLMY.pingBinaryTransparencyResult(
|
||||
suffix,
|
||||
parseInt(binaryTransparencyResult)
|
||||
);
|
||||
}
|
||||
AUSTLMY.pingStateCode(suffix, stateCode);
|
||||
}
|
||||
|
||||
|
|
|
@ -278,30 +278,6 @@ export var AUSTLMY = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Submit a telemetry ping for a failing binary transparency result.
|
||||
*
|
||||
* @param aSuffix
|
||||
* Key to use on the update.binarytransparencyresult collection.
|
||||
* Must be one of "COMPLETE_STARTUP", "PARTIAL_STARTUP",
|
||||
* "UNKNOWN_STARTUP", "COMPLETE_STAGE", "PARTIAL_STAGE",
|
||||
* "UNKNOWN_STAGE".
|
||||
* @param aCode
|
||||
* An integer value for the error code from the update.bt file.
|
||||
*/
|
||||
pingBinaryTransparencyResult: function UT_pingBinaryTransparencyResult(
|
||||
aSuffix,
|
||||
aCode
|
||||
) {
|
||||
try {
|
||||
let id = "update.binarytransparencyresult";
|
||||
let key = aSuffix.toLowerCase().replace("_", "-");
|
||||
Services.telemetry.keyedScalarSet(id, key, aCode);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Records a failed BITS update download using Telemetry.
|
||||
* In addition to the BITS Result histogram, this also sends an
|
||||
|
|
|
@ -75,7 +75,6 @@ const FILE_APPLICATION_INI = "application.ini";
|
|||
const FILE_BACKUP_UPDATE_CONFIG_JSON = "backup-update-config.json";
|
||||
const FILE_BACKUP_UPDATE_ELEVATED_LOG = "backup-update-elevated.log";
|
||||
const FILE_BACKUP_UPDATE_LOG = "backup-update.log";
|
||||
const FILE_BT_RESULT = "bt.result";
|
||||
const FILE_CHANNEL_PREFS =
|
||||
AppConstants.platform == "macosx" ? "ChannelPrefs" : "channel-prefs.js";
|
||||
const FILE_LAST_UPDATE_ELEVATED_LOG = "last-update-elevated.log";
|
||||
|
@ -365,17 +364,6 @@ function readStatusFailedCode() {
|
|||
return readStatusFile().split(": ")[1];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not applying the current update resulted in an error
|
||||
* verifying binary transparency information.
|
||||
*
|
||||
* @return true if there was an error result and false otherwise
|
||||
*/
|
||||
function updateHasBinaryTransparencyErrorResult() {
|
||||
let file = getUpdateDirFile(FILE_BT_RESULT);
|
||||
return file.exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads text from a file and returns the string.
|
||||
*
|
||||
|
@ -465,7 +453,6 @@ function getUpdateDirFile(aLeafName, aWhichDir = null) {
|
|||
file.append(DIR_UPDATES);
|
||||
file.append(aLeafName);
|
||||
return file;
|
||||
case FILE_BT_RESULT:
|
||||
case FILE_UPDATE_LOG:
|
||||
case FILE_UPDATE_ELEVATED_LOG:
|
||||
case FILE_UPDATE_MAR:
|
||||
|
@ -537,7 +524,6 @@ function removeUpdateFiles(aRemoveLogFiles) {
|
|||
let files = [
|
||||
[FILE_ACTIVE_UPDATE_XML],
|
||||
[FILE_UPDATES_XML],
|
||||
[FILE_BT_RESULT],
|
||||
[FILE_UPDATE_STATUS],
|
||||
[FILE_UPDATE_VERSION],
|
||||
[FILE_UPDATE_MAR],
|
||||
|
|
|
@ -2169,11 +2169,6 @@ function runUpdate(
|
|||
}
|
||||
Assert.equal(status, aExpectedStatus, "the update status" + MSG_SHOULD_EQUAL);
|
||||
|
||||
Assert.ok(
|
||||
!updateHasBinaryTransparencyErrorResult(),
|
||||
"binary transparency is not being processed for now"
|
||||
);
|
||||
|
||||
if (gIsServiceTest && aCheckSvcLog) {
|
||||
let contents = readServiceLogFile();
|
||||
Assert.notEqual(
|
||||
|
|
|
@ -216,7 +216,6 @@ class TestNoWindowUpdateRestart(MarionetteTestCase):
|
|||
|
||||
addFileToRemove(rootUpdateDir, "active-update.xml");
|
||||
addFileToRemove(rootUpdateDir, "updates.xml");
|
||||
addFileToRemove(patchDir, "bt.result");
|
||||
addFileToRemove(patchDir, "update.status");
|
||||
addFileToRemove(patchDir, "update.version");
|
||||
addFileToRemove(patchDir, "update.mar");
|
||||
|
|
Загрузка…
Ссылка в новой задаче