Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: no deploy config (#15442)

Danny Xu99cff02283cd
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.go
index 48c4c247f6..f33f302f9d 100644
--- a/backend/api/v1/plan_service.go
+++ b/backend/api/v1/plan_service.go
@@ -1342,17 +1342,12 @@ func getPlanSpecDatabaseGroups(steps []*storepb.PlanConfig_Step) []string {
func getPlanSnapshot(ctx context.Context, s *store.Store, steps []*storepb.PlanConfig_Step, project *store.ProjectMessage) (*storepb.PlanConfig_DeploymentSnapshot, error) {
snapshot := &storepb.PlanConfig_DeploymentSnapshot{}
- deploymentConfig, err := s.GetDeploymentConfigV2(ctx, project.ResourceID)
+ environments, err := s.ListEnvironmentV2(ctx, &store.FindEnvironmentMessage{})
if err != nil {
- return nil, errors.Wrapf(err, "failed to get deployment config")
+ return nil, errors.Wrapf(err, "failed to list environments")
}
- if err := utils.ValidateDeploymentSchedule(deploymentConfig.Config.GetSchedule()); err != nil {
- return nil, errors.Wrapf(err, "failed to validate and get deployment schedule")
- }
- snapshot.DeploymentConfigSnapshot = &storepb.PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot{
- Name: common.FormatDeploymentConfig(project.ResourceID),
- Title: deploymentConfig.Name,
- DeploymentConfig: deploymentConfig.Config,
+ for _, e := range environments {
+ snapshot.Environments = append(snapshot.Environments, e.ResourceID)
}
databaseGroups := getPlanSpecDatabaseGroups(steps)
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index 5bbfc599af..653002dd7a 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -234,7 +234,7 @@ func (s *RolloutService) CreateRollout(ctx context.Context, request *v1pb.Create
return nil, status.Errorf(codes.InvalidArgument, "no database matched for deployment, hint: check deployment config setting that the target database is in a stage")
}
if isChangeDatabasePlan(plan.Config.GetSteps()) {
- pipelineCreate, err = getPipelineCreateToTargetStage(ctx, s.store, plan.Config.GetDeploymentSnapshot().GetDeploymentConfigSnapshot().GetDeploymentConfig(), project, pipelineCreate, request.StageId)
+ pipelineCreate, err = getPipelineCreateToTargetStage(ctx, s.store, plan.Config.GetDeploymentSnapshot().GetEnvironments(), pipelineCreate, request.StageId)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to filter stages with stageId, error: %v", err)
}
@@ -963,182 +963,104 @@ func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.
if err != nil {
return nil, errors.Wrapf(err, "failed to transform database group specs")
}
- specs = transformSpecs
- // Step 2 - filter by deployment config for ChangeDatabase specs.
- filterByDeploymentConfig := isChangeDatabasePlan(steps)
-
- transformedSteps := steps
- // All 0.
- // deploymentIDs are present for ChangeDatabase type.
- deploymentIDs := make([]string, len(transformedSteps))
-
- // For ChangeDatabase specs, we will try to rebuild the steps based on the deployment config.
- if filterByDeploymentConfig {
- deploymentConfig := snapshot.GetDeploymentConfigSnapshot().GetDeploymentConfig()
- if deploymentConfig == nil {
- deploymentConfigMessage, err := s.GetDeploymentConfigV2(ctx, project.ResourceID)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get deployment config")
- }
- deploymentConfig = deploymentConfigMessage.Config
- }
- if err := utils.ValidateDeploymentSchedule(deploymentConfig.Schedule); err != nil {
- return nil, errors.Wrapf(err, "failed to validate and get deployment schedule")
- }
- // Get all databases from specs.
- var databases []*store.DatabaseMessage
- for _, spec := range specs {
- if config := spec.GetChangeDatabaseConfig(); config != nil {
- instanceID, databaseName, err := common.GetInstanceDatabaseID(config.Target)
- if err != nil {
- return nil, status.Error(codes.InvalidArgument, err.Error())
- }
- database, err := s.GetDatabaseV2(ctx, &store.FindDatabaseMessage{
- InstanceID: &instanceID,
- DatabaseName: &databaseName,
- })
- if err != nil {
- return nil, status.Error(codes.Internal, err.Error())
- }
- if database == nil {
- return nil, status.Errorf(codes.NotFound, "database %v not found", config.Target)
- }
- databases = append(databases, database)
- }
- }
- // Calculate the matrix of databases based on the deployment schedule.
- matrix, err := utils.GetDatabaseMatrixFromDeploymentSchedule(deploymentConfig.GetSchedule(), databases)
+ // Step 2 - list snapshot environments.
+ snapshotEnvironments := snapshot.Environments
+ if len(snapshotEnvironments) == 0 {
+ environments, err := s.ListEnvironmentV2(ctx, &store.FindEnvironmentMessage{})
if err != nil {
- return nil, errors.Wrapf(err, "failed to get database matrix from deployment schedule")
+ return nil, errors.Wrapf(err, "failed to list environments")
}
-
- specsByDatabase := map[string][]*storepb.PlanConfig_Spec{}
- for _, s := range specs {
- if s.GetChangeDatabaseConfig() == nil {
- return nil, errors.Errorf("unexpected nil ChangeDatabaseConfig")
- }
- target := s.GetChangeDatabaseConfig().GetTarget()
- specsByDatabase[target] = append(specsByDatabase[target], s)
+ for _, e := range environments {
+ snapshotEnvironments = append(snapshotEnvironments, e.ResourceID)
}
- databaseLoaded := map[string]bool{}
-
- var steps []*storepb.PlanConfig_Step
- deploymentIDs = []string{}
- for i, databases := range matrix {
- if len(databases) == 0 {
- continue
- }
+ }
+ environmentIndex := make(map[string]int)
+ for i, e := range snapshotEnvironments {
+ environmentIndex[e] = i
+ }
- step := &storepb.PlanConfig_Step{
- Title: deploymentConfig.GetSchedule().Deployments[i].Title,
- }
- for _, database := range databases {
- name := common.FormatDatabase(database.InstanceID, database.DatabaseName)
- if databaseLoaded[name] {
- continue
- }
- specs, ok := specsByDatabase[name]
- if !ok {
- continue
- }
- step.Specs = append(step.Specs, specs...)
- databaseLoaded[name] = true
- }
- steps = append(steps, step)
- deploymentIDs = append(deploymentIDs, deploymentConfig.GetSchedule().Deployments[i].Id)
+ // Step 3 - convert all task creates.
+ var taskCreates []*store.TaskMessage
+ for _, spec := range transformSpecs {
+ tcs, err := getTaskCreatesFromSpec(ctx, s, sheetManager, licenseService, dbFactory, spec, project)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to get task creates from spec")
}
- transformedSteps = steps
+ taskCreates = append(taskCreates, tcs...)
}
-
- pipelineCreate := &store.PipelineMessage{
- Name: "Rollout Pipeline",
- ProjectID: project.ResourceID,
+ if len(taskCreates) == 0 {
+ return nil, errors.Errorf("there is no tasks created from the plan")
}
- for i, step := range transformedSteps {
- stageCreate := &store.StageMessage{
- DeploymentID: deploymentIDs[i],
- }
+ // Step 4 - construct all environment stages.
+ var stages []*store.StageMessage
+ for _, environmentID := range snapshotEnvironments {
+ stages = append(stages, &store.StageMessage{
+ Name: environmentID, // TODO(d): is this needed?
+ Environment: environmentID,
+ DeploymentID: environmentID,
+ })
+ }
- var stageEnvironmentID string
- registerEnvironmentID := func(environmentID string) error {
- if stageEnvironmentID == "" {
- stageEnvironmentID = environmentID
- return nil
- }
- if stageEnvironmentID != environmentID {
- return errors.Errorf("expect only one environment in a stage, got %s and %s", stageEnvironmentID, environmentID)
- }
- return nil
+ // Step 5 - build tasks for each stage.
+ for _, spec := range transformSpecs {
+ tc, err := getTaskCreatesFromSpec(ctx, s, sheetManager, licenseService, dbFactory, spec, project)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to get task creates from spec")
}
-
- for _, spec := range step.Specs {
- taskCreates, err := getTaskCreatesFromSpec(ctx, s, sheetManager, licenseService, dbFactory, spec, project, registerEnvironmentID)
+ for _, t := range tc {
+ e, err := s.GetEnvironmentV2(ctx, &store.FindEnvironmentMessage{ResourceID: &t.EnvironmentID})
if err != nil {
- return nil, errors.Wrap(err, "failed to get task creates from spec")
+ return nil, status.Error(codes.Internal, err.Error())
}
- stageCreate.TaskList = append(stageCreate.TaskList, taskCreates...)
- }
-
- environment, err := s.GetEnvironmentV2(ctx, &store.FindEnvironmentMessage{ResourceID: &stageEnvironmentID})
- if err != nil {
- return nil, errors.Wrap(err, "failed to get environment")
- }
- if environment == nil {
- return nil, errors.Errorf("environment %q not found", stageEnvironmentID)
+ environmentIndex := environmentIndex[e.ResourceID]
+ stages[environmentIndex].TaskList = append(stages[environmentIndex].TaskList, t)
}
- stageCreate.Environment = stageEnvironmentID
- stageCreate.Name = fmt.Sprintf("%s Stage", environment.Title)
- if step.Title != "" {
- stageCreate.Name = step.Title
- }
-
- pipelineCreate.Stages = append(pipelineCreate.Stages, stageCreate)
}
- return pipelineCreate, nil
+ return &store.PipelineMessage{
+ Name: "Rollout Pipeline",
+ ProjectID: project.ResourceID,
+ Stages: slices.DeleteFunc(stages, func(stage *store.StageMessage) bool {
+ return len(stage.TaskList) == 0
+ }),
+ }, nil
}
-// filter pipelineCreate.Stages using targetStageID.
-func getPipelineCreateToTargetStage(ctx context.Context, s *store.Store, snapshot *storepb.DeploymentConfig, project *store.ProjectMessage, pipelineCreate *store.PipelineMessage, targetStageID *string) (*store.PipelineMessage, error) {
- if targetStageID == nil {
+// filter pipelineCreate.Stages using targetEnvironmentID.
+func getPipelineCreateToTargetStage(ctx context.Context, s *store.Store, snapshotEnvironments []string, pipelineCreate *store.PipelineMessage, targetEnvironmentID *string) (*store.PipelineMessage, error) {
+ if targetEnvironmentID == nil {
return pipelineCreate, nil
}
- if *targetStageID == "" {
+ if *targetEnvironmentID == "" {
pipelineCreate.Stages = nil
return pipelineCreate, nil
}
- if snapshot == nil {
- deploymentConfigMessage, err := s.GetDeploymentConfigV2(ctx, project.ResourceID)
+ if len(snapshotEnvironments) == 0 {
+ environments, err := s.ListEnvironmentV2(ctx, &store.FindEnvironmentMessage{})
if err != nil {
- return nil, errors.Wrapf(err, "failed to get deployment config")
+ return nil, errors.Wrapf(err, "failed to list environments")
+ }
+ for _, e := range environments {
+ snapshotEnvironments = append(snapshotEnvironments, e.ResourceID)
}
- snapshot = deploymentConfigMessage.Config
}
- // Consider:
- // deploymentStages: ["1", "2", "3", "4"]
- // pipelineCreate.stageId: ["2", "4"]
- // We iterate through deploymentStages and use i to indicate the current stage.
- // We push the stage to stageCreates if stageId == deploymentStageId.
- // On deploymentStageId == targetStageID, we break the loop.
-
foundID := false
var stageCreates []*store.StageMessage
i := 0
- for _, deploymentStage := range snapshot.GetSchedule().Deployments {
- id := deploymentStage.Id
- if i < len(pipelineCreate.Stages) && pipelineCreate.Stages[i].DeploymentID == id {
+ for _, environmentID := range snapshotEnvironments {
+ if i < len(pipelineCreate.Stages) && pipelineCreate.Stages[i].Environment == environmentID {
stageCreates = append(stageCreates, pipelineCreate.Stages[i])
i++
}
- if id == *targetStageID {
+ if environmentID == *targetEnvironmentID {
foundID = true
break
}
}
if !foundID {
- return nil, errors.Errorf("stageId %q not found in deployment schedules", *targetStageID)
+ return nil, errors.Errorf("environment %q not found", *targetEnvironmentID)
}
pipelineCreate.Stages = stageCreates
return pipelineCreate, nil
diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.go
index 1100c59693..cd2046b8ad 100644
--- a/backend/api/v1/rollout_service_task.go
+++ b/backend/api/v1/rollout_service_task.go
@@ -114,7 +114,7 @@ func transformDatabaseGroupTargetToSpecs(ctx context.Context, s *store.Store, sp
return specs, nil
}
-func getTaskCreatesFromSpec(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, spec *storepb.PlanConfig_Spec, project *store.ProjectMessage, registerEnvironmentID func(string) error) ([]*store.TaskMessage, error) {
+func getTaskCreatesFromSpec(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, spec *storepb.PlanConfig_Spec, project *store.ProjectMessage) ([]*store.TaskMessage, error) {
if licenseService.IsFeatureEnabled(api.FeatureTaskScheduleTime) != nil {
if spec.EarliestAllowedTime != nil && !spec.EarliestAllowedTime.AsTime().IsZero() {
return nil, errors.New(api.FeatureTaskScheduleTime.AccessErrorMessage())
@@ -123,17 +123,17 @@ func getTaskCreatesFromSpec(ctx context.Context, s *store.Store, sheetManager *s
switch config := spec.Config.(type) {
case *storepb.PlanConfig_Spec_CreateDatabaseConfig:
- return getTaskCreatesFromCreateDatabaseConfig(ctx, s, sheetManager, dbFactory, spec, config.CreateDatabaseConfig, project, registerEnvironmentID)
+ return getTaskCreatesFromCreateDatabaseConfig(ctx, s, sheetManager, dbFactory, spec, config.CreateDatabaseConfig, project)
case *storepb.PlanConfig_Spec_ChangeDatabaseConfig:
- return getTaskCreatesFromChangeDatabaseConfig(ctx, s, spec, config.ChangeDatabaseConfig, project, registerEnvironmentID)
+ return getTaskCreatesFromChangeDatabaseConfig(ctx, s, spec, config.ChangeDatabaseConfig, project)
case *storepb.PlanConfig_Spec_ExportDataConfig:
- return getTaskCreatesFromExportDataConfig(ctx, s, spec, config.ExportDataConfig, project, registerEnvironmentID)
+ return getTaskCreatesFromExportDataConfig(ctx, s, spec, config.ExportDataConfig, project)
}
return nil, errors.Errorf("invalid spec config type %T", spec.Config)
}
-func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, dbFactory *dbfactory.DBFactory, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_CreateDatabaseConfig, project *store.ProjectMessage, registerEnvironmentID func(string) error) ([]*store.TaskMessage, error) {
+func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, dbFactory *dbfactory.DBFactory, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_CreateDatabaseConfig, project *store.ProjectMessage) ([]*store.TaskMessage, error) {
if c.Database == "" {
return nil, errors.Errorf("database name is required")
}
@@ -146,22 +146,21 @@ func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store,
return nil, errors.Errorf("creating Oracle database is not supported")
}
- dbEnvironmentID := strings.TrimPrefix(c.Environment, common.EnvironmentNamePrefix)
+ dbEnvironmentID := ""
+ if c.Environment != "" {
+ dbEnvironmentID = strings.TrimPrefix(c.Environment, common.EnvironmentNamePrefix)
+ }
// Fallback to instance.EnvironmentID if user-set environment is not present.
- environmentID := instance.EnvironmentID
+ effectiveEnvironmentID := instance.EnvironmentID
if dbEnvironmentID != "" {
- environmentID = dbEnvironmentID
+ effectiveEnvironmentID = dbEnvironmentID
}
-
- environment, err := s.GetEnvironmentV2(ctx, &store.FindEnvironmentMessage{ResourceID: &environmentID})
+ environment, err := s.GetEnvironmentV2(ctx, &store.FindEnvironmentMessage{ResourceID: &effectiveEnvironmentID})
if err != nil {
return nil, err
}
if environment == nil {
- return nil, errors.Errorf("environment ID not found %v", environmentID)
- }
- if err := registerEnvironmentID(environmentID); err != nil {
- return nil, err
+ return nil, errors.Errorf("environment ID not found %v", effectiveEnvironmentID)
}
if instance.Metadata.GetEngine() == storepb.Engine_MONGODB && c.Table == "" {
@@ -247,11 +246,12 @@ func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store,
}
v := &store.TaskMessage{
- InstanceID: instance.ResourceID,
- DatabaseName: nil,
- Name: fmt.Sprintf("Create database %v", payload.DatabaseName),
- Type: api.TaskDatabaseCreate,
- Payload: string(bytes),
+ Name: fmt.Sprintf("Create database %v", payload.DatabaseName),
+ InstanceID: instance.ResourceID,
+ DatabaseName: &databaseName,
+ EnvironmentID: effectiveEnvironmentID,
+ Type: api.TaskDatabaseCreate,
+ Payload: string(bytes),
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -268,12 +268,12 @@ func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store,
return taskCreates, nil
}
-func getTaskCreatesFromChangeDatabaseConfig(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, project *store.ProjectMessage, registerEnvironmentID func(string) error) ([]*store.TaskMessage, error) {
+func getTaskCreatesFromChangeDatabaseConfig(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, project *store.ProjectMessage) ([]*store.TaskMessage, error) {
// possible target:
// 1. instances/{instance}/databases/{database}
// 2. projects/{project}/databaseGroups/{databaseGroup}
if _, _, err := common.GetInstanceDatabaseID(c.Target); err == nil {
- return getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx, s, spec, c, project, registerEnvironmentID)
+ return getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx, s, spec, c, project)
}
if _, _, err := common.GetProjectIDDatabaseGroupID(c.Target); err == nil {
return nil, errors.Errorf("unexpected database group target %q", c.Target)
@@ -282,7 +282,7 @@ func getTaskCreatesFromChangeDatabaseConfig(ctx context.Context, s *store.Store,
return nil, errors.Errorf("unknown target %q", c.Target)
}
-func getTaskCreatesFromExportDataConfig(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ExportDataConfig, _ *store.ProjectMessage, registerEnvironmentID func(string) error) ([]*store.TaskMessage, error) {
+func getTaskCreatesFromExportDataConfig(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ExportDataConfig, _ *store.ProjectMessage) ([]*store.TaskMessage, error) {
instanceID, databaseName, err := common.GetInstanceDatabaseID(c.Target)
if err != nil {
return nil, errors.Wrapf(err, "failed to get instance and database from target %q", c.Target)
@@ -309,10 +309,6 @@ func getTaskCreatesFromExportDataConfig(ctx context.Context, s *store.Store, spe
return nil, errors.Errorf("database %q not found", databaseName)
}
- if err := registerEnvironmentID(database.EffectiveEnvironmentID); err != nil {
- return nil, err
- }
-
_, sheetUID, err := common.GetProjectResourceIDSheetUID(c.Sheet)
if err != nil {
return nil, errors.Wrapf(err, "failed to get sheet id from sheet %q", c.Sheet)
@@ -331,11 +327,12 @@ func getTaskCreatesFromExportDataConfig(ctx context.Context, s *store.Store, spe
}
payloadString := string(bytes)
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("Export data from database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseDataExport,
- Payload: payloadString,
+ Name: fmt.Sprintf("Export data from database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseDataExport,
+ Payload: payloadString,
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -344,7 +341,7 @@ func getTaskCreatesFromExportDataConfig(ctx context.Context, s *store.Store, spe
return []*store.TaskMessage{taskCreate}, nil
}
-func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, _ *store.ProjectMessage, registerEnvironmentID func(string) error) ([]*store.TaskMessage, error) {
+func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, _ *store.ProjectMessage) ([]*store.TaskMessage, error) {
instanceID, databaseName, err := common.GetInstanceDatabaseID(c.Target)
if err != nil {
return nil, errors.Wrapf(err, "failed to get instance and database from target %q", c.Target)
@@ -371,10 +368,6 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
return nil, errors.Errorf("database %q not found", databaseName)
}
- if err := registerEnvironmentID(database.EffectiveEnvironmentID); err != nil {
- return nil, err
- }
-
switch c.Type {
case storepb.PlanConfig_ChangeDatabaseConfig_BASELINE:
payload := &storepb.TaskDatabaseUpdatePayload{
@@ -390,11 +383,12 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
}
payloadString := string(bytes)
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("Establish baseline for database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseSchemaBaseline,
- Payload: payloadString,
+ Name: fmt.Sprintf("Establish baseline for database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseSchemaBaseline,
+ Payload: payloadString,
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -421,11 +415,12 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
}
payloadString := string(bytes)
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("DDL(schema) for database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseSchemaUpdate,
- Payload: payloadString,
+ Name: fmt.Sprintf("DDL(schema) for database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseSchemaUpdate,
+ Payload: payloadString,
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -452,11 +447,12 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
}
payloadString := string(bytes)
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("SDL for database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseSchemaUpdateSDL,
- Payload: payloadString,
+ Name: fmt.Sprintf("SDL for database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseSchemaUpdateSDL,
+ Payload: payloadString,
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -486,11 +482,12 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
return nil, errors.Wrapf(err, "failed to marshal database schema update ghost payload")
}
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("DDL(gh-ost) for database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseSchemaUpdateGhost,
- Payload: string(bytes),
+ Name: fmt.Sprintf("DDL(gh-ost) for database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseSchemaUpdateGhost,
+ Payload: string(bytes),
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
@@ -522,11 +519,12 @@ func getTaskCreatesFromChangeDatabaseConfigDatabaseTarget(ctx context.Context, s
}
payloadString := string(bytes)
taskCreate := &store.TaskMessage{
- Name: fmt.Sprintf("DML(data) for database %q", database.DatabaseName),
- InstanceID: database.InstanceID,
- DatabaseName: &database.DatabaseName,
- Type: api.TaskDatabaseDataUpdate,
- Payload: payloadString,
+ Name: fmt.Sprintf("DML(data) for database %q", database.DatabaseName),
+ InstanceID: database.InstanceID,
+ DatabaseName: &database.DatabaseName,
+ EnvironmentID: database.EffectiveEnvironmentID,
+ Type: api.TaskDatabaseDataUpdate,
+ Payload: payloadString,
}
if spec.EarliestAllowedTime.GetSeconds() > 0 {
t := spec.EarliestAllowedTime.AsTime()
diff --git a/backend/store/deploy.go b/backend/store/deploy.go
deleted file mode 100644
index 3ba2b945fd..0000000000
--- a/backend/store/deploy.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package store
-
-import (
- "context"
-
- storepb "github.com/bytebase/bytebase/proto/generated-go/store"
-)
-
-// DeploymentConfigMessage is the message for deployment config.
-type DeploymentConfigMessage struct {
- Name string
- Config *storepb.DeploymentConfig
-}
-
-// GetDeploymentConfigV2 returns the deployment config.
-func (s *Store) GetDeploymentConfigV2(ctx context.Context, _ string) (*DeploymentConfigMessage, error) {
- return s.getDefaultDeploymentConfigV2(ctx)
-}
-
-func (s *Store) getDefaultDeploymentConfigV2(ctx context.Context) (*DeploymentConfigMessage, error) {
- environmentList, err := s.ListEnvironmentV2(ctx, &FindEnvironmentMessage{})
- if err != nil {
- return nil, err
- }
- var deployments []*storepb.ScheduleDeployment
- for _, environment := range environmentList {
- deployments = append(deployments, &storepb.ScheduleDeployment{
- Title: environment.ResourceID,
- // Use environment resource id rather than uuid to ensure consistent Id for the default deployment config.
- Id: environment.ResourceID,
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {Key: "environment", Operator: storepb.LabelSelectorRequirement_IN, Values: []string{environment.ResourceID}},
- },
- },
- },
- })
- }
- return &DeploymentConfigMessage{
- Config: &storepb.DeploymentConfig{
- Schedule: &storepb.Schedule{
- Deployments: deployments,
- },
- },
- }, nil
-}
diff --git a/backend/store/task.go b/backend/store/task.go
index cff1d31d95..9a9a6955ac 100644
--- a/backend/store/task.go
+++ b/backend/store/task.go
@@ -25,6 +25,7 @@ type TaskMessage struct {
PipelineID int
StageID int
InstanceID string
+ EnvironmentID string // This is the stage.
DatabaseName *string
TaskRunRawList []*TaskRunMessage
diff --git a/backend/utils/utils.go b/backend/utils/utils.go
index 445ada116e..c7105f49d7 100644
--- a/backend/utils/utils.go
+++ b/backend/utils/utils.go
@@ -8,7 +8,6 @@ import (
"io"
"reflect"
"regexp"
- "sort"
"strconv"
"strings"
"unicode"
@@ -40,145 +39,6 @@ func DataSourceFromInstanceWithType(instance *store.InstanceMessage, dataSourceT
return nil
}
-// isMatchExpression checks whether a databases matches the query.
-// labels is a mapping from database label key to value.
-func isMatchExpression(labels map[string]string, expression *storepb.LabelSelectorRequirement) bool {
- switch expression.Operator {
- case storepb.LabelSelectorRequirement_IN:
- return checkLabelIn(labels, expression)
- case storepb.LabelSelectorRequirement_NOT_IN:
- return !checkLabelIn(labels, expression)
- case storepb.LabelSelectorRequirement_EXISTS:
- _, ok := labels[expression.Key]
- return ok
- default:
- return false
- }
-}
-
-func checkLabelIn(labels map[string]string, expression *storepb.LabelSelectorRequirement) bool {
- value, ok := labels[expression.Key]
- if !ok {
- return false
- }
-
- for _, exprValue := range expression.Values {
- if exprValue == value {
- return true
- }
- }
- return false
-}
-
-func isMatchExpressions(labels map[string]string, expressionList []*storepb.LabelSelectorRequirement) bool {
- // Empty expression list matches no databases.
- if len(expressionList) == 0 {
- return false
- }
- // Expressions are ANDed.
- for _, expression := range expressionList {
- if !isMatchExpression(labels, expression) {
- return false
- }
- }
- return true
-}
-
-// ValidateAndGetDeploymentSchedule validates and returns the deployment schedule.
-// Note: this validation only checks whether the payloads is a valid json, however, invalid field name errors are ignored.
-func ValidateDeploymentSchedule(schedule *storepb.Schedule) error {
- for _, d := range schedule.Deployments {
- if d.Title == "" {
- return common.Errorf(common.Invalid, "Deployment title must not be empty")
- }
- hasEnv := false
- for _, e := range d.Spec.Selector.MatchExpressions {
- switch e.Operator {
- case storepb.LabelSelectorRequirement_IN, storepb.LabelSelectorRequirement_NOT_IN:
- if len(e.Values) == 0 {
- return common.Errorf(common.Invalid, "expression key %q with %q operator should have at least one value", e.Key, e.Operator)
- }
- case storepb.LabelSelectorRequirement_EXISTS:
- if len(e.Values) > 0 {
- return common.Errorf(common.Invalid, "expression key %q with %q operator shouldn't have values", e.Key, e.Operator)
- }
- default:
- return common.Errorf(common.Invalid, "expression key %q has invalid operator %q", e.Key, e.Operator)
- }
- if e.Key == api.EnvironmentLabelKey {
- hasEnv = true
- if e.Operator != storepb.LabelSelectorRequirement_IN || len(e.Values) != 1 {
- return common.Errorf(common.Invalid, "label %q should must use operator %q with exactly one value", api.EnvironmentLabelKey, storepb.LabelSelectorRequirement_IN)
- }
- }
- }
- if !hasEnv {
- return common.Errorf(common.Invalid, "deployment should contain %q label", api.EnvironmentLabelKey)
- }
- }
- return nil
-}
-
-// GetDatabaseMatrixFromDeploymentSchedule gets a pipeline based on deployment schedule.
-// The matrix will include the stage even if the stage has no database.
-func GetDatabaseMatrixFromDeploymentSchedule(schedule *storepb.Schedule, databaseList []*store.DatabaseMessage) ([][]*store.DatabaseMessage, error) {
- var matrix [][]*store.DatabaseMessage
-
- // idToLabels maps database -> label key -> label value
- idToLabels := make(map[string]map[string]string)
- databaseMap := make(map[string]*store.DatabaseMessage)
- for _, database := range databaseList {
- databaseMap[database.String()] = database
- newMap := make(map[string]string)
- for k, v := range database.Metadata.Labels {
- newMap[k] = v
- }
- newMap[api.EnvironmentLabelKey] = database.EffectiveEnvironmentID
-
- idToLabels[database.String()] = newMap
- }
-
- // idsSeen records database which is already in a stage.
- idsSeen := make(map[string]bool)
-
- // For each stage, we loop over all databases to see if it is a match.
- for _, deployment := range schedule.Deployments {
- // For each stage, we will get a list of matched databases.
- var matchedDatabaseList []string
- // Loop over databaseList instead of idToLabels to get determinant results.
- for _, database := range databaseList {
- // Skip if the database is already in a stage.
- if _, ok := idsSeen[database.String()]; ok {
- continue
- }
- // Skip if the database is not found.
- if database.Deleted {
- continue
- }
-
- if isMatchExpressions(idToLabels[database.String()], deployment.Spec.Selector.MatchExpressions) {
- matchedDatabaseList = append(matchedDatabaseList, database.String())
- idsSeen[database.String()] = true
- }
- }
-
- var databaseList []*store.DatabaseMessage
- for _, id := range matchedDatabaseList {
- databaseList = append(databaseList, databaseMap[id])
- }
- // sort databases in stage based on database name.
- if len(databaseList) > 0 {
- sort.Slice(databaseList, func(i, j int) bool {
- return databaseList[i].String() < databaseList[j].String()
- })
- }
-
- matrix = append(matrix, databaseList)
- }
-
- return matrix, nil
-}
-
// GetTaskSheetID gets the sheetID of a task.
func GetTaskSheetID(taskPayload string) (int, error) {
var taskSheetID struct {
diff --git a/backend/utils/utils_test.go b/backend/utils/utils_test.go
index c8dafa06e9..fe568b233e 100644
--- a/backend/utils/utils_test.go
+++ b/backend/utils/utils_test.go
@@ -10,271 +10,6 @@ import (
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
)
-func TestGetDatabaseMatrixFromDeploymentSchedule(t *testing.T) {
- dbs := []*store.DatabaseMessage{
- {
- InstanceID: "instance1",
- DatabaseName: "hello",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "us-central1",
- "tenant": "bytebase",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance2",
- DatabaseName: "hello",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "earth",
- "tenant": "bytebase",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance3",
- DatabaseName: "hello",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "europe-west1",
- "tenant": "bytebase",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance4",
- DatabaseName: "hello",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "earth",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance5",
- DatabaseName: "world",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "earth",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance6",
- DatabaseName: "db1_us",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "us",
- "environment": "dev",
- },
- },
- },
- {
- InstanceID: "instance7",
- DatabaseName: "db1_eu",
- Metadata: &storepb.DatabaseMetadata{
- Labels: map[string]string{
- "location": "eu",
- "environment": "dev",
- },
- },
- },
- }
-
- tests := []struct {
- name string
- schedule *storepb.Schedule
- databaseList []*store.DatabaseMessage
- want [][]*store.DatabaseMessage
- // Notice relevant position is preserved from databaseList to want.
- // e.g. in simpleDeployments the result is [db[0], db[1]] instead of [db[1], db[0]] in the first stage.
- }{
- {
- "Tenant databases matching the query in a stage should exclude all databases from previous stages.",
- &storepb.Schedule{
- Deployments: []*storepb.ScheduleDeployment{
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"us-central1", "europe-west1"},
- },
- },
- },
- },
- },
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_EXISTS,
- Values: nil,
- },
- },
- },
- },
- },
- },
- },
- []*store.DatabaseMessage{
- dbs[0], dbs[1],
- },
- [][]*store.DatabaseMessage{
- {dbs[0]},
- {dbs[1]},
- },
- },
- {
- "simpleDeployments",
- &storepb.Schedule{
- Deployments: []*storepb.ScheduleDeployment{
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"us-central1", "europe-west1"},
- },
- },
- },
- },
- },
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"earth"},
- },
- },
- },
- },
- },
- },
- },
- []*store.DatabaseMessage{
- dbs[0], dbs[1], dbs[2],
- },
- [][]*store.DatabaseMessage{
- {dbs[0], dbs[2]},
- {dbs[1]},
- },
- },
- {
- "twoDifferentKeys",
- &storepb.Schedule{
- Deployments: []*storepb.ScheduleDeployment{
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "tenant",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"bytebase"},
- },
- },
- },
- },
- },
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"us-central1", "europe-west1"},
- },
- },
- },
- },
- },
- },
- },
- []*store.DatabaseMessage{
- dbs[0], dbs[2], dbs[3],
- },
- [][]*store.DatabaseMessage{
- {dbs[0], dbs[2]},
- nil,
- },
- },
- {
- "differentDatabaseNames",
- &storepb.Schedule{
- Deployments: []*storepb.ScheduleDeployment{
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"earth"},
- },
- },
- },
- },
- },
- },
- },
- []*store.DatabaseMessage{
- dbs[3], dbs[4],
- },
- [][]*store.DatabaseMessage{
- {dbs[3], dbs[4]},
- },
- },
- {
- "useDatabaseNameTemplate",
- &storepb.Schedule{
- Deployments: []*storepb.ScheduleDeployment{
- {
- Spec: &storepb.DeploymentSpec{
- Selector: &storepb.LabelSelector{
- MatchExpressions: []*storepb.LabelSelectorRequirement{
- {
- Key: "location",
- Operator: storepb.LabelSelectorRequirement_IN,
- Values: []string{"us", "eu"},
- },
- },
- },
- },
- },
- },
- },
- []*store.DatabaseMessage{
- dbs[5], dbs[6],
- },
- [][]*store.DatabaseMessage{
- {dbs[5], dbs[6]},
- },
- },
- }
-
- for _, test := range tests {
- matrix, _ := GetDatabaseMatrixFromDeploymentSchedule(test.schedule, test.databaseList)
- assert.Equal(t, matrix, test.want, test.name)
- }
-}
-
func TestGetRenderedStatement(t *testing.T) {
testCases := []struct {
material map[string]string
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index ae3f877dc7..2fdf22f5e2 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -36,7 +36,7 @@ export enum Edition {
EDITION_2024 = "EDITION_2024",
/**
* EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
- * used or relyed on outside of tests.
+ * used or relied on outside of tests.
*/
EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",
EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",
@@ -1093,12 +1093,13 @@ export interface MessageOptions {
export interface FieldOptions {
/**
+ * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
* The ctype option instructs the C++ code generator to use a different
* representation of the field than it normally would. See the specific
* options below. This option is only implemented to support use of
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
- * type "bytes" in the open source release -- sorry, we'll try to include
- * other types in a future version!
+ * type "bytes" in the open source release.
+ * TODO: make ctype actually deprecated.
*/
ctype?:
| FieldOptions_CType
@@ -1314,11 +1315,7 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number
}
}
-/**
- * If set to RETENTION_SOURCE, the option will be omitted from the binary.
- * Note: as of January 2023, support for this is in progress and does not yet
- * have an effect (b/264593489).
- */
+/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */
export enum FieldOptions_OptionRetention {
RETENTION_UNKNOWN = "RETENTION_UNKNOWN",
RETENTION_RUNTIME = "RETENTION_RUNTIME",
@@ -1375,8 +1372,7 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option
/**
* This indicates the types of entities that the field may apply to when used
* as an option. If it is unset, then the field may be freely used as an
- * option on any kind of entity. Note: as of January 2023, support for this is
- * in progress and does not yet have an effect (b/264593489).
+ * option on any kind of entity.
*/
export enum FieldOptions_OptionTargetType {
TARGET_TYPE_UNKNOWN = "TARGET_TYPE_UNKNOWN",
diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.ts
index 448388d9b6..d221c58139 100644
--- a/frontend/src/types/proto/store/plan.ts
+++ b/frontend/src/types/proto/store/plan.ts
@@ -9,7 +9,6 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import Long from "long";
import { Timestamp } from "../google/protobuf/timestamp";
import { ExportFormat, exportFormatFromJSON, exportFormatToJSON, exportFormatToNumber } from "./common";
-import { DeploymentConfig } from "./deployment_config";
import { PreUpdateBackupDetail } from "./plan_check_run";
export const protobufPackage = "bytebase.store";
@@ -224,17 +223,10 @@ export interface PlanConfig_SpecReleaseSource {
}
export interface PlanConfig_DeploymentSnapshot {
- deploymentConfigSnapshot: PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot | undefined;
+ environments: string[];
databaseGroupSnapshots: PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot[];
}
-/** The snapshot of the project deployment config at the time of creation. */
-export interface PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- name: string;
- title: string;
- deploymentConfig: DeploymentConfig | undefined;
-}
-
/** The snapshot of the database group at the time of creation. */
export interface PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
/** Format: projects/{project}/databaseGroups/{databaseGroup}. */
@@ -1269,16 +1261,13 @@ export const PlanConfig_SpecReleaseSource: MessageFns<PlanConfig_SpecReleaseSour
};
function createBasePlanConfig_DeploymentSnapshot(): PlanConfig_DeploymentSnapshot {
- return { deploymentConfigSnapshot: undefined, databaseGroupSnapshots: [] };
+ return { environments: [], databaseGroupSnapshots: [] };
}
export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnapshot> = {
encode(message: PlanConfig_DeploymentSnapshot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.deploymentConfigSnapshot !== undefined) {
- PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.encode(
- message.deploymentConfigSnapshot,
- writer.uint32(10).fork(),
- ).join();
+ for (const v of message.environments) {
+ writer.uint32(10).string(v!);
}
for (const v of message.databaseGroupSnapshots) {
PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.encode(v!, writer.uint32(18).fork()).join();
@@ -1298,10 +1287,7 @@ export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnap
break;
}
- message.deploymentConfigSnapshot = PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.decode(
- reader,
- reader.uint32(),
- );
+ message.environments.push(reader.string());
continue;
}
case 2: {
@@ -1325,9 +1311,9 @@ export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnap
fromJSON(object: any): PlanConfig_DeploymentSnapshot {
return {
- deploymentConfigSnapshot: isSet(object.deploymentConfigSnapshot)
- ? PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.fromJSON(object.deploymentConfigSnapshot)
- : undefined,
+ environments: globalThis.Array.isArray(object?.environments)
+ ? object.environments.map((e: any) => globalThis.String(e))
+ : [],
databaseGroupSnapshots: globalThis.Array.isArray(object?.databaseGroupSnapshots)
? object.databaseGroupSnapshots.map((e: any) => PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.fromJSON(e))
: [],
@@ -1336,10 +1322,8 @@ export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnap
toJSON(message: PlanConfig_DeploymentSnapshot): unknown {
const obj: any = {};
- if (message.deploymentConfigSnapshot !== undefined) {
- obj.deploymentConfigSnapshot = PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.toJSON(
- message.deploymentConfigSnapshot,
- );
+ if (message.environments?.length) {
+ obj.environments = message.environments;
}
if (message.databaseGroupSnapshots?.length) {
obj.databaseGroupSnapshots = message.databaseGroupSnapshots.map((e) =>
@@ -1354,10 +1338,7 @@ export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnap
},
fromPartial(object: DeepPartial<PlanConfig_DeploymentSnapshot>): PlanConfig_DeploymentSnapshot {
const message = createBasePlanConfig_DeploymentSnapshot();
- message.deploymentConfigSnapshot =
- (object.deploymentConfigSnapshot !== undefined && object.deploymentConfigSnapshot !== null)
- ? PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.fromPartial(object.deploymentConfigSnapshot)
- : undefined;
+ message.environments = object.environments?.map((e) => e) || [];
message.databaseGroupSnapshots =
object.databaseGroupSnapshots?.map((e) => PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.fromPartial(e)) ||
[];
@@ -1365,109 +1346,6 @@ export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnap
},
};
-function createBasePlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot(): PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- return { name: "", title: "", deploymentConfig: undefined };
-}
-
-export const PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot: MessageFns<
- PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot
-> = {
- encode(
- message: PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot,
- writer: BinaryWriter = new BinaryWriter(),
- ): BinaryWriter {
- if (message.name !== "") {
- writer.uint32(10).string(message.name);
- }
- if (message.title !== "") {
- writer.uint32(18).string(message.title);
- }
- if (message.deploymentConfig !== undefined) {
- DeploymentConfig.encode(message.deploymentConfig, writer.uint32(26).fork()).join();
- }
- return writer;
- },
-
- decode(input: BinaryReader | Uint8Array, length?: number): PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBasePlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1: {
- if (tag !== 10) {
- break;
- }
-
- message.name = reader.string();
- continue;
- }
- case 2: {
- if (tag !== 18) {
- break;
- }
-
- message.title = reader.string();
- continue;
- }
- case 3: {
- if (tag !== 26) {
- break;
- }
-
- message.deploymentConfig = DeploymentConfig.decode(reader, reader.uint32());
- continue;
- }
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skip(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- return {
- name: isSet(object.name) ? globalThis.String(object.name) : "",
- title: isSet(object.title) ? globalThis.String(object.title) : "",
- deploymentConfig: isSet(object.deploymentConfig) ? DeploymentConfig.fromJSON(object.deploymentConfig) : undefined,
- };
- },
-
- toJSON(message: PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot): unknown {
- const obj: any = {};
- if (message.name !== "") {
- obj.name = message.name;
- }
- if (message.title !== "") {
- obj.title = message.title;
- }
- if (message.deploymentConfig !== undefined) {
- obj.deploymentConfig = DeploymentConfig.toJSON(message.deploymentConfig);
- }
- return obj;
- },
-
- create(
- base?: DeepPartial<PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot>,
- ): PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- return PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.fromPartial(base ?? {});
- },
- fromPartial(
- object: DeepPartial<PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot>,
- ): PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
- const message = createBasePlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot();
- message.name = object.name ?? "";
- message.title = object.title ?? "";
- message.deploymentConfig = (object.deploymentConfig !== undefined && object.deploymentConfig !== null)
- ? DeploymentConfig.fromPartial(object.deploymentConfig)
- : undefined;
- return message;
- },
-};
-
function createBasePlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot(): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
return { databaseGroup: "", databases: [] };
}
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 94fb1cdc59..9a0355dfa8 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -202,7 +202,6 @@
- [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)
- [PlanConfig.DeploymentSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot)
- [PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DatabaseGroupSnapshot)
- - [PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DeploymentConfigSnapshot)
- [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)
- [PlanConfig.ReleaseSource](#bytebase-store-PlanConfig-ReleaseSource)
- [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)
@@ -3297,7 +3296,7 @@ InstanceRole is the API message for instance role.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| deployment_config_snapshot | [PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DeploymentConfigSnapshot) | | |
+| environments | [string](#string) | repeated | |
| database_group_snapshots | [PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DatabaseGroupSnapshot) | repeated | |
@@ -3321,23 +3320,6 @@ The snapshot of the database group at the time of creation.
-<a name="bytebase-store-PlanConfig-DeploymentSnapshot-DeploymentConfigSnapshot"></a>
-
-### PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot
-The snapshot of the project deployment config at the time of creation.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | |
-| title | [string](#string) | | |
-| deployment_config | [DeploymentConfig](#bytebase-store-DeploymentConfig) | | |
-
-
-
-
-
-
<a name="bytebase-store-PlanConfig-ExportDataConfig"></a>
### PlanConfig.ExportDataConfig
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index e4721708db..9b771e4480 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -986,10 +986,6 @@
<a href="#bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot"><span class="badge">M</span>PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot</a>
</li>
- <li>
- <a href="#bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot"><span class="badge">M</span>PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot</a>
- </li>
-
<li>
<a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a>
</li>
@@ -8931,9 +8927,9 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
<tbody>
<tr>
- <td>deployment_config_snapshot</td>
- <td><a href="#bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot">PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot</a></td>
- <td></td>
+ <td>environments</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
<td><p> </p></td>
</tr>
@@ -8982,44 +8978,6 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
- <h3 id="bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot">PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot</h3>
- <p>The snapshot of the project deployment config at the time of creation.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>title</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>deployment_config</td>
- <td><a href="#bytebase.store.DeploymentConfig">DeploymentConfig</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
<h3 id="bytebase.store.PlanConfig.ExportDataConfig">PlanConfig.ExportDataConfig</h3>
<p></p>
diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.go
index 313458881f..b773d9e2f3 100644
--- a/proto/generated-go/store/plan.pb.go
+++ b/proto/generated-go/store/plan.pb.go
@@ -707,11 +707,11 @@ func (x *PlanConfig_SpecReleaseSource) GetFile() string {
}
type PlanConfig_DeploymentSnapshot struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- DeploymentConfigSnapshot *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot `protobuf:"bytes,1,opt,name=deployment_config_snapshot,json=deploymentConfigSnapshot,proto3" json:"deployment_config_snapshot,omitempty"`
- DatabaseGroupSnapshots []*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot `protobuf:"bytes,2,rep,name=database_group_snapshots,json=databaseGroupSnapshots,proto3" json:"database_group_snapshots,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Environments []string `protobuf:"bytes,1,rep,name=environments,proto3" json:"environments,omitempty"`
+ DatabaseGroupSnapshots []*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot `protobuf:"bytes,2,rep,name=database_group_snapshots,json=databaseGroupSnapshots,proto3" json:"database_group_snapshots,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PlanConfig_DeploymentSnapshot) Reset() {
@@ -744,9 +744,9 @@ func (*PlanConfig_DeploymentSnapshot) Descriptor() ([]byte, []int) {
return file_store_plan_proto_rawDescGZIP(), []int{0, 7}
}
-func (x *PlanConfig_DeploymentSnapshot) GetDeploymentConfigSnapshot() *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot {
+func (x *PlanConfig_DeploymentSnapshot) GetEnvironments() []string {
if x != nil {
- return x.DeploymentConfigSnapshot
+ return x.Environments
}
return nil
}
@@ -758,67 +758,6 @@ func (x *PlanConfig_DeploymentSnapshot) GetDatabaseGroupSnapshots() []*PlanConfi
return nil
}
-// The snapshot of the project deployment config at the time of creation.
-type PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- DeploymentConfig *DeploymentConfig `protobuf:"bytes,3,opt,name=deployment_config,json=deploymentConfig,proto3" json:"deployment_config,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
-}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) Reset() {
- *x = PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot{}
- mi := &file_store_plan_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
-}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) ProtoMessage() {}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[10]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot.ProtoReflect.Descriptor instead.
-func (*PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 7, 0}
-}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) GetTitle() string {
- if x != nil {
- return x.Title
- }
- return ""
-}
-
-func (x *PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot) GetDeploymentConfig() *DeploymentConfig {
- if x != nil {
- return x.DeploymentConfig
- }
- return nil
-}
-
// The snapshot of the database group at the time of creation.
type PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -832,7 +771,7 @@ type PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot struct {
func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) Reset() {
*x = PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot{}
- mi := &file_store_plan_proto_msgTypes[11]
+ mi := &file_store_plan_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -844,7 +783,7 @@ func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) String() string {
func (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) ProtoMessage() {}
func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) ProtoReflect() protoreflect.Message {
- mi := &file_store_plan_proto_msgTypes[11]
+ mi := &file_store_plan_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -857,7 +796,7 @@ func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) ProtoReflect() pro
// Deprecated: Use PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.ProtoReflect.Descriptor instead.
func (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) Descriptor() ([]byte, []int) {
- return file_store_plan_proto_rawDescGZIP(), []int{0, 7, 1}
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 7, 0}
}
func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) GetDatabaseGroup() string {
@@ -886,173 +825,155 @@ var file_store_plan_proto_rawDesc = string([]byte{
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f,
- 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x5f, 0x63,
- 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84,
- 0x14, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a,
- 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c,
- 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73,
- 0x74, 0x65, 0x70, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c,
- 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d,
- 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44,
- 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
- 0x74, 0x52, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61,
- 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x53, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x14, 0x0a,
- 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69,
- 0x74, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
- 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53,
- 0x70, 0x65, 0x63, 0x52, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a, 0xfd, 0x03, 0x0a, 0x04, 0x53,
- 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f,
- 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x13,
- 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x54,
- 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x02, 0x69, 0x64, 0x12, 0x5c, 0x0a, 0x13, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x72, 0x65, 0x6c, 0x65,
- 0x61, 0x73, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x70, 0x65,
- 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x11,
- 0x73, 0x70, 0x65, 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x12, 0x67, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61,
- 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61,
- 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, 0x63, 0x68,
- 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74,
- 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x63,
- 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x61,
- 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x2b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
- 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x70, 0x6f,
- 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x10,
- 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc3, 0x02, 0x0a, 0x14, 0x43,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x5f,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x8b, 0x12, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35,
+ 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+ 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05,
+ 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
+ 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,
+ 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73,
+ 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79,
+ 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68,
+ 0x6f, 0x74, 0x52, 0x12, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e,
+ 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x53, 0x0a, 0x04, 0x53, 0x74, 0x65, 0x70, 0x12, 0x14,
+ 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x53, 0x70, 0x65, 0x63, 0x52, 0x05, 0x73, 0x70, 0x65, 0x63, 0x73, 0x1a, 0xfd, 0x03, 0x0a, 0x04,
+ 0x53, 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74,
+ 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64,
+ 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x5c, 0x0a, 0x13, 0x73, 0x70, 0x65, 0x63, 0x5f, 0x72, 0x65, 0x6c,
+ 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
+ 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x70,
+ 0x65, 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
+ 0x11, 0x73, 0x70, 0x65, 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x12, 0x67, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
- 0x74, 0x12, 0x20, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12,
- 0x29, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74,
- 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0c, 0x63, 0x68,
- 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x09, 0x63, 0x6f,
- 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e,
- 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42,
- 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a,
- 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x01, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x06, 0x62, 0x61,
- 0x63, 0x6b, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01,
- 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x26, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69,
- 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74,
- 0x1a, 0xcb, 0x04, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
- 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,
- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70,
- 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d,
- 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0b, 0x67, 0x68, 0x6f, 0x73,
- 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e,
+ 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,
+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x67, 0x0a, 0x16, 0x63,
+ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61,
+ 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x14,
+ 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5b, 0x0a, 0x12, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x64,
+ 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x70,
+ 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52,
+ 0x10, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc3, 0x02, 0x0a, 0x14,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65,
+ 0x12, 0x29, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65,
+ 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0c, 0x63,
+ 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x09, 0x63,
+ 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04,
+ 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x1e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12,
+ 0x1a, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04,
+ 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x06, 0x62,
+ 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,
+ 0x01, 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x26, 0x0a, 0x0b, 0x65, 0x6e, 0x76,
+ 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04,
+ 0xe2, 0x41, 0x01, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e,
+ 0x74, 0x1a, 0xcb, 0x04, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
+ 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67,
+ 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
+ 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x0b, 0x67, 0x68, 0x6f,
+ 0x73, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
+ 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
+ 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
+ 0x0a, 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x18, 0x70,
+ 0x72, 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70,
+ 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e,
0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50,
- 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
- 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x47,
- 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a,
- 0x67, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x63, 0x0a, 0x18, 0x70, 0x72,
- 0x65, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f,
- 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62,
- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72,
- 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74,
- 0x61, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
- 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01, 0x1a,
- 0x3d, 0x0a, 0x0f, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74,
- 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x65,
- 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
- 0x42, 0x41, 0x53, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49,
- 0x47, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x49, 0x47, 0x52, 0x41,
- 0x54, 0x45, 0x5f, 0x53, 0x44, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x49, 0x47, 0x52,
- 0x41, 0x54, 0x45, 0x5f, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x44,
- 0x41, 0x54, 0x41, 0x10, 0x06, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x75, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x61,
- 0x69, 0x6c, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x1a, 0xa4,
- 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73,
- 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x65, 0x65,
- 0x74, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f,
- 0x72, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52,
- 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,
- 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x73,
- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61, 0x73,
- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x44, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa, 0x41, 0x16, 0x0a, 0x14, 0x62, 0x79,
- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x6c, 0x65, 0x61,
- 0x73, 0x65, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x1a, 0x27, 0x0a, 0x11, 0x53,
- 0x70, 0x65, 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
- 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x8e, 0x04, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d,
- 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x84, 0x01, 0x0a, 0x1a,
- 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x46, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,
- 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70,
- 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e,
- 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x18, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79,
- 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68,
- 0x6f, 0x74, 0x12, 0x7d, 0x0a, 0x18, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67,
- 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x02,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,
- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73,
- 0x68, 0x6f, 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75,
- 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x16, 0x64, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
- 0x73, 0x1a, 0x93, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74,
- 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x12,
- 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c,
- 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
- 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
- 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x5c, 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
- 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f,
- 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61,
- 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62,
- 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61,
- 0x62, 0x61, 0x73, 0x65, 0x73, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
- 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x33,
+ 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65,
+ 0x74, 0x61, 0x69, 0x6c, 0x48, 0x00, 0x52, 0x15, 0x70, 0x72, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x88, 0x01, 0x01,
+ 0x1a, 0x3d, 0x0a, 0x0f, 0x47, 0x68, 0x6f, 0x73, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
+ 0x65, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,
+ 0x08, 0x42, 0x41, 0x53, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d,
+ 0x49, 0x47, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x49, 0x47, 0x52,
+ 0x41, 0x54, 0x45, 0x5f, 0x53, 0x44, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x49, 0x47,
+ 0x52, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04,
+ 0x44, 0x41, 0x54, 0x41, 0x10, 0x06, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x74,
+ 0x61, 0x69, 0x6c, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x1a,
+ 0xa4, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05,
+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x68, 0x65,
+ 0x65, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+ 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73,
+ 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61,
+ 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x70, 0x61,
+ 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x44, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73,
+ 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61,
+ 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa, 0x41, 0x16, 0x0a, 0x14, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x6c, 0x65,
+ 0x61, 0x73, 0x65, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x1a, 0x27, 0x0a, 0x11,
+ 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x95, 0x02, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79,
+ 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c,
+ 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+ 0x12, 0x7d, 0x0a, 0x18, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44,
+ 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
+ 0x74, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53,
+ 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x16, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
+ 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x73, 0x1a,
+ 0x5c, 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61,
+ 0x62, 0x61, 0x73, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
+ 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x42, 0x14, 0x5a,
+ 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74,
+ 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
@@ -1068,48 +989,44 @@ func file_store_plan_proto_rawDescGZIP() []byte {
}
var file_store_plan_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
+var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_store_plan_proto_goTypes = []any{
- (PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
- (*PlanConfig)(nil), // 1: bytebase.store.PlanConfig
- (*PlanConfig_Step)(nil), // 2: bytebase.store.PlanConfig.Step
- (*PlanConfig_Spec)(nil), // 3: bytebase.store.PlanConfig.Spec
- (*PlanConfig_CreateDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.CreateDatabaseConfig
- (*PlanConfig_ChangeDatabaseConfig)(nil), // 5: bytebase.store.PlanConfig.ChangeDatabaseConfig
- (*PlanConfig_ExportDataConfig)(nil), // 6: bytebase.store.PlanConfig.ExportDataConfig
- (*PlanConfig_ReleaseSource)(nil), // 7: bytebase.store.PlanConfig.ReleaseSource
- (*PlanConfig_SpecReleaseSource)(nil), // 8: bytebase.store.PlanConfig.SpecReleaseSource
- (*PlanConfig_DeploymentSnapshot)(nil), // 9: bytebase.store.PlanConfig.DeploymentSnapshot
- nil, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- (*PlanConfig_DeploymentSnapshot_DeploymentConfigSnapshot)(nil), // 11: bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot
- (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot)(nil), // 12: bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
- (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
- (*PreUpdateBackupDetail)(nil), // 14: bytebase.store.PreUpdateBackupDetail
- (ExportFormat)(0), // 15: bytebase.store.ExportFormat
- (*DeploymentConfig)(nil), // 16: bytebase.store.DeploymentConfig
+ (PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
+ (*PlanConfig)(nil), // 1: bytebase.store.PlanConfig
+ (*PlanConfig_Step)(nil), // 2: bytebase.store.PlanConfig.Step
+ (*PlanConfig_Spec)(nil), // 3: bytebase.store.PlanConfig.Spec
+ (*PlanConfig_CreateDatabaseConfig)(nil), // 4: bytebase.store.PlanConfig.CreateDatabaseConfig
+ (*PlanConfig_ChangeDatabaseConfig)(nil), // 5: bytebase.store.PlanConfig.ChangeDatabaseConfig
+ (*PlanConfig_ExportDataConfig)(nil), // 6: bytebase.store.PlanConfig.ExportDataConfig
+ (*PlanConfig_ReleaseSource)(nil), // 7: bytebase.store.PlanConfig.ReleaseSource
+ (*PlanConfig_SpecReleaseSource)(nil), // 8: bytebase.store.PlanConfig.SpecReleaseSource
+ (*PlanConfig_DeploymentSnapshot)(nil), // 9: bytebase.store.PlanConfig.DeploymentSnapshot
+ nil, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot)(nil), // 11: bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
+ (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp
+ (*PreUpdateBackupDetail)(nil), // 13: bytebase.store.PreUpdateBackupDetail
+ (ExportFormat)(0), // 14: bytebase.store.ExportFormat
}
var file_store_plan_proto_depIdxs = []int32{
2, // 0: bytebase.store.PlanConfig.steps:type_name -> bytebase.store.PlanConfig.Step
7, // 1: bytebase.store.PlanConfig.release_source:type_name -> bytebase.store.PlanConfig.ReleaseSource
9, // 2: bytebase.store.PlanConfig.deployment_snapshot:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot
3, // 3: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec
- 13, // 4: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp
+ 12, // 4: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp
8, // 5: bytebase.store.PlanConfig.Spec.spec_release_source:type_name -> bytebase.store.PlanConfig.SpecReleaseSource
4, // 6: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
5, // 7: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
6, // 8: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
0, // 9: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
10, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- 14, // 11: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
- 15, // 12: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
- 11, // 13: bytebase.store.PlanConfig.DeploymentSnapshot.deployment_config_snapshot:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot
- 12, // 14: bytebase.store.PlanConfig.DeploymentSnapshot.database_group_snapshots:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
- 16, // 15: bytebase.store.PlanConfig.DeploymentSnapshot.DeploymentConfigSnapshot.deployment_config:type_name -> bytebase.store.DeploymentConfig
- 16, // [16:16] is the sub-list for method output_type
- 16, // [16:16] is the sub-list for method input_type
- 16, // [16:16] is the sub-list for extension type_name
- 16, // [16:16] is the sub-list for extension extendee
- 0, // [0:16] is the sub-list for field type_name
+ 13, // 11: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
+ 14, // 12: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
+ 11, // 13: bytebase.store.PlanConfig.DeploymentSnapshot.database_group_snapshots:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
+ 14, // [14:14] is the sub-list for method output_type
+ 14, // [14:14] is the sub-list for method input_type
+ 14, // [14:14] is the sub-list for extension type_name
+ 14, // [14:14] is the sub-list for extension extendee
+ 0, // [0:14] is the sub-list for field type_name
}
func init() { file_store_plan_proto_init() }
@@ -1118,7 +1035,6 @@ func file_store_plan_proto_init() {
return
}
file_store_common_proto_init()
- file_store_deployment_config_proto_init()
file_store_plan_check_run_proto_init()
file_store_plan_proto_msgTypes[2].OneofWrappers = []any{
(*PlanConfig_Spec_CreateDatabaseConfig)(nil),
@@ -1133,7 +1049,7 @@ func file_store_plan_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_plan_proto_rawDesc), len(file_store_plan_proto_rawDesc)),
NumEnums: 1,
- NumMessages: 12,
+ NumMessages: 11,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/plan.proto b/proto/store/plan.proto
index 240d92139a..2bd33dcde6 100644
--- a/proto/store/plan.proto
+++ b/proto/store/plan.proto
@@ -6,7 +6,6 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
import "store/common.proto";
-import "store/deployment_config.proto";
import "store/plan_check_run.proto";
option go_package = "generated-go/store";
@@ -127,16 +126,9 @@ message PlanConfig {
}
message DeploymentSnapshot {
- DeploymentConfigSnapshot deployment_config_snapshot = 1;
+ repeated string environments = 1;
repeated DatabaseGroupSnapshot database_group_snapshots = 2;
- // The snapshot of the project deployment config at the time of creation.
- message DeploymentConfigSnapshot {
- string name = 1;
- string title = 2;
- DeploymentConfig deployment_config = 3;
- }
-
// The snapshot of the database group at the time of creation.
message DatabaseGroupSnapshot {
// Format: projects/{project}/databaseGroups/{databaseGroup}.