Chore: Remove topnav feature flag (#72337)

* Remove topnav feature flag

* Allow deprecated flags to be enabled by default

* change topnav feature flag to deprecated instead

* fix lint
This commit is contained in:
Josh Hunt 2023-07-26 11:07:18 +00:00 committed by GitHub
parent 600b930c47
commit 488eac0e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View File

@ -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 |

View File

@ -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,
},

View File

@ -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

1 Name Stage Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
23 disableSecretsCompatibility experimental @grafana/hosted-grafana-team false false true false
24 logRequestsInstrumentedAsUnknown experimental @grafana/hosted-grafana-team false false false false
25 dataConnectionsConsole GA @grafana/plugins-platform-backend false false false false
26 topnav GA deprecated @grafana/grafana-frontend-platform false false false false
27 grpcServer preview @grafana/grafana-app-platform-squad false false false false
28 entityStore experimental @grafana/grafana-app-platform-squad true false false false
29 cloudWatchCrossAccountQuerying GA @grafana/aws-datasources false false false false

View File

@ -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

View File

@ -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)

View File

@ -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('<EditDataSourcePage>', () => {
});
it('should show updated action buttons when topnav is on', async () => {
config.featureToggles.topnav = true;
setup(uid, store);
await waitFor(() => {