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 4dc078e5742..ee061998259 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -27,7 +27,6 @@ Some stable features are enabled by default. You can disable a stable feature by | `cloudWatchDynamicLabels` | Use dynamic labels instead of alias patterns in CloudWatch datasource | Yes | | `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 | | `internationalization` | Enables internationalization | Yes | -| `topnav` | Enables new top navigation and page layouts | Yes | | `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | | `newPanelChromeUI` | Show updated look and feel of grafana-ui PanelChrome: panel header, icons, and menu | Yes | | `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | | diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 867265d0eb2..10e552e3c86 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -200,9 +200,11 @@ var ( Owner: grafanaUserEssentialsSquad, }, { + // 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", - State: FeatureStateStable, + Description: "Enables topnav support in external plugins. The new Grafana navigation cannot be disabled.", + State: FeatureStateDeprecated, Expression: "true", // enabled by default Owner: grafanaUserEssentialsSquad, }, diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 249e9edc4d8..1047fe07a3f 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -28,7 +28,7 @@ disableSecretsCompatibility,alpha,@grafana/hosted-grafana-team,false,false,true, logRequestsInstrumentedAsUnknown,alpha,@grafana/hosted-grafana-team,false,false,false,false dataConnectionsConsole,stable,@grafana/plugins-platform-backend,false,false,false,false internationalization,stable,@grafana/user-essentials,false,false,false,false -topnav,stable,@grafana/user-essentials,false,false,false,false +topnav,deprecated,@grafana/user-essentials,false,false,false,false grpcServer,beta,@grafana/grafana-app-platform-squad,false,false,false,false entityStore,alpha,@grafana/grafana-app-platform-squad,true,false,false,false cloudWatchCrossAccountQuerying,stable,@grafana/aws-plugins,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 7e0e6a4d10c..c4383b168a8 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -124,7 +124,7 @@ const ( FlagInternationalization = "internationalization" // 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 6f8a0af4c50..fc79af6f9fe 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.State != FeatureStateStable { - t.Errorf("only stable features can be enabled by default. See: %s", flag.Name) + if flag.Expression == "true" && !(flag.State == FeatureStateStable || flag.State == FeatureStateDeprecated) { + t.Errorf("only FeatureStateStable or FeatureStateDeprecated features can be enabled by default. See: %s", flag.Name) } if flag.RequiresDevMode && flag.State != FeatureStateAlpha { 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 f168caa7782..8454e9b01ce 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 } from '@grafana/runtime'; +import { setAngularLoader } from '@grafana/runtime'; import { getRouteComponentProps } from 'app/core/navigation/__mocks__/routeProps'; import { configureStore } from 'app/store/configureStore'; @@ -110,7 +110,6 @@ describe('', () => { }); it('should show updated action buttons when topnav is on', async () => { - config.featureToggles.topnav = true; setup(uid, store); await waitFor(() => {