mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
1c67f4084c
commit
009d7f42b3
@ -3079,11 +3079,6 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
|
||||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
|
||||||
],
|
],
|
||||||
"public/app/features/dashboard-scene/edit-pane/VizPanelEditPaneBehavior.tsx:5381": [
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
|
|
||||||
],
|
|
||||||
"public/app/features/dashboard-scene/embedding/EmbeddedDashboard.tsx:5381": [
|
"public/app/features/dashboard-scene/embedding/EmbeddedDashboard.tsx:5381": [
|
||||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
|
||||||
],
|
],
|
||||||
@ -3304,11 +3299,6 @@ exports[`better eslint`] = {
|
|||||||
"public/app/features/dashboard-scene/scene/UnlinkModal.tsx:5381": [
|
"public/app/features/dashboard-scene/scene/UnlinkModal.tsx:5381": [
|
||||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
|
||||||
],
|
],
|
||||||
"public/app/features/dashboard-scene/scene/layout-rows/RowItem.tsx:5381": [
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
|
|
||||||
],
|
|
||||||
"public/app/features/dashboard-scene/scene/row-actions/RowActions.tsx:5381": [
|
"public/app/features/dashboard-scene/scene/row-actions/RowActions.tsx:5381": [
|
||||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
|
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
|
||||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||||
|
@ -249,4 +249,6 @@ export interface FeatureToggles {
|
|||||||
k8SFolderMove?: boolean;
|
k8SFolderMove?: boolean;
|
||||||
improvedExternalSessionHandlingSAML?: boolean;
|
improvedExternalSessionHandlingSAML?: boolean;
|
||||||
teamHttpHeadersMimir?: boolean;
|
teamHttpHeadersMimir?: boolean;
|
||||||
|
ABTestFeatureToggleA?: boolean;
|
||||||
|
ABTestFeatureToggleB?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,6 @@ func (_m *FakeDashboardStore) GetAllDashboardsByOrgId(ctx context.Context, orgID
|
|||||||
return r0, r1
|
return r0, r1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// GetDashboard provides a mock function with given fields: ctx, query
|
// GetDashboard provides a mock function with given fields: ctx, query
|
||||||
func (_m *FakeDashboardStore) GetDashboard(ctx context.Context, query *GetDashboardQuery) (*Dashboard, error) {
|
func (_m *FakeDashboardStore) GetDashboard(ctx context.Context, query *GetDashboardQuery) (*Dashboard, error) {
|
||||||
ret := _m.Called(ctx, query)
|
ret := _m.Called(ctx, query)
|
||||||
|
@ -1721,6 +1721,22 @@ var (
|
|||||||
AllowSelfServe: false,
|
AllowSelfServe: false,
|
||||||
Owner: identityAccessTeam,
|
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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -230,3 +230,5 @@ k8SFolderCounts,experimental,@grafana/search-and-storage,false,false,false
|
|||||||
k8SFolderMove,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
|
improvedExternalSessionHandlingSAML,preview,@grafana/identity-access-team,false,false,false
|
||||||
teamHttpHeadersMimir,experimental,@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
|
||||||
|
|
@ -930,4 +930,12 @@ const (
|
|||||||
// FlagTeamHttpHeadersMimir
|
// FlagTeamHttpHeadersMimir
|
||||||
// Enables LBAC for datasources for Mimir to apply LBAC filtering of metrics to the client requests for users in teams
|
// Enables LBAC for datasources for Mimir to apply LBAC filtering of metrics to the client requests for users in teams
|
||||||
FlagTeamHttpHeadersMimir = "teamHttpHeadersMimir"
|
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"
|
||||||
)
|
)
|
||||||
|
@ -3,6 +3,34 @@
|
|||||||
"apiVersion": "featuretoggle.grafana.app/v0alpha1",
|
"apiVersion": "featuretoggle.grafana.app/v0alpha1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"items": [
|
"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": {
|
"metadata": {
|
||||||
"name": "accessActionSets",
|
"name": "accessActionSets",
|
||||||
|
@ -167,6 +167,9 @@ func TestFeatureToggleFiles(t *testing.T) {
|
|||||||
func verifyFlagsConfiguration(t *testing.T) {
|
func verifyFlagsConfiguration(t *testing.T) {
|
||||||
legacyNames := map[string]bool{
|
legacyNames := map[string]bool{
|
||||||
"live-service-web-worker": true,
|
"live-service-web-worker": true,
|
||||||
|
// TODO: Remove this when removing feature toggles
|
||||||
|
"ABTestFeatureToggleA": true,
|
||||||
|
"ABTestFeatureToggleB": true,
|
||||||
}
|
}
|
||||||
invalidNames := make([]string, 0)
|
invalidNames := make([]string, 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user