feat(feature-manager): tear out AggregateStats feature #2120
+352
−1,084
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
As part of removing the feature manager, the
AggregateStats
feature needs to be removed. This feature controls whether the Examples page relies on the Submissions collection or the FormStatisticsTotal collection for its queries.Part of #1842
Solution
The approach was to:
RetrievalType
enum, which was in turn determined by theAGGREGATE_COLLECTION
env var. Since there is now only oneRetrievalType
, the higher-order functions which used to take in aRetrievalType
and return a service function were converted into regular functions.AGGREGATE_COLLECTION
throughout the documentation and dev environment.For reviewers
If you wish to review the test files in detail, the changes may make more sense by commit. cc207db does the actual work of updating the tests, whereas e821d0b just removes certain
describe
blocks which are no longer relevant due to mentions of the AggregateStats feature.Breaking Changes
Deprecated environment variables:
AGGREGATE_COLLECTION
: previously used to toggle between using the Submissions and FormStatisticsTotal collections for calculating examples page statistics