diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index a269d5b6718..621225de4e3 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -164,7 +164,6 @@ export interface FeatureToggles { tableSharedCrosshair?: boolean; regressionTransformation?: boolean; displayAnonymousStats?: boolean; - alertStateHistoryAnnotationsFromLoki?: boolean; lokiQueryHints?: boolean; kubernetesFeatureToggles?: boolean; alertingPreviewUpgrade?: boolean; diff --git a/pkg/services/annotations/annotationsimpl/loki/historian_store.go b/pkg/services/annotations/annotationsimpl/loki/historian_store.go index 88ea9f6eedd..451375b5212 100644 --- a/pkg/services/annotations/annotationsimpl/loki/historian_store.go +++ b/pkg/services/annotations/annotationsimpl/loki/historian_store.go @@ -294,5 +294,6 @@ func useStore(cfg setting.UnifiedAlertingStateHistorySettings, ft featuremgmt.Fe } // We should only query Loki if annotations do not exist in the database. - return backend == historian.BackendTypeLoki + // To be doubly sure, ensure that the feature toggle to only use Loki is enabled. + return backend == historian.BackendTypeLoki && ft.IsEnabledGlobally(featuremgmt.FlagAlertStateHistoryLokiOnly) } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 5221d50ca86..044b05ae577 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1228,16 +1228,6 @@ var ( AllowSelfServe: false, Expression: "true", // enabled by default }, - { - Name: "alertStateHistoryAnnotationsFromLoki", - Description: "Enable using Loki as the source for panel annotations generated by alert rules", - Stage: FeatureStageExperimental, - Owner: grafanaAlertingSquad, - HideFromAdminPage: true, - HideFromDocs: true, - RequiresRestart: true, - Created: time.Date(2023, time.November, 30, 12, 0, 0, 0, time.UTC), - }, { // this is mainly used a a way to quickly disable query hints as a safe guard for our infrastructure Name: "lokiQueryHints", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index e531d86e62b..392de9008c5 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -145,7 +145,6 @@ pluginsSkipHostEnvVars,experimental,@grafana/plugins-platform-backend,2023-11-15 tableSharedCrosshair,experimental,@grafana/grafana-bi-squad,2023-12-12,false,false,false,true regressionTransformation,preview,@grafana/grafana-bi-squad,2023-11-24,false,false,false,true displayAnonymousStats,GA,@grafana/identity-access-team,2023-11-29,false,false,false,true -alertStateHistoryAnnotationsFromLoki,experimental,@grafana/alerting-squad,2023-11-30,false,false,true,false lokiQueryHints,GA,@grafana/observability-logs,2023-12-18,false,false,false,true kubernetesFeatureToggles,experimental,@grafana/grafana-operator-experience-squad,2023-12-22,false,false,false,true alertingPreviewUpgrade,preview,@grafana/alerting-squad,2024-01-03,false,false,true,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index a9fe7957842..ee666c677b2 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -591,10 +591,6 @@ const ( // Enables anonymous stats to be shown in the UI for Grafana FlagDisplayAnonymousStats = "displayAnonymousStats" - // FlagAlertStateHistoryAnnotationsFromLoki - // Enable using Loki as the source for panel annotations generated by alert rules - FlagAlertStateHistoryAnnotationsFromLoki = "alertStateHistoryAnnotationsFromLoki" - // FlagLokiQueryHints // Enables query hints for Loki FlagLokiQueryHints = "lokiQueryHints"