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

Technical Analytics: Milestone 1 - Add Feature Flag Statuses and Ability To Sync Them to Cache Store #5203

Merged
merged 37 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3fee528
feat: Add a FeatureFlagConstants file to host feature flags
kkmurerwa Oct 18, 2023
9c09fbf
feat: Add constant names for easy retrieval of the feature flags from…
kkmurerwa Oct 18, 2023
b0d1572
feat: Add newly status flags to the Platform Parameter dependency mod…
kkmurerwa Oct 18, 2023
7e13530
feat: Add ability to insert sync statuses to the cache store
kkmurerwa Oct 20, 2023
6c06ea5
feat: Add ability to save flag statuses for every feature flag
kkmurerwa Oct 23, 2023
5e26d8e
Merge branch 'oppia:develop' into technical-analytics-milestone-1
kkmurerwa Oct 23, 2023
1f0fa64
fix: Fix linting and styling checks
kkmurerwa Oct 23, 2023
f4f5ff2
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 24, 2023
795e90c
fix: Fix comments made on the previous review
kkmurerwa Oct 26, 2023
dd5c5b2
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 26, 2023
da852b4
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 29, 2023
9da1607
fix: Fix nit
kkmurerwa Oct 29, 2023
0c0cd75
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 30, 2023
4dae83c
fix: Fix lint issues causing build failure
kkmurerwa Oct 30, 2023
81d968b
fix: Move test sync status flag booleans to the TestBooleanPlatformPa…
kkmurerwa Oct 30, 2023
d8f14bd
chore: Move all test constants from individual type-organized files t…
kkmurerwa Nov 1, 2023
7918da5
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 1, 2023
7bcbdcf
fix: Fix failing text file checks
kkmurerwa Nov 1, 2023
ed2b7ac
Merge branch 'technical-analytics-milestone-1' of github.com:kkmurerw…
kkmurerwa Nov 1, 2023
5638b31
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 1, 2023
a1846ce
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 6, 2023
b49df60
feat: Add a isSynced variable in the platform parameter variable to s…
kkmurerwa Nov 7, 2023
7ee1fd8
fix: Fix failing EventBundleCreator tests
kkmurerwa Nov 7, 2023
b9f28ba
feat: Make Sync status an enum
kkmurerwa Nov 14, 2023
c0338b0
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 14, 2023
501ae40
feat: Add feature flag names to all flags lacking one
kkmurerwa Nov 14, 2023
91c526d
Merge branch 'technical-analytics-milestone-1' of github.com:kkmurerw…
kkmurerwa Nov 14, 2023
551fd4a
fix: Fix failing check and linting issue
kkmurerwa Nov 15, 2023
e6d748f
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 15, 2023
3b19e3f
merge: Merge from develop and fix conflicts
kkmurerwa Nov 17, 2023
df983b9
chore: Remove unused feature flag
kkmurerwa Nov 17, 2023
d3ca9d0
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 21, 2023
7b6a4f7
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 22, 2023
8f1d1cc
fix: Fix minor linting issues
kkmurerwa Nov 24, 2023
0a58483
Merge branch 'develop' into technical-analytics-milestone-1
BenHenning Nov 29, 2023
92c4703
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 29, 2023
3e203c4
chore: Modify the PlatformParameterValue default sync status name
kkmurerwa Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,40 @@ import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds
import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection
import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
import org.oppia.android.util.platformparameter.FLAG_ENABLE_APP_AND_OS_DEPRECATION_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_APP_AND_OS_DEPRECATION_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_CONTINUE_BUTTON_ANIMATION_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_CONTINUE_BUTTON_ANIMATION_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_DOWNLOADS_SUPPORT_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_DOWNLOADS_SUPPORT_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_EXTRA_TOPIC_TABS_UI_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_EXTRA_TOPIC_TABS_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_FAST_LANGUAGE_SWITCHING_IN_LESSON_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_FAST_LANGUAGE_SWITCHING_IN_LESSON_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LANGUAGE_SELECTION_UI_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LANGUAGE_SELECTION_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LEARNER_STUDY_ANALYTICS_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LEARNER_STUDY_ANALYTICS_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LOGGING_LEARNER_STUDY_IDS_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_LOGGING_LEARNER_STUDY_IDS_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_PERFORMANCE_METRICS_COLLECTION_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_PERFORMANCE_METRICS_COLLECTION_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FLAG_ENABLE_SPOTLIGHT_UI_IS_SERVER_PROVIDED
import org.oppia.android.util.platformparameter.FLAG_ENABLE_SPOTLIGHT_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.FlagEnableAppAndOsDeprecationIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableContinueButtonAnimationIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableDownloadsSupportIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableExtraTopicTabsUiIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableFastLanguageSwitchingInLessonIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableInteractionConfigChangeStateRetentionIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableLanguageSelectionUiIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableLearnerStudyAnalyticsIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableLoggingLearnerStudyIdsIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnablePerformanceMetricsCollectionIsServerProvided
import org.oppia.android.util.platformparameter.FlagEnableSpotlightUiIsServerProvided
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
Expand Down Expand Up @@ -75,6 +108,18 @@ class PlatformParameterAlphaKenyaModule {
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)

@Provides
@FlagEnableDownloadsSupportIsServerProvided
fun provideFlagEnableDownloadsSupportIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_DOWNLOADS_SUPPORT_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_DOWNLOADS_SUPPORT_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@SplashScreenWelcomeMsg
fun provideSplashScreenWelcomeMsgParam(
Expand Down Expand Up @@ -104,6 +149,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableLanguageSelectionUiIsServerProvided
fun provideFlagEnableLanguageSelectionUiIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_LANGUAGE_SELECTION_UI_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_LANGUAGE_SELECTION_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
Expand All @@ -122,6 +179,18 @@ class PlatformParameterAlphaKenyaModule {
?: PlatformParameterValue.createDefaultParameter(true)
}

@Provides
@FlagEnableLearnerStudyAnalyticsIsServerProvided
fun provideFlagEnableLearnerStudyAnalyticsIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_LEARNER_STUDY_ANALYTICS_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_LEARNER_STUDY_ANALYTICS_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableFastLanguageSwitchingInLesson
fun provideFastInLessonLanguageSwitching(
Expand All @@ -132,6 +201,18 @@ class PlatformParameterAlphaKenyaModule {
?: PlatformParameterValue.createDefaultParameter(true)
}

@Provides
@FlagEnableFastLanguageSwitchingInLessonIsServerProvided
fun provideFlagEnableFastLanguageSwitchingInLessonIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_FAST_LANGUAGE_SWITCHING_IN_LESSON_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_FAST_LANGUAGE_SWITCHING_IN_LESSON_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableLoggingLearnerStudyIds
fun provideLoggingLearnerStudyIds(
Expand All @@ -142,6 +223,18 @@ class PlatformParameterAlphaKenyaModule {
?: PlatformParameterValue.createDefaultParameter(true)
}

@Provides
@FlagEnableLoggingLearnerStudyIdsIsServerProvided
fun provideFlagEnableLoggingLearnerStudyIdsIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_LOGGING_LEARNER_STUDY_IDS_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_LOGGING_LEARNER_STUDY_IDS_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@CacheLatexRendering
fun provideCacheLatexRendering(
Expand All @@ -163,6 +256,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnablePerformanceMetricsCollectionIsServerProvided
fun provideFlagEnablePerformanceMetricsCollectionIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_PERFORMANCE_METRICS_COLLECTION_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_PERFORMANCE_METRICS_COLLECTION_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@PerformanceMetricsCollectionUploadTimeIntervalInMinutes
fun providePerformanceMetricsCollectionUploadTimeIntervalInMinutes(
Expand Down Expand Up @@ -207,6 +312,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableExtraTopicTabsUiIsServerProvided
fun provideFlagEnableExtraTopicTabsUiIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_EXTRA_TOPIC_TABS_UI_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_EXTRA_TOPIC_TABS_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
Expand All @@ -215,6 +332,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableInteractionConfigChangeStateRetentionIsServerProvided
fun provideFlagEnableInteractionConfigChangeStateRetentionIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableContinueButtonAnimation
fun provideEnableContinueButtonAnimation(): PlatformParameterValue<Boolean> {
Expand All @@ -223,6 +352,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableContinueButtonAnimationIsServerProvided
fun provideFlagEnableContinueButtonAnimationIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_CONTINUE_BUTTON_ANIMATION_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_CONTINUE_BUTTON_ANIMATION_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableSpotlightUi
fun enableSpotlightUi(): PlatformParameterValue<Boolean> {
Expand All @@ -231,6 +372,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableSpotlightUiIsServerProvided
fun provideFlagEnableSpotlightUiIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_SPOTLIGHT_UI_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_SPOTLIGHT_UI_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
Expand All @@ -239,6 +392,18 @@ class PlatformParameterAlphaKenyaModule {
)
}

@Provides
@FlagEnableAppAndOsDeprecationIsServerProvided
fun provideFlagEnableAppAndOsDeprecationIsServerProvided(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
FLAG_ENABLE_APP_AND_OS_DEPRECATION_IS_SERVER_PROVIDED
) ?: PlatformParameterValue.createDefaultParameter(
FLAG_ENABLE_APP_AND_OS_DEPRECATION_IS_SERVER_PROVIDED_DEFAULT_VALUE
)
}

@Provides
@OptionalAppUpdateVersionCode
fun provideOptionalAppUpdateVersionCode(
Expand Down
Loading
Loading