Feature Toggles: Add two test feature toggles to test potential AB test setup (#98844)

* add two dummy feature toggles to use for testing potential AB testing setup

* update betterer

* update auto generated files

* fix camelcase test case
This commit is contained in:
Nathan Marrs
2025-01-13 13:13:13 -08:00
committed by GitHub
parent 1c67f4084c
commit 009d7f42b3
8 changed files with 59 additions and 11 deletions
-1
View File
@@ -256,7 +256,6 @@ func (_m *FakeDashboardStore) GetAllDashboardsByOrgId(ctx context.Context, orgID
return r0, r1
}
// GetDashboard provides a mock function with given fields: ctx, query
func (_m *FakeDashboardStore) GetDashboard(ctx context.Context, query *GetDashboardQuery) (*Dashboard, error) {
ret := _m.Called(ctx, query)
+16
View File
@@ -1721,6 +1721,22 @@ var (
AllowSelfServe: false,
Owner: identityAccessTeam,
},
{
Name: "ABTestFeatureToggleA",
Description: "Test feature toggle to see how cohorts could be set up AB testing",
Stage: FeatureStageExperimental,
Owner: grafanaSharingSquad,
Expression: "false",
HideFromDocs: true,
},
{
Name: "ABTestFeatureToggleB",
Description: "Test feature toggle to see how cohorts could be set up AB testing",
Stage: FeatureStageExperimental,
Owner: grafanaSharingSquad,
Expression: "false",
HideFromDocs: true,
},
}
)
+2
View File
@@ -230,3 +230,5 @@ k8SFolderCounts,experimental,@grafana/search-and-storage,false,false,false
k8SFolderMove,experimental,@grafana/search-and-storage,false,false,false
improvedExternalSessionHandlingSAML,preview,@grafana/identity-access-team,false,false,false
teamHttpHeadersMimir,experimental,@grafana/identity-access-team,false,false,false
ABTestFeatureToggleA,experimental,@grafana/sharing-squad,false,false,false
ABTestFeatureToggleB,experimental,@grafana/sharing-squad,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
230 k8SFolderMove experimental @grafana/search-and-storage false false false
231 improvedExternalSessionHandlingSAML preview @grafana/identity-access-team false false false
232 teamHttpHeadersMimir experimental @grafana/identity-access-team false false false
233 ABTestFeatureToggleA experimental @grafana/sharing-squad false false false
234 ABTestFeatureToggleB experimental @grafana/sharing-squad false false false
+8
View File
@@ -930,4 +930,12 @@ const (
// FlagTeamHttpHeadersMimir
// Enables LBAC for datasources for Mimir to apply LBAC filtering of metrics to the client requests for users in teams
FlagTeamHttpHeadersMimir = "teamHttpHeadersMimir"
// FlagABTestFeatureToggleA
// Test feature toggle to see how cohorts could be set up AB testing
FlagABTestFeatureToggleA = "ABTestFeatureToggleA"
// FlagABTestFeatureToggleB
// Test feature toggle to see how cohorts could be set up AB testing
FlagABTestFeatureToggleB = "ABTestFeatureToggleB"
)
+28
View File
@@ -3,6 +3,34 @@
"apiVersion": "featuretoggle.grafana.app/v0alpha1",
"metadata": {},
"items": [
{
"metadata": {
"name": "ABTestFeatureToggleA",
"resourceVersion": "1736782112674",
"creationTimestamp": "2025-01-13T15:28:32Z"
},
"spec": {
"description": "Test feature toggle to see how cohorts could be set up AB testing",
"stage": "experimental",
"codeowner": "@grafana/sharing-squad",
"hideFromDocs": true,
"expression": "false"
}
},
{
"metadata": {
"name": "ABTestFeatureToggleB",
"resourceVersion": "1736782112674",
"creationTimestamp": "2025-01-13T15:28:32Z"
},
"spec": {
"description": "Test feature toggle to see how cohorts could be set up AB testing",
"stage": "experimental",
"codeowner": "@grafana/sharing-squad",
"hideFromDocs": true,
"expression": "false"
}
},
{
"metadata": {
"name": "accessActionSets",
@@ -167,6 +167,9 @@ func TestFeatureToggleFiles(t *testing.T) {
func verifyFlagsConfiguration(t *testing.T) {
legacyNames := map[string]bool{
"live-service-web-worker": true,
// TODO: Remove this when removing feature toggles
"ABTestFeatureToggleA": true,
"ABTestFeatureToggleB": true,
}
invalidNames := make([]string, 0)