Files
tubestation/browser/components/preferences
Beth Rennie 41576d6989 Bug 1874939 - Support co-enrolling features r=relud,nimbus-reviewers,chumphreys,settings-reviewers,mconley
Nimbus now supports co-enrollment! Co-enrolling features cannot use most
of the traditional APIs, like
`ExperimentAPI.get{Experiment,Rollout,Enrollment}MetaData` or
`ExperimentFeature.getAllVariables` / `ExperimentFeature.getVariable`.
Instead, these features must use new co-enrollment aware APIs:

- `ExperimentAPI.getAllEnrollmentMetadata`, which returns the metadata
  for all active enrollments for a given feature;
- `ExperimentAPI.getAllEnrollments`, which returns the same metadata, as
  well as the feature values for all active enrollments for a given
  feature;

`ExperimentFeature.recordExposurEvent` will work for co-enrolling
features, but callers must always provide a slug when calling so that we
know what enrollment caused the exposure.

In that vein, `ExperimentAPI.get{Experiment,Rollout,Enrollment}MetaData`
can still be called with the slug for a feature for a co-enrolling
experiment.

Differential Revision: https://phabricator.services.mozilla.com/D245986
2025-04-23 17:01:49 +00:00
..