remove split scopes FT

pull/81874/head
jguer 1 year ago
parent 9fab7bd27d
commit 349fb081d3
No known key found for this signature in database
GPG Key ID: 8E43FBD745BCAC49
  1. 1
      docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md
  2. 1
      packages/grafana-data/src/types/featureToggles.gen.ts
  3. 14
      pkg/services/accesscontrol/acimpl/service.go
  4. 4
      pkg/services/accesscontrol/resourcepermissions/store.go
  5. 11
      pkg/services/featuremgmt/registry.go
  6. 1
      pkg/services/featuremgmt/toggles_gen.csv
  7. 4
      pkg/services/featuremgmt/toggles_gen.go

@ -45,7 +45,6 @@ Some features are enabled by default. You can disable these feature by setting t
| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | 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 |
| `splitScopes` | Support faster dashboard and folder search by splitting permission scopes into parts | Yes |
| `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes |
| `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI | Yes |
| `alertingNoDataErrorExecution` | Changes how Alerting state manager handles execution of NoData/Error | Yes |

@ -104,7 +104,6 @@ export interface FeatureToggles {
grafanaAPIServerEnsureKubectlAccess?: boolean;
featureToggleAdminPage?: boolean;
awsAsyncQueryCaching?: boolean;
splitScopes?: boolean;
permissionsFilterRemoveSubquery?: boolean;
prometheusConfigOverhaulAuth?: boolean;
configurableSchedulerTick?: boolean;

@ -50,14 +50,12 @@ func ProvideService(cfg *setting.Cfg, db db.DB, routeRegister routing.RouteRegis
return nil, err
}
if features.IsEnabledGlobally(featuremgmt.FlagSplitScopes) {
// Migrating scopes that haven't been split yet to have kind, attribute and identifier in the DB
// This will be removed once we've:
// 1) removed the feature toggle and
// 2) have released enough versions not to support a version without split scopes
if err := migrator.MigrateScopeSplit(db, service.log); err != nil {
return nil, err
}
// Migrating scopes that haven't been split yet to have kind, attribute and identifier in the DB
// This will be removed once we've:
// 1) removed the feature toggle and
// 2) have released enough versions not to support a version without split scopes
if err := migrator.MigrateScopeSplit(db, service.log); err != nil {
return nil, err
}
return service, nil

@ -667,9 +667,7 @@ func (s *store) createPermissions(sess *db.Session, roleID int64, resource, reso
p.RoleID = roleID
p.Created = time.Now()
p.Updated = time.Now()
if s.features.IsEnabledGlobally(featuremgmt.FlagSplitScopes) {
p.Kind, p.Attribute, p.Identifier = p.SplitScope()
}
p.Kind, p.Attribute, p.Identifier = p.SplitScope()
permissions = append(permissions, p)
}

@ -728,17 +728,6 @@ var (
Owner: awsDatasourcesSquad,
Created: time.Date(2023, time.July, 21, 12, 0, 0, 0, time.UTC),
},
{
Name: "splitScopes",
Description: "Support faster dashboard and folder search by splitting permission scopes into parts",
Stage: FeatureStageGeneralAvailability,
FrontendOnly: false,
Expression: "true", // enabled by default
Owner: identityAccessTeam,
RequiresRestart: true,
HideFromAdminPage: true, // This is internal work to speed up dashboard search, and is not ready for wider use
Created: time.Date(2023, time.July, 21, 12, 0, 0, 0, time.UTC),
},
{
Name: "permissionsFilterRemoveSubquery",
Description: "Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder",

@ -85,7 +85,6 @@ grafanaAPIServerWithExperimentalAPIs,experimental,@grafana/grafana-app-platform-
grafanaAPIServerEnsureKubectlAccess,experimental,@grafana/grafana-app-platform-squad,2023-12-06,true,true,false
featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,2023-07-18,false,true,false
awsAsyncQueryCaching,GA,@grafana/aws-datasources,2023-07-21,false,false,false
splitScopes,GA,@grafana/identity-access-team,2023-07-21,false,true,false
permissionsFilterRemoveSubquery,experimental,@grafana/backend-platform,2023-08-02,false,false,false
prometheusConfigOverhaulAuth,GA,@grafana/observability-metrics,2023-07-21,false,false,false
configurableSchedulerTick,experimental,@grafana/alerting-squad,2023-07-26,false,true,false

1 Name Stage Owner Created requiresDevMode RequiresRestart FrontendOnly
85 grafanaAPIServerEnsureKubectlAccess experimental @grafana/grafana-app-platform-squad 2023-12-06 true true false
86 featureToggleAdminPage experimental @grafana/grafana-operator-experience-squad 2023-07-18 false true false
87 awsAsyncQueryCaching GA @grafana/aws-datasources 2023-07-21 false false false
splitScopes GA @grafana/identity-access-team 2023-07-21 false true false
88 permissionsFilterRemoveSubquery experimental @grafana/backend-platform 2023-08-02 false false false
89 prometheusConfigOverhaulAuth GA @grafana/observability-metrics 2023-07-21 false false false
90 configurableSchedulerTick experimental @grafana/alerting-squad 2023-07-26 false true false

@ -351,10 +351,6 @@ const (
// Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled
FlagAwsAsyncQueryCaching = "awsAsyncQueryCaching"
// FlagSplitScopes
// Support faster dashboard and folder search by splitting permission scopes into parts
FlagSplitScopes = "splitScopes"
// FlagPermissionsFilterRemoveSubquery
// Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder
FlagPermissionsFilterRemoveSubquery = "permissionsFilterRemoveSubquery"

Loading…
Cancel
Save