diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index a321a8e11f5..83f2879baf0 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -24,7 +24,6 @@ Some features are enabled by default. You can disable these feature by setting t | `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | | `featureHighlights` | Highlight Grafana Enterprise features | | | `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes | -| `topnav` | Enables new top navigation and page layouts | Yes | | `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | | `redshiftAsyncQueryDataSupport` | Enable async query data support for Redshift | Yes | | `athenaAsyncQueryDataSupport` | Enable async query data support for Athena | Yes | diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 45b7bd0dcd4..e93164e5926 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -166,9 +166,11 @@ var ( Owner: grafanaPluginsPlatformSquad, }, { + // Some plugins rely on topnav feature flag being enabled, so we cannot remove this until we + // can afford the breaking change, or we've detemined no one else is relying on it Name: "topnav", - Description: "Enables new top navigation and page layouts", - Stage: FeatureStageGeneralAvailability, + Description: "Enables topnav support in external plugins. The new Grafana navigation cannot be disabled.", + Stage: FeatureStageDeprecated, Expression: "true", // enabled by default Owner: grafanaFrontendPlatformSquad, }, diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 2de9a3a14c6..73abc787319 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -23,7 +23,7 @@ scenes,experimental,@grafana/dashboards-squad,false,false,false,true disableSecretsCompatibility,experimental,@grafana/hosted-grafana-team,false,false,true,false logRequestsInstrumentedAsUnknown,experimental,@grafana/hosted-grafana-team,false,false,false,false dataConnectionsConsole,GA,@grafana/plugins-platform-backend,false,false,false,false -topnav,GA,@grafana/grafana-frontend-platform,false,false,false,false +topnav,deprecated,@grafana/grafana-frontend-platform,false,false,false,false grpcServer,preview,@grafana/grafana-app-platform-squad,false,false,false,false entityStore,experimental,@grafana/grafana-app-platform-squad,true,false,false,false cloudWatchCrossAccountQuerying,GA,@grafana/aws-datasources,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 17f4e076494..ea7892e55b2 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -104,7 +104,7 @@ const ( FlagDataConnectionsConsole = "dataConnectionsConsole" // FlagTopnav - // Enables new top navigation and page layouts + // Enables topnav support in external plugins. The new Grafana navigation cannot be disabled. FlagTopnav = "topnav" // FlagGrpcServer diff --git a/pkg/services/featuremgmt/toggles_gen_test.go b/pkg/services/featuremgmt/toggles_gen_test.go index 2e75aeb482c..5f7798195e6 100644 --- a/pkg/services/featuremgmt/toggles_gen_test.go +++ b/pkg/services/featuremgmt/toggles_gen_test.go @@ -30,8 +30,8 @@ func TestFeatureToggleFiles(t *testing.T) { t.Run("check registry constraints", func(t *testing.T) { for _, flag := range standardFeatureFlags { - if flag.Expression == "true" && flag.Stage != FeatureStageGeneralAvailability { - t.Errorf("only FeatureStageGeneralAvailability features can be enabled by default. See: %s", flag.Name) + if flag.Expression == "true" && !(flag.Stage == FeatureStageGeneralAvailability || flag.Stage == FeatureStageDeprecated) { + t.Errorf("only FeatureStageGeneralAvailability or FeatureStageDeprecated features can be enabled by default. See: %s", flag.Name) } if flag.RequiresDevMode && flag.Stage != FeatureStageExperimental { t.Errorf("only alpha features can require dev mode. See: %s", flag.Name) diff --git a/public/app/features/datasources/pages/EditDataSourcePage.test.tsx b/public/app/features/datasources/pages/EditDataSourcePage.test.tsx index 544e1cc01d8..4ad10721056 100644 --- a/public/app/features/datasources/pages/EditDataSourcePage.test.tsx +++ b/public/app/features/datasources/pages/EditDataSourcePage.test.tsx @@ -4,7 +4,7 @@ import { Store } from 'redux'; import { TestProvider } from 'test/helpers/TestProvider'; import { LayoutModes } from '@grafana/data'; -import { setAngularLoader, config, setPluginExtensionGetter } from '@grafana/runtime'; +import { setAngularLoader, setPluginExtensionGetter } from '@grafana/runtime'; import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps'; import { configureStore } from 'app/store/configureStore'; @@ -111,7 +111,6 @@ describe('', () => { }); it('should show updated action buttons when topnav is on', async () => { - config.featureToggles.topnav = true; setup(uid, store); await waitFor(() => {