Bug 1969930 - Remove unsupported-feature validation failure telemetry a=RyanVM
Original Revision: https://phabricator.services.mozilla.com/D252177 Differential Revision: https://phabricator.services.mozilla.com/D252215
This commit is contained in:
committed by
rvandermeulen@mozilla.com
parent
cc4ce4d71b
commit
76b0a36042
@@ -155,11 +155,10 @@ export const CheckRecipeResult = {
|
||||
};
|
||||
},
|
||||
|
||||
UnsupportedFeatures(featureIds) {
|
||||
UnsupportedFeatures() {
|
||||
return {
|
||||
ok: false,
|
||||
reason: lazy.NimbusTelemetry.ValidationFailureReason.UNSUPPORTED_FEATURES,
|
||||
featureIds,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -792,12 +791,11 @@ export class EnrollmentsContext {
|
||||
);
|
||||
|
||||
if (unsupportedFeatureIds.length) {
|
||||
lazy.NimbusTelemetry.recordValidationFailure(
|
||||
recipe.slug,
|
||||
lazy.NimbusTelemetry.ValidationFailureReason.UNSUPPORTED_FEATURES,
|
||||
{ featureIds: unsupportedFeatureIds.join(",") }
|
||||
);
|
||||
return CheckRecipeResult.UnsupportedFeatures(unsupportedFeatureIds);
|
||||
// Do not record unsupported feature telemetry. This will only happen if
|
||||
// the background updater encounters a recipe with features it does not
|
||||
// support, which will happen with most recipes. Reporting these errors
|
||||
// results in an inordinate amount of telemetry being submitted.
|
||||
return CheckRecipeResult.UnsupportedFeatures();
|
||||
}
|
||||
|
||||
if (recipe.isEnrollmentPaused) {
|
||||
|
||||
@@ -294,23 +294,25 @@ export const NimbusTelemetry = {
|
||||
recordValidationFailure(
|
||||
slug,
|
||||
reason,
|
||||
{ branch, locale, l10nIds: l10n_ids, featureIds: feature_ids } = {}
|
||||
{ branch, locale, l10nIds: l10n_ids } = {}
|
||||
) {
|
||||
// Do not record invalid feature telemetry.
|
||||
if (reason === ValidationFailureReason.INVALID_FEATURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not record unsupported feature telemetry.
|
||||
if (reason === ValidationFailureReason.UNSUPPORTED_FEATURES) {
|
||||
return;
|
||||
}
|
||||
|
||||
const extra = Object.assign(
|
||||
{ reason },
|
||||
reason === ValidationFailureReason.INVALID_BRANCH ? { branch } : {},
|
||||
reason === ValidationFailureReason.L10N_MISSING_ENTRY
|
||||
? { l10n_ids, locale }
|
||||
: {},
|
||||
reason === ValidationFailureReason.L10N_MISSING_LOCALE ? { locale } : {},
|
||||
reason === ValidationFailureReason.UNSUPPORTED_FEATURES
|
||||
? { feature_ids }
|
||||
: {}
|
||||
reason === ValidationFailureReason.L10N_MISSING_LOCALE ? { locale } : {}
|
||||
);
|
||||
|
||||
Glean.normandy.validationFailedNimbusExperiment.record({
|
||||
|
||||
@@ -896,9 +896,6 @@ nimbus_events:
|
||||
specific locale;
|
||||
- "l10n-missing-entry": the recipe is missing specific localization
|
||||
entries for a specific locale;
|
||||
- "unsupported-feature": the recipe uses a feature that exists but is
|
||||
not supported by this specific application (e.g., a feature that is
|
||||
only for the background task runner);
|
||||
branch:
|
||||
type: string
|
||||
description: >
|
||||
@@ -915,11 +912,6 @@ nimbus_events:
|
||||
description: >
|
||||
If reason == missing-l10n-entry, a comma-separated list of missing
|
||||
localization entries.
|
||||
feature_ids:
|
||||
type: string
|
||||
description: >
|
||||
If reason == unsupported-feature, a comma-separated list of the
|
||||
unsupported feature IDs.
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1762652
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1781953
|
||||
|
||||
@@ -686,12 +686,17 @@ add_task(async function test_updateRecipes_appId() {
|
||||
manager.onRecipe.calledOnceWith(recipe, "rs-loader", {
|
||||
ok: false,
|
||||
reason: "unsupported-feature",
|
||||
featureIds: ["backgroundTaskMessage"],
|
||||
}),
|
||||
"Should call onRecipe with unsupported-feature"
|
||||
);
|
||||
Assert.ok(manager.enroll.notCalled, "Would not enroll");
|
||||
|
||||
Assert.deepEqual(
|
||||
Glean.nimbusEvents.validationFailed.testGetValue("events") ?? [],
|
||||
[],
|
||||
"There should be no validation failed event"
|
||||
);
|
||||
|
||||
info("Testing updateRecipes() with a custom application ID");
|
||||
manager.onRecipe.resetHistory();
|
||||
|
||||
|
||||
@@ -684,9 +684,6 @@ normandy:
|
||||
specific locale;
|
||||
- "l10n-missing-entry": the recipe is missing specific localization
|
||||
entries for a specific locale;
|
||||
- "unsupported-feature": the recipe uses a feature that exists but is
|
||||
not supported by this specific application (e.g., a feature that is
|
||||
only for the background task runner);
|
||||
type: string
|
||||
branch:
|
||||
description: >
|
||||
@@ -703,11 +700,6 @@ normandy:
|
||||
description: >
|
||||
If reason == missing-l10n-entry, a comma-separated list of missing localization entries.
|
||||
type: string
|
||||
feature_ids:
|
||||
description: >
|
||||
If reason == unsupported-feature, a comma-separated list of the
|
||||
unsupported feature IDs.
|
||||
type: string
|
||||
telemetry_mirror: Normandy_Validationfailed_NimbusExperiment
|
||||
|
||||
recipe_freshness:
|
||||
|
||||
@@ -836,9 +836,6 @@ normandy:
|
||||
specific locale;
|
||||
- "l10n-missing-entry": the recipe is missing specific localization
|
||||
entries for a specific locale;
|
||||
- "unsupported-feature": the recipe uses a feature that exists but is
|
||||
not supported by this specific application (e.g., a feature that is
|
||||
only for the background task runner);
|
||||
|
||||
branch: If reason == invalid-branch, the branch that failed validation.
|
||||
locale: >
|
||||
@@ -849,9 +846,6 @@ normandy:
|
||||
l10n_ids: >
|
||||
If reason == missing-l10n-entry, a comma-separated list of missing
|
||||
localization entries.
|
||||
feature_ids: >
|
||||
If reason == unsupported-feature, a comma-separated list of the
|
||||
unsupported feature IDs.
|
||||
|
||||
browser.launched_to_handle:
|
||||
system_notification:
|
||||
|
||||
Reference in New Issue
Block a user