Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(feature-manager): tear out AggregateStats feature #2120

Merged
merged 4 commits into from
Jun 10, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Jun 9, 2021

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:

  1. Tear out the Examples service's reliance on the RetrievalType enum, which was in turn determined by the AGGREGATE_COLLECTION env var. Since there is now only one RetrievalType, the higher-order functions which used to take in a RetrievalType and return a service function were converted into regular functions.
  2. Tear out the Examples factory and link the controllers directly to the service.
  3. Remove mentions of 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

@mantariksh mantariksh requested review from karrui and tshuli June 9, 2021 10:51
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mantariksh mantariksh merged commit c5e2931 into develop Jun 10, 2021
@mantariksh mantariksh deleted the remove-fm/aggregate-stats branch June 10, 2021 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants