scopes: behind its own feature flag (#97077)

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist 2024-11-27 08:58:25 +01:00 committed by GitHub
parent f6ccf976e5
commit 21bd47e512
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 31 additions and 1 deletions

View File

@ -189,6 +189,7 @@ Experimental features might be changed or removed without prior notice.
| `newFolderPicker` | Enables the nested folder picker without having nested folders enabled |
| `onPremToCloudMigrationsAlerts` | Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction. |
| `onPremToCloudMigrationsAuthApiMig` | Enables the use of auth api instead of gcom for internal token services. Requires `onPremToCloudMigrations` to be enabled in conjunction. |
| `scopeApi` | In-development feature flag for the scope api using the app platform. |
| `sqlExpressions` | Enables using SQL and DuckDB functions as Expressions. |
| `nodeGraphDotLayout` | Changed the layout algorithm for the node graph |
| `kubernetesAggregator` | Enable grafana's embedded kube-aggregator |

View File

@ -160,6 +160,7 @@ export interface FeatureToggles {
onPremToCloudMigrationsAlerts?: boolean;
onPremToCloudMigrationsAuthApiMig?: boolean;
alertingSaveStatePeriodic?: boolean;
scopeApi?: boolean;
promQLScope?: boolean;
logQLScope?: boolean;
sqlExpressions?: boolean;

View File

@ -29,7 +29,8 @@ func NewScopeAPIBuilder() *ScopeAPIBuilder {
}
func RegisterAPIService(features featuremgmt.FeatureToggles, apiregistration builder.APIRegistrar, reg prometheus.Registerer) *ScopeAPIBuilder {
if !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) {
if !(features.IsEnabledGlobally(featuremgmt.FlagScopeApi) ||
features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs)) {
return nil // skip registration unless opting into experimental apis
}
builder := NewScopeAPIBuilder()

View File

@ -1070,6 +1070,14 @@ var (
FrontendOnly: false,
Owner: grafanaAlertingSquad,
},
{
Name: "scopeApi",
Description: "In-development feature flag for the scope api using the app platform.",
Stage: FeatureStageExperimental,
Owner: grafanaAppPlatformSquad,
HideFromAdminPage: true,
Expression: "false",
},
{
Name: "promQLScope",
Description: "In-development feature that will allow injection of labels into prometheus queries.",

View File

@ -141,6 +141,7 @@ onPremToCloudMigrations,preview,@grafana/grafana-operator-experience-squad,false
onPremToCloudMigrationsAlerts,experimental,@grafana/grafana-operator-experience-squad,false,false,false
onPremToCloudMigrationsAuthApiMig,experimental,@grafana/grafana-operator-experience-squad,false,false,false
alertingSaveStatePeriodic,privatePreview,@grafana/alerting-squad,false,false,false
scopeApi,experimental,@grafana/grafana-app-platform-squad,false,false,false
promQLScope,GA,@grafana/observability-metrics,false,false,false
logQLScope,privatePreview,@grafana/observability-logs,false,false,false
sqlExpressions,experimental,@grafana/grafana-app-platform-squad,false,false,false

1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
141 onPremToCloudMigrationsAlerts experimental @grafana/grafana-operator-experience-squad false false false
142 onPremToCloudMigrationsAuthApiMig experimental @grafana/grafana-operator-experience-squad false false false
143 alertingSaveStatePeriodic privatePreview @grafana/alerting-squad false false false
144 scopeApi experimental @grafana/grafana-app-platform-squad false false false
145 promQLScope GA @grafana/observability-metrics false false false
146 logQLScope privatePreview @grafana/observability-logs false false false
147 sqlExpressions experimental @grafana/grafana-app-platform-squad false false false

View File

@ -575,6 +575,10 @@ const (
// Writes the state periodically to the database, asynchronous to rule evaluation
FlagAlertingSaveStatePeriodic = "alertingSaveStatePeriodic"
// FlagScopeApi
// In-development feature flag for the scope api using the app platform.
FlagScopeApi = "scopeApi"
// FlagPromQLScope
// In-development feature that will allow injection of labels into prometheus queries.
FlagPromQLScope = "promQLScope"

View File

@ -3130,6 +3130,20 @@
"frontend": true
}
},
{
"metadata": {
"name": "scopeApi",
"resourceVersion": "1732690644377",
"creationTimestamp": "2024-11-27T06:57:24Z"
},
"spec": {
"description": "In-development feature flag for the scope api using the app platform.",
"stage": "experimental",
"codeowner": "@grafana/grafana-app-platform-squad",
"hideFromAdminPage": true,
"expression": "false"
}
},
{
"metadata": {
"name": "scopeFilters",