Page MenuHomePhabricator

D6852.diff
No OneTemporary

D6852.diff

diff --git a/services/feature-flags/src/constants.rs b/services/feature-flags/src/constants.rs
--- a/services/feature-flags/src/constants.rs
+++ b/services/feature-flags/src/constants.rs
@@ -2,3 +2,26 @@
pub const DEFAULT_LOCALSTACK_URL: &str = "http://localhost:4566";
pub const LOG_LEVEL_ENV_VAR: &str =
tracing_subscriber::filter::EnvFilter::DEFAULT_ENV;
+
+// The configuration of feature flags is stored in a table in DynamoDB.
+// Each row is identified by a compound primary key consisting of
+// partition key - platform and sort key - feature.
+// A row also contains the configuration, which is a map indexed by code
+// version with values containing boolean flags for staff and non-staff config.
+// A sample row from the db looks like this:
+// {
+// "feature": S("FEATURE_1"),
+// "configuration": M({
+// "123": M({
+// "staff": Bool(true),
+// "non-staff": Bool(false)
+// })
+// }),
+// "platform": S("ANDROID")
+// }
+pub const FEATURE_FLAGS_TABLE_NAME: &str = "feature-flags";
+pub const FEATURE_FLAGS_PLATFORM_FIELD: &str = "platform";
+pub const FEATURE_FLAGS_CONFIG_FIELD: &str = "configuration";
+pub const FEATURE_FLAGS_FEATURE_FIELD: &str = "feature";
+pub const FEATURE_FLAGS_STAFF_FIELD: &str = "staff";
+pub const FEATURE_FLAGS_NON_STAFF_FIELD: &str = "non-staff";

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 6:39 PM (21 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605815
Default Alt Text
D6852.diff (1 KB)

Event Timeline