We expect all historic experiments to have a valid endDate. Setting an experiment to disabled and then calling into reconcileAddonState can trigger calls into Experiments.getExperiments() via the AddonManager, so we need to set the endDate before that.
Upcoming tests will need to wait on init() to finish before running. We
now return a promise so these tests don't have to look at internal
variables.
--HG--
extra : rebase_source : 487645efe419fb3fa3371f85a81e8f3e1ccd9012
extra : amend_source : 3d6bb785e0ecdabcbff1e5bc62ee7dc56cbb7244
extra : histedit_source : 8d12f7e5c47995a408509a85a527bc86f9a76ccb
The previous experiment feature expands the scope of these functions. A
rename was in order.
--HG--
extra : rebase_source : 054d7a440e3e15436ff7fbcbc4f91b28dd4fc9fd
We normally validate hashes of XPIs as part of installing experiments.
While a useful security feature, this patch makes that optional. This in
turn makes automated and manual testing easier.
--HG--
extra : rebase_source : 292653411391843fad3f62d0bee01e11779313b6
To sync experiment state with the addon manager, we need to start it early when there is a
active experiment.
However, initializing the telemetry experiments system too early can lead to performance
regressions, so we delay the initialization if we don't have an active experiment.
Subsequent patches were running into race conditions and bugs related to
Experiments instance initialization state. This patch plugs the
necessary holes in initialization state management to unblock work.
The fixes are far from robust. There are still race conditions and bugs.
They should probably be addressed later.
--HG--
extra : rebase_source : 5f0c7fa1f554d09a21b1452506884dc771cb829d
There is a lot of boilerplate testing code that performs common
AddonManager operations. Some common operations used for testing
Experiments have been refactored into a testing-only JSM that lives as
part of the Add-ons Manager.
--HG--
extra : rebase_source : f18cf54c7af6d390ed4437bd0ed0eb4beea76b0d
Experiment add-ons are disabled by default in the Addon Manager. This
patch will manually enable them if necessary.
--HG--
extra : rebase_source : 2271372b232b5d85af32a4a96f2e3beb867cabf9
The experiments service insists on being in control of experiments.
Before, it wasn't being as assertive as it needed to be: other browser
components could install experiments behind its back. This patch
reasserts the experiments service as king of experiments add-on
management.
--HG--
extra : rebase_source : 91439622e47419fae7675d83890e83cf37db453b
CLOSED TREE
Backed out changeset 831a3ccce100 (bug 989137)
Backed out changeset d3053c4e4c51 (bug 989137)
Backed out changeset 7e410c1d61e6 (bug 989137)
There is a lot of boilerplate testing code that performs common
AddonManager operations. Some common operations used for testing
Experiments have been refactored into a testing-only JSM that lives as
part of the Add-ons Manager.
--HG--
extra : rebase_source : 7b595e2a93637a1b2746e0182fbbe897c93fb6d9
Experiment add-ons are disabled by default in the Addon Manager. This
patch will manually enable them if necessary.
--HG--
extra : rebase_source : be3d7c7489fa851dc421b5bae05978fa8ba17539
The experiments service insists on being in control of experiments.
Before, it wasn't being as assertive as it needed to be: other browser
components could install experiments behind its back. This patch
reasserts the experiments service as king of experiments add-on
management.
--HG--
extra : rebase_source : 6d9b94f91865ef3c6929bc34cd3e7bb57e112d14
The test experiments had unnecessary content in their install.rdf files.
<targetApplication> does not apply to experiment types and has been
removed.
The bootstrap setting is also implied and has been removed.
--HG--
extra : rebase_source : 52c297b17244b2cf160bc41018897ecc3fb0eabd
Instead of checking in binary .xpi files, we now have the source files
under source control and generate the .xpi as part of the build.
The build system mechanism to generate the .xpi files is hacky. But it's
similar to what existing processes use. Bug 988938 will eventually make
this more sane.
Since the produced .xpi files no longer have stable content, the SHA-1s
of the experiments are now calculated at test run time.
--HG--
extra : rebase_source : 85ae5a6c480a5add173b639f06b3ee404c5c6686
We now maintain per-type counts/IDs of each Policy, Experiments, and
ExperimentEntry. The log events for each type are prefixed with the
count/ID so one can easily attribute events to specific instances.
--HG--
extra : rebase_source : 4f1fcc38e5f52ff38b90f9ce71e332492983ff37
Logging in the Experiments module were using a common pattern of
prefixing all messages with the type. We move this prefixing into
a prefixed logger.
--HG--
extra : rebase_source : 213a99e93a3569a7f2ab3d72fb37dc0c538e5c97
extra : source : 96def94c8fb705e5ad8af5a1393492a28ea47d16
As part of debugging subsequent patches, I ran into issues debugging the
interaction between multiple Experiments instances. To get to the bottom
of the problem, I had to make some changes to the logging framework.
This is the first patch in a sub-series dealing with logging.
This patch stops relying on the global logger. Subsequent patches will
make the logging output aid debugging.
--HG--
extra : rebase_source : 40b34a1444ff3fb70a9da7cf242ee522d6ec07ea
extra : source : 61877a5f15aa01dec05fe1882eae6ad9f18f81a0
Before this patch, experiment add-ons may have existed in the Addons
Manager without the Experiments service knowing about them. This detects
these unknown add-ons and uninstalls them. See the in-line comment on
the rationale behind this decision.
The added unit test fails without the Experiments.jsm change.
--HG--
extra : rebase_source : bb0d0d5d77c7ae562f76e6c647eea25e6a06d99a
Experiment add-ons are now disabled by default on application load. It
is up to the Experiments Manager to enable them.
This means that experiments may not be able to reliably collect data or
modify behavior close to application startup. (There is a window between
when the Addon Manager initializes and when the Experiments Manager
initializes.) This window is acceptable for the initial version of the
experiments feature.
The Experiments Manager doesn't currently enable experiments on startup.
This will be addressed in a subsequent patch. Its tests do not regress
(indicating a lack of test coverage), so no harm no foul.
--HG--
extra : rebase_source : 00a55146576f490200a6148bd5516f84def9879c
extra : source : bd901384b973c7ff581fe24a3012f0191b8bbe67