Skip to content

Commit 9eac540

Browse files
authored
Allow quota buckets to be specified in flagd experiment config (#10753)
This PR allows for an easier application of quota buckets using the flagd config, which is evaluated at runtime. When the context of a request matches the config, the quota manager will attempt to create a new quota bucket and store it. If this group+namespace already has a matching bucket, the bucket creation will be skipped and the existing bucket will be used. Quota manager refresh or a restart will clear the buckets, and enable fresh loading from `flagd` for existing buckets, new buckets will be added automatically.
1 parent 1ec0747 commit 9eac540

File tree

3 files changed

+427
-45
lines changed

3 files changed

+427
-45
lines changed

enterprise/server/quota/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ go_test(
3434
deps = [
3535
"//enterprise/server/backends/authdb",
3636
"//enterprise/server/backends/userdb",
37+
"//enterprise/server/experiments",
3738
"//proto:quota_go_proto",
3839
"//server/environment",
3940
"//server/tables",
4041
"//server/testutil/pubsub",
42+
"//server/testutil/testauth",
4143
"//server/testutil/testenv",
4244
"//server/util/db",
4345
"//server/util/query_builder",
4446
"@com_github_google_go_cmp//cmp",
4547
"@com_github_google_go_cmp//cmp/cmpopts",
48+
"@com_github_open_feature_go_sdk//openfeature",
49+
"@com_github_open_feature_go_sdk//openfeature/memprovider",
4650
"@com_github_stretchr_testify//assert",
4751
"@com_github_stretchr_testify//require",
4852
"@org_golang_google_protobuf//testing/protocmp",

0 commit comments

Comments
 (0)