зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1743570 - Always validate schemas in RemoteSettingsExperimentLoader r=emcminn
Differential Revision: https://phabricator.services.mozilla.com/D150692
This commit is contained in:
Родитель
f922ff35ad
Коммит
bfa5aabcfe
|
@ -411,22 +411,16 @@ class _RemoteSettingsExperimentLoader {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (feature.enabled ?? true) {
|
const result = validator.validate(value);
|
||||||
const result = validator.validate(value);
|
if (!result.valid) {
|
||||||
if (!result.valid) {
|
Cu.reportError(
|
||||||
Cu.reportError(
|
`Experiment ${id} branch ${branchIdx} feature ${featureId} does not validate: ${JSON.stringify(
|
||||||
`Experiment ${id} branch ${branchIdx} feature ${featureId} does not validate: ${JSON.stringify(
|
result.errors,
|
||||||
result.errors,
|
undefined,
|
||||||
undefined,
|
2
|
||||||
2
|
)}`
|
||||||
)}`
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
lazy.log.debug(
|
|
||||||
`Experiment ${id} branch ${branchIdx} feature ${featureId} disabled; skipping validation`
|
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче