Skip to content

Commit

Permalink
clusterversion: rename V22_2* gates to TODODelete_V22_2*
Browse files Browse the repository at this point in the history
Now that we've bumped minBinary to 22.2, 22.2 gates are now safe for
deletion.

This commit renames V22_2 gates to TODODelete_V22_2*.

Action gate deletion and related logic/migrations will be done async
by teams.

Issue: #95530
Epic: CRDB-23572

Release note: None
  • Loading branch information
celiala committed Feb 7, 2023
1 parent 618ea05 commit 2b730a0
Show file tree
Hide file tree
Showing 69 changed files with 265 additions and 265 deletions.
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/datadriven_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ var localityCfgs = map[string]roachpb.Locality{
}

var clusterVersionKeys = map[string]clusterversion.Key{
"Start22_2": clusterversion.V22_2Start,
"Start22_2": clusterversion.TODODelete_V22_2Start,
}

type sqlDBKey struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -2933,7 +2933,7 @@ VALUES ($1, $2, $3, (SELECT user_id FROM system.users WHERE username = $1), (SEL
return err
}

roleOptionsHasIDColumn := r.execCfg.Settings.Version.IsActive(ctx, clusterversion.V22_2RoleOptionsTableHasIDColumn)
roleOptionsHasIDColumn := r.execCfg.Settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2RoleOptionsTableHasIDColumn)
insertRoleOption := `INSERT INTO system.role_options ("username", "option", "value", "user_id") VALUES ($1, $2, $3, $4)`
if !roleOptionsHasIDColumn {
insertRoleOption = `INSERT INTO system.role_options ("username", "option", "value") VALUES ($1, $2, $3)`
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/restore_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ func restorePlanHook(
}

if restoreStmt.Options.SchemaOnly &&
!p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.V22_2Start) {
!p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2Start) {
return nil, nil, nil, false,
errors.New("cannot run RESTORE with schema_only until cluster has fully upgraded to 22.2")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/system_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func usersRestoreFunc(
txn isql.Txn,
systemTableName, tempTableName string,
) (retErr error) {
if !deps.settings.Version.IsActive(ctx, clusterversion.V22_2RoleOptionsTableHasIDColumn) {
if !deps.settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2RoleOptionsTableHasIDColumn) {
return defaultSystemTableRestoreFunc(
ctx, deps, txn, systemTableName, tempTableName,
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/ccl/changefeedccl/cdceval/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ func normalizeAndValidateSelectForTarget(
}
}()

if !execCfg.Settings.Version.IsActive(ctx, clusterversion.V22_2EnablePredicateProjectionChangefeed) {
if !execCfg.Settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2EnablePredicateProjectionChangefeed) {
return nil, errors.Newf(
`filters and projections not supported until upgrade to version %s or higher is finalized`,
clusterversion.V22_2EnablePredicateProjectionChangefeed.String())
clusterversion.TODODelete_V22_2EnablePredicateProjectionChangefeed.String())
}

// This really shouldn't happen as it's enforced by sql.y.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/amazon/aws_kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func MakeAWSKMS(ctx context.Context, uri string, env cloud.KMSEnv) (cloud.KMS, e
}

if kmsURIParams.roleProvider != (roleProvider{}) {
if !env.ClusterSettings().Version.IsActive(ctx, clusterversion.V22_2SupportAssumeRoleAuth) {
if !env.ClusterSettings().Version.IsActive(ctx, clusterversion.TODODelete_V22_2SupportAssumeRoleAuth) {
return nil, errors.New("cannot authenticate to KMS via assume role until cluster has fully upgraded to 22.2")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/amazon/s3_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ func newClient(
}

if conf.assumeRoleProvider.roleARN != "" {
if !settings.Version.IsActive(ctx, clusterversion.V22_2SupportAssumeRoleAuth) {
if !settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2SupportAssumeRoleAuth) {
return s3Client{}, "", errors.New("cannot authenticate to cloud storage via assume role until cluster has fully upgraded to 22.2")
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/cloud/cloudprivilege/privileges.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func CheckDestinationPrivileges(ctx context.Context, p sql.PlanHookState, to []s
// If the resource being used is an External Connection, check that the user
// has adequate privileges.
if conf.Provider == cloudpb.ExternalStorageProvider_external {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.V22_2SystemExternalConnectionsTable) {
if !p.ExecCfg().Settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2SystemExternalConnectionsTable) {
return pgerror.Newf(pgcode.FeatureNotSupported,
"version %v must be finalized to backup to an External Connection",
clusterversion.ByKey(clusterversion.V22_2SystemExternalConnectionsTable))
clusterversion.ByKey(clusterversion.TODODelete_V22_2SystemExternalConnectionsTable))
}
ecPrivilege := &syntheticprivilege.ExternalConnectionPrivilege{
ConnectionName: conf.ExternalConnectionConfig.Name,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/gcp/gcp_kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func MakeGCSKMS(ctx context.Context, uri string, env cloud.KMSEnv) (cloud.KMS, e
if kmsURIParams.assumeRole == "" {
opts = append(opts, credentialsOpt...)
} else {
if !env.ClusterSettings().Version.IsActive(ctx, clusterversion.V22_2SupportAssumeRoleAuth) {
if !env.ClusterSettings().Version.IsActive(ctx, clusterversion.TODODelete_V22_2SupportAssumeRoleAuth) {
return nil, errors.New("cannot authenticate to KMS via assume role until cluster has fully upgraded to 22.2")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cloud/gcp/gcs_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func makeGCSStorage(
if conf.AssumeRole == "" {
opts = append(opts, credentialsOpt...)
} else {
if !args.Settings.Version.IsActive(ctx, clusterversion.V22_2SupportAssumeRoleAuth) {
if !args.Settings.Version.IsActive(ctx, clusterversion.TODODelete_V22_2SupportAssumeRoleAuth) {
return nil, errors.New("cannot authenticate to cloud storage via assume role until cluster has fully upgraded to 22.2")
}

Expand Down
Loading

0 comments on commit 2b730a0

Please sign in to comment.