зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1467563 - Don't send any telemetry for rollbacks that were never rolled out r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D1591
This commit is contained in:
Родитель
332df0f776
Коммит
7b91d4140a
|
@ -24,8 +24,7 @@ class PreferenceRollbackAction extends BaseAction {
|
|||
const rollout = await PreferenceRollouts.get(rolloutSlug);
|
||||
|
||||
if (!rollout) {
|
||||
TelemetryEvents.sendEvent("unenrollFailed", "preference_rollback", rolloutSlug, {"reason": "rollout missing"});
|
||||
this.log.info(`Cannot rollback ${rolloutSlug}: no rollout found with that slug`);
|
||||
this.log.debug(`Rollback ${rolloutSlug} not applicable, skipping`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ decorate_task(
|
|||
},
|
||||
);
|
||||
|
||||
// Test that a rollback without a matching rollout
|
||||
// Test that a rollback without a matching rollout does not send telemetry
|
||||
decorate_task(
|
||||
PreferenceRollouts.withTestMock,
|
||||
withSendEventStub,
|
||||
|
@ -129,12 +129,7 @@ decorate_task(
|
|||
await action.runRecipe(recipe);
|
||||
await action.finalize();
|
||||
|
||||
Assert.deepEqual(
|
||||
sendEventStub.args,
|
||||
[["unenrollFailed", "preference_rollback", "missing-rollout", {reason: "rollout missing"}]],
|
||||
"an unenrollFailure event should be sent",
|
||||
);
|
||||
// This is too common a case for an error, so it should be reported as success
|
||||
Assert.deepEqual(sendEventStub.args, [], "an unenrollFailure event should not be sent");
|
||||
Assert.deepEqual(
|
||||
reportRecipeStub.args,
|
||||
[[recipe.id, Uptake.RECIPE_SUCCESS]],
|
||||
|
|
Загрузка…
Ссылка в новой задаче