From b6d34acc445de0f41be426193daf46af0c79ba79 Mon Sep 17 00:00:00 2001 From: Ihor Yeromin Date: Mon, 17 Nov 2025 16:58:43 +0100 Subject: [PATCH] Feature toggle: Remove addFieldFromCalculationStatFunctions feature toggle (#113757) * Remove addFieldFromCalculationStatFunctions feature toggle The addFieldFromCalculationStatFunctions feature toggle was at GA stage and enabled by default. This commit removes the toggle and makes the cumulative and window functions permanently available in the add field from calculation transformation. Changes: - Removed feature toggle definition from registry.go - Updated CalculateFieldTransformerEditor to always include cumulative and window functions - Removed unused config import - Removed documentation entry - Regenerated all generated files (toggles_gen.go, toggles_gen.csv, toggles_gen.json, featureToggles.gen.ts) * fix merge conflicts --- .../feature-toggles/index.md | 103 +++++++++--------- .../src/types/featureToggles.gen.ts | 5 - pkg/services/featuremgmt/registry.go | 8 -- pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 - pkg/services/featuremgmt/toggles_gen.json | 1 + .../CalculateFieldTransformerEditor.tsx | 23 ++-- 7 files changed, 61 insertions(+), 84 deletions(-) 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 ff8bc85b14f..317b60971b3 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -22,58 +22,57 @@ For more information about feature release stages, refer to [Release life cycle Most [generally available](https://grafana.com/docs/release-life-cycle/#general-availability) features are enabled by default. You can disable these feature by setting the feature flag to "false" in the configuration. -| Feature toggle name | Description | Enabled by default | -| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | -| `publicDashboardsScene` | Enables public dashboard rendering using scenes | Yes | -| `featureHighlights` | Highlight Grafana Enterprise features | | -| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | -| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | -| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | Yes | -| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | Yes | -| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | -| `unifiedRequestLog` | Writes error logs to the request logger | Yes | -| `logsExploreTableVisualisation` | A table visualisation for logs in Explore | Yes | -| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | Yes | -| `transformationsRedesign` | Enables the transformations redesign | Yes | -| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes | -| `dashgpt` | Enable AI powered features in dashboards | Yes | -| `kubernetesDashboards` | Use the kubernetes API in the frontend for dashboards | Yes | -| `addFieldFromCalculationStatFunctions` | Add cumulative and window functions to the add field from calculation transformation | Yes | -| `annotationPermissionUpdate` | Change the way annotation permissions work by scoping them to folders and dashboards. | Yes | -| `dashboardSceneForViewers` | Enables dashboard rendering using Scenes for viewer roles | Yes | -| `dashboardSceneSolo` | Enables rendering dashboards using scenes for solo panels | Yes | -| `dashboardScene` | Enables dashboard rendering using scenes for all roles | Yes | -| `logsInfiniteScrolling` | Enables infinite scrolling for the Logs panel in Explore and Dashboards | Yes | -| `logRowsPopoverMenu` | Enable filtering menu displayed when text of a log line is selected | Yes | -| `alertingQueryOptimization` | Optimizes eligible queries in order to reduce load on datasources | | -| `onPremToCloudMigrations` | Enable the Grafana Migration Assistant, which helps you easily migrate various on-prem resources to your Grafana Cloud stack. | Yes | -| `newPDFRendering` | New implementation for the dashboard-to-PDF rendering | Yes | -| `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes | -| `pluginProxyPreserveTrailingSlash` | Preserve plugin proxy trailing slash. | | -| `azureMonitorPrometheusExemplars` | Allows configuration of Azure Monitor as a data source that can provide Prometheus exemplars | Yes | -| `ssoSettingsLDAP` | Use the new SSO Settings API to configure LDAP | Yes | -| `cloudWatchRoundUpEndTime` | Round up end time for metric queries to the next minute to avoid missing data | Yes | -| `newFiltersUI` | Enables new combobox style UI for the Ad hoc filters variable in scenes architecture | Yes | -| `alertingQueryAndExpressionsStepMode` | Enables step mode for alerting queries and expressions | Yes | -| `improvedExternalSessionHandling` | Enables improved support for OAuth external sessions. After enabling this feature, users might need to re-authenticate themselves. | Yes | -| `useSessionStorageForRedirection` | Use session storage for handling the redirection after login | Yes | -| `pluginsSriChecks` | Enables SRI checks for plugin assets | | -| `azureMonitorDisableLogLimit` | Disables the log limit restriction for Azure Monitor when true. The limit is enabled by default. | | -| `alertingUIOptimizeReducer` | Enables removing the reducer from the alerting UI when creating a new alert rule and using instant query | Yes | -| `azureMonitorEnableUserAuth` | Enables user auth for Azure Monitor datasource only | Yes | -| `alertingNotificationsStepMode` | Enables simplified step mode in the notifications section | Yes | -| `elasticsearchCrossClusterSearch` | Enables cross cluster search in the Elasticsearch data source | | -| `lokiLabelNamesQueryApi` | Defaults to using the Loki `/labels` API instead of `/series` | Yes | -| `improvedExternalSessionHandlingSAML` | Enables improved support for SAML external sessions. Ensure the NameID format is correctly configured in Grafana for SAML Single Logout to function properly. | Yes | -| `newLogsPanel` | Enables the new logs panel | Yes | -| `alertingMigrationUI` | Enables the alerting migration UI, to migrate data source-managed rules to Grafana-managed rules | Yes | -| `alertingImportYAMLUI` | Enables a UI feature for importing rules from a Prometheus file to Grafana-managed rules | Yes | -| `unifiedNavbars` | Enables unified navbars | | -| `grafanaAssistantInProfilesDrilldown` | Enables integration with Grafana Assistant in Profiles Drilldown | Yes | -| `sharingDashboardImage` | Enables image sharing functionality for dashboards | Yes | -| `tabularNumbers` | Use fixed-width numbers globally in the UI | | -| `tempoSearchBackendMigration` | Run search queries through the tempo backend | | +| Feature toggle name | Description | Enabled by default | +| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | +| `publicDashboardsScene` | Enables public dashboard rendering using scenes | Yes | +| `featureHighlights` | Highlight Grafana Enterprise features | | +| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | +| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | +| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | Yes | +| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | Yes | +| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | +| `unifiedRequestLog` | Writes error logs to the request logger | Yes | +| `logsExploreTableVisualisation` | A table visualisation for logs in Explore | Yes | +| `awsDatasourcesTempCredentials` | Support temporary security credentials in AWS plugins for Grafana Cloud customers | Yes | +| `transformationsRedesign` | Enables the transformations redesign | Yes | +| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes | +| `dashgpt` | Enable AI powered features in dashboards | Yes | +| `kubernetesDashboards` | Use the kubernetes API in the frontend for dashboards | Yes | +| `annotationPermissionUpdate` | Change the way annotation permissions work by scoping them to folders and dashboards. | Yes | +| `dashboardSceneForViewers` | Enables dashboard rendering using Scenes for viewer roles | Yes | +| `dashboardSceneSolo` | Enables rendering dashboards using scenes for solo panels | Yes | +| `dashboardScene` | Enables dashboard rendering using scenes for all roles | Yes | +| `logsInfiniteScrolling` | Enables infinite scrolling for the Logs panel in Explore and Dashboards | Yes | +| `logRowsPopoverMenu` | Enable filtering menu displayed when text of a log line is selected | Yes | +| `alertingQueryOptimization` | Optimizes eligible queries in order to reduce load on datasources | | +| `onPremToCloudMigrations` | Enable the Grafana Migration Assistant, which helps you easily migrate various on-prem resources to your Grafana Cloud stack. | Yes | +| `newPDFRendering` | New implementation for the dashboard-to-PDF rendering | Yes | +| `cloudWatchNewLabelParsing` | Updates CloudWatch label parsing to be more accurate | Yes | +| `pluginProxyPreserveTrailingSlash` | Preserve plugin proxy trailing slash. | | +| `azureMonitorPrometheusExemplars` | Allows configuration of Azure Monitor as a data source that can provide Prometheus exemplars | Yes | +| `ssoSettingsLDAP` | Use the new SSO Settings API to configure LDAP | Yes | +| `cloudWatchRoundUpEndTime` | Round up end time for metric queries to the next minute to avoid missing data | Yes | +| `newFiltersUI` | Enables new combobox style UI for the Ad hoc filters variable in scenes architecture | Yes | +| `alertingQueryAndExpressionsStepMode` | Enables step mode for alerting queries and expressions | Yes | +| `improvedExternalSessionHandling` | Enables improved support for OAuth external sessions. After enabling this feature, users might need to re-authenticate themselves. | Yes | +| `useSessionStorageForRedirection` | Use session storage for handling the redirection after login | Yes | +| `pluginsSriChecks` | Enables SRI checks for plugin assets | | +| `azureMonitorDisableLogLimit` | Disables the log limit restriction for Azure Monitor when true. The limit is enabled by default. | | +| `alertingUIOptimizeReducer` | Enables removing the reducer from the alerting UI when creating a new alert rule and using instant query | Yes | +| `azureMonitorEnableUserAuth` | Enables user auth for Azure Monitor datasource only | Yes | +| `alertingNotificationsStepMode` | Enables simplified step mode in the notifications section | Yes | +| `elasticsearchCrossClusterSearch` | Enables cross cluster search in the Elasticsearch data source | | +| `lokiLabelNamesQueryApi` | Defaults to using the Loki `/labels` API instead of `/series` | Yes | +| `improvedExternalSessionHandlingSAML` | Enables improved support for SAML external sessions. Ensure the NameID format is correctly configured in Grafana for SAML Single Logout to function properly. | Yes | +| `newLogsPanel` | Enables the new logs panel | Yes | +| `alertingMigrationUI` | Enables the alerting migration UI, to migrate data source-managed rules to Grafana-managed rules | Yes | +| `alertingImportYAMLUI` | Enables a UI feature for importing rules from a Prometheus file to Grafana-managed rules | Yes | +| `unifiedNavbars` | Enables unified navbars | | +| `grafanaAssistantInProfilesDrilldown` | Enables integration with Grafana Assistant in Profiles Drilldown | Yes | +| `sharingDashboardImage` | Enables image sharing functionality for dashboards | Yes | +| `tabularNumbers` | Use fixed-width numbers globally in the UI | | +| `tempoSearchBackendMigration` | Run search queries through the tempo backend | | ## Public preview feature toggles diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index b9004cb62be..4b5bba51f31 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -327,11 +327,6 @@ export interface FeatureToggles { */ cachingOptimizeSerializationMemoryUsage?: boolean; /** - * Add cumulative and window functions to the add field from calculation transformation - * @default true - */ - addFieldFromCalculationStatFunctions?: boolean; - /** * Enable Grafana to sync configuration and state with a remote Alertmanager. */ alertmanagerRemoteSecondary?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index b14026fae4d..7cb093d2665 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -545,14 +545,6 @@ var ( Owner: grafanaOperatorExperienceSquad, FrontendOnly: false, }, - { - Name: "addFieldFromCalculationStatFunctions", - Description: "Add cumulative and window functions to the add field from calculation transformation", - Stage: FeatureStageGeneralAvailability, - FrontendOnly: true, - Owner: grafanaDataProSquad, - Expression: "true", // enabled by default - }, { Name: "alertmanagerRemoteSecondary", Description: "Enable Grafana to sync configuration and state with a remote Alertmanager.", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 52b5aed5803..f1035d0342d 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -72,7 +72,6 @@ queryServiceFromUI,experimental,@grafana/grafana-datasources-core-services,false queryServiceFromExplore,experimental,@grafana/grafana-datasources-core-services,false,false,true cloudWatchBatchQueries,preview,@grafana/aws-datasources,false,false,false cachingOptimizeSerializationMemoryUsage,experimental,@grafana/grafana-operator-experience-squad,false,false,false -addFieldFromCalculationStatFunctions,GA,@grafana/datapro,false,false,true alertmanagerRemoteSecondary,experimental,@grafana/alerting-squad,false,false,false alertingProvenanceLockWrites,experimental,@grafana/alerting-squad,false,false,false alertingUIUseBackendFilters,experimental,@grafana/alerting-squad,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 76382b7f6c4..00ce3b83a20 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -299,10 +299,6 @@ const ( // If enabled, the caching backend gradually serializes query responses for the cache, comparing against the configured `[caching]max_value_mb` value as it goes. This can can help prevent Grafana from running out of memory while attempting to cache very large query responses. FlagCachingOptimizeSerializationMemoryUsage = "cachingOptimizeSerializationMemoryUsage" - // FlagAddFieldFromCalculationStatFunctions - // Add cumulative and window functions to the add field from calculation transformation - FlagAddFieldFromCalculationStatFunctions = "addFieldFromCalculationStatFunctions" - // FlagAlertmanagerRemoteSecondary // Enable Grafana to sync configuration and state with a remote Alertmanager. FlagAlertmanagerRemoteSecondary = "alertmanagerRemoteSecondary" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index aa61dbe16c7..91b71aa37ea 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -8,6 +8,7 @@ "name": "addFieldFromCalculationStatFunctions", "resourceVersion": "1762442825881", "creationTimestamp": "2023-11-03T14:39:58Z", + "deletionTimestamp": "2025-11-12T14:07:50Z", "annotations": { "grafana.app/updatedTimestamp": "2025-11-06 15:27:05.88172 +0000 UTC" } diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx index 64d1fffba80..29e2f74f10a 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx @@ -23,7 +23,7 @@ import { defaultWindowOptions, } from '@grafana/data/internal'; import { t } from '@grafana/i18n'; -import { getTemplateSrv, config as cfg } from '@grafana/runtime'; +import { getTemplateSrv } from '@grafana/runtime'; import { InlineField, InlineSwitch, Input, Select } from '@grafana/ui'; import { getTransformationContent } from '../../docs/getTransformationContent'; @@ -74,21 +74,16 @@ export const CalculateFieldTransformerEditor = (props: CalculateFieldTransformer value: CalculateFieldMode.Index, label: t('transformers.calculate-field-transformer-editor.calculation-modes.label.row-index', 'Row index'), }, + { + value: CalculateFieldMode.CumulativeFunctions, + label: t('transformers.calculate-field-transformer-editor.label.cumulative-functions', 'Cumulative functions'), + }, + { + value: CalculateFieldMode.WindowFunctions, + label: t('transformers.calculate-field-transformer-editor.label.window-functions', 'Window functions'), + }, ]; - if (cfg.featureToggles.addFieldFromCalculationStatFunctions) { - calculationModes.push( - { - value: CalculateFieldMode.CumulativeFunctions, - label: t('transformers.calculate-field-transformer-editor.label.cumulative-functions', 'Cumulative functions'), - }, - { - value: CalculateFieldMode.WindowFunctions, - label: t('transformers.calculate-field-transformer-editor.label.window-functions', 'Window functions'), - } - ); - } - useEffect(() => { const ctx = { interpolate: (v: string) => v }; const subscription = of(input)