Skip to content

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

feat: plan deployment snapshot (#14666)

p0nycc09e5a19731
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.go
index 7b37d2ce31..dd8d98c79e 100644
--- a/backend/api/v1/plan_service.go
+++ b/backend/api/v1/plan_service.go
@@ -15,6 +15,7 @@ import (
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
+ "google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/bytebase/bytebase/backend/common"
@@ -253,17 +254,15 @@ func (s *PlanService) CreatePlan(ctx context.Context, request *v1pb.CreatePlanRe
Description: request.Plan.Description,
Config: convertPlan(request.Plan),
}
- if request.GetPlan().VcsSource != nil {
- planMessage.Config.VcsSource = &storepb.PlanConfig_VCSSource{
- VcsConnector: request.GetPlan().GetVcsSource().GetVcsConnector(),
- PullRequestUrl: request.GetPlan().GetVcsSource().GetPullRequestUrl(),
- VcsType: storepb.VCSType(request.GetPlan().GetVcsSource().VcsType),
- }
+ snapshot, err := getPlanSnapshot(ctx, s.store, planMessage.Config.GetSteps(), project)
+ if err != nil {
+ return nil, status.Errorf(codes.Internal, "failed to get plan deployment snapshot, error: %v", err)
}
+ planMessage.Config.DeploymentSnapshot = snapshot
serializeTasks := request.GetPlan().GetVcsSource() != nil
- if _, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, planMessage.Config.GetSteps(), project, serializeTasks); err != nil {
+ if _, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, planMessage.Config.GetSteps(), snapshot, project, serializeTasks); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline from the plan, please check you request, error: %v", err)
}
plan, err := s.store.CreatePlan(ctx, planMessage, principalID)
@@ -348,13 +347,22 @@ func (s *PlanService) UpdatePlan(ctx context.Context, request *v1pb.UpdatePlanRe
description := request.Plan.Description
planUpdate.Description = &description
case "steps":
+ convertedRequestSteps := convertPlanSteps(request.GetPlan().GetSteps())
planUpdate.Config = &storepb.PlanConfig{
- Steps: convertPlanSteps(request.Plan.Steps),
+ Steps: convertedRequestSteps,
}
serializeTasks := oldPlan.Config.GetVcsSource() != nil
- if _, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, convertPlanSteps(request.Plan.GetSteps()), project, serializeTasks); err != nil {
+ if _, err := GetPipelineCreate(ctx,
+ s.store,
+ s.sheetManager,
+ s.licenseService,
+ s.dbFactory,
+ convertedRequestSteps,
+ oldPlan.Config.GetDeploymentSnapshot(),
+ project,
+ serializeTasks); err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline from the plan, please check you request, error: %v", err)
}
@@ -1234,3 +1242,180 @@ func getSpecs(database *store.DatabaseMessage, revisions []*store.RevisionMessag
},
nil
}
+
+// diffSpecs check if there are any specs removed, added or updated in the new plan.
+// Only updating sheet is taken into account.
+func diffSpecs(oldSteps []*v1pb.Plan_Step, newSteps []*v1pb.Plan_Step) ([]*v1pb.Plan_Spec, []*v1pb.Plan_Spec, []*v1pb.Plan_Spec) {
+ oldSpecs := make(map[string]*v1pb.Plan_Spec)
+ newSpecs := make(map[string]*v1pb.Plan_Spec)
+ var removed, added, updated []*v1pb.Plan_Spec
+ for _, step := range oldSteps {
+ for _, spec := range step.Specs {
+ oldSpecs[spec.Id] = spec
+ }
+ }
+ for _, step := range newSteps {
+ for _, spec := range step.Specs {
+ newSpecs[spec.Id] = spec
+ }
+ }
+ for _, step := range oldSteps {
+ for _, spec := range step.Specs {
+ if _, ok := newSpecs[spec.Id]; !ok {
+ removed = append(removed, spec)
+ }
+ }
+ }
+ for _, step := range newSteps {
+ for _, spec := range step.Specs {
+ if _, ok := oldSpecs[spec.Id]; !ok {
+ added = append(added, spec)
+ }
+ }
+ }
+ for _, step := range newSteps {
+ for _, spec := range step.Specs {
+ if oldSpec, ok := oldSpecs[spec.Id]; ok {
+ if !cmp.Equal(oldSpec, spec, protocmp.Transform()) {
+ updated = append(updated, spec)
+ }
+ }
+ }
+ }
+ return removed, added, updated
+}
+
+func validateSteps(steps []*v1pb.Plan_Step) error {
+ if len(steps) == 0 {
+ return errors.Errorf("the plan has zero step")
+ }
+ var databaseTarget, databaseGroupTarget int
+ configTypeCount := map[string]int{}
+ seenID := map[string]bool{}
+ for _, step := range steps {
+ if len(step.Specs) == 0 {
+ return errors.Errorf("the plan step has zero spec")
+ }
+ seenIDInStep := map[string]bool{}
+ for _, spec := range step.Specs {
+ id := spec.GetId()
+ if id == "" {
+ return errors.Errorf("spec id cannot be empty")
+ }
+ if seenID[id] {
+ return errors.Errorf("found duplicate spec id %q", spec.GetId())
+ }
+ seenID[id] = true
+ seenIDInStep[id] = true
+ switch config := spec.Config.(type) {
+ case *v1pb.Plan_Spec_ChangeDatabaseConfig:
+ configTypeCount["ChangeDatabaseConfig"]++
+ c := config.ChangeDatabaseConfig
+ if _, _, err := common.GetInstanceDatabaseID(c.Target); err == nil {
+ databaseTarget++
+ } else if _, _, err := common.GetProjectIDDatabaseGroupID(c.Target); err == nil {
+ databaseGroupTarget++
+ } else {
+ return errors.Errorf("unknown target %q", c.Target)
+ }
+ case *v1pb.Plan_Spec_CreateDatabaseConfig:
+ configTypeCount["CreateDatabaseConfig"]++
+ case *v1pb.Plan_Spec_ExportDataConfig:
+ configTypeCount["ExportDataConfig"]++
+ default:
+ return errors.Errorf("unexpected config type %T", spec.Config)
+ }
+ }
+ for _, spec := range step.Specs {
+ for _, dependOnSpec := range spec.DependsOnSpecs {
+ if !seenIDInStep[dependOnSpec] {
+ return errors.Errorf("spec %q depends on spec %q, but spec %q is not found in the step", spec.Id, dependOnSpec, dependOnSpec)
+ }
+ if dependOnSpec == spec.Id {
+ return errors.Errorf("spec %q depends on itself", spec.Id)
+ }
+ }
+ }
+ }
+
+ if len(configTypeCount) > 1 {
+ msg := "expect one kind of config, found"
+ for k, v := range configTypeCount {
+ msg += fmt.Sprintf(" %v %v", v, k)
+ }
+ return errors.New(msg)
+ }
+
+ if databaseGroupTarget > 0 && databaseTarget > 0 {
+ return errors.Errorf("found databaseGroupTarget and databaseTarget, expect only one kind")
+ }
+ return nil
+}
+
+func getPlanSpecDatabaseGroups(steps []*storepb.PlanConfig_Step) []string {
+ var databaseGroups []string
+ for _, step := range steps {
+ for _, spec := range step.Specs {
+ if target := spec.GetChangeDatabaseConfig().GetTarget(); target != "" {
+ if _, _, err := common.GetProjectIDDatabaseGroupID(target); err == nil {
+ databaseGroups = append(databaseGroups, target)
+ }
+ }
+ }
+ }
+ return databaseGroups
+}
+
+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.UID)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get deployment config")
+ }
+ if err := utils.ValidateDeploymentSchedule(deploymentConfig.Config.GetSchedule()); err != nil {
+ return nil, errors.Wrapf(err, "failed to validate and get deployment schedule")
+ }
+ snapshot.DeploymentConfig = deploymentConfig.Config
+
+ databaseGroups := getPlanSpecDatabaseGroups(steps)
+
+ allDatabases, err := s.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID})
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to list databases for project %q", project.ResourceID)
+ }
+
+ for _, name := range databaseGroups {
+ projectID, id, err := common.GetProjectIDDatabaseGroupID(name)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get database group id")
+ }
+ if projectID != project.ResourceID {
+ return nil, errors.Errorf("%s does not belong to project %s", name, project.ResourceID)
+ }
+ databaseGroup, err := s.GetDatabaseGroup(ctx, &store.FindDatabaseGroupMessage{
+ ResourceID: &id,
+ ProjectUID: &project.UID,
+ })
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get database group")
+ }
+
+ matchedDatabases, _, err := utils.GetMatchedAndUnmatchedDatabasesInDatabaseGroup(ctx, databaseGroup, allDatabases)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get matched and unmatched databases in database group %q", id)
+ }
+
+ var databases []string
+ for _, db := range matchedDatabases {
+ databases = append(databases, common.FormatDatabase(db.InstanceID, db.DatabaseName))
+ }
+
+ snapshot.DatabaseGroupSnapshots = append(snapshot.DatabaseGroupSnapshots, &storepb.PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot{
+ DatabaseGroup: name,
+ Databases: databases,
+ })
+ }
+
+ return snapshot, nil
+}
diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.go
index 88d10c5281..1fd94c204b 100644
--- a/backend/api/v1/rollout_service.go
+++ b/backend/api/v1/rollout_service.go
@@ -10,12 +10,10 @@ import (
"strings"
"time"
- "github.com/google/go-cmp/cmp"
"github.com/jackc/pgtype"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/bytebase/bytebase/backend/common"
@@ -93,7 +91,7 @@ func (s *RolloutService) PreviewRollout(ctx context.Context, request *v1pb.Previ
serializeTasks := request.Plan.GetVcsSource() != nil
- rollout, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, steps, project, serializeTasks)
+ rollout, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, steps, nil /* snapshot */, project, serializeTasks)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline create, error: %v", err)
}
@@ -239,7 +237,7 @@ func (s *RolloutService) CreateRollout(ctx context.Context, request *v1pb.Create
serializeTasks := plan.Config.GetVcsSource() != nil
- pipelineCreate, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, plan.Config.Steps, project, serializeTasks)
+ pipelineCreate, err := GetPipelineCreate(ctx, s.store, s.sheetManager, s.licenseService, s.dbFactory, plan.Config.GetSteps(), plan.Config.GetDeploymentSnapshot(), project, serializeTasks)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "failed to get pipeline create, error: %v", err)
}
@@ -958,118 +956,9 @@ func (s *RolloutService) PreviewTaskRunRollback(ctx context.Context, request *v1
}, nil
}
-// diffSpecs check if there are any specs removed, added or updated in the new plan.
-// Only updating sheet is taken into account.
-func diffSpecs(oldSteps []*v1pb.Plan_Step, newSteps []*v1pb.Plan_Step) ([]*v1pb.Plan_Spec, []*v1pb.Plan_Spec, []*v1pb.Plan_Spec) {
- oldSpecs := make(map[string]*v1pb.Plan_Spec)
- newSpecs := make(map[string]*v1pb.Plan_Spec)
- var removed, added, updated []*v1pb.Plan_Spec
- for _, step := range oldSteps {
- for _, spec := range step.Specs {
- oldSpecs[spec.Id] = spec
- }
- }
- for _, step := range newSteps {
- for _, spec := range step.Specs {
- newSpecs[spec.Id] = spec
- }
- }
- for _, step := range oldSteps {
- for _, spec := range step.Specs {
- if _, ok := newSpecs[spec.Id]; !ok {
- removed = append(removed, spec)
- }
- }
- }
- for _, step := range newSteps {
- for _, spec := range step.Specs {
- if _, ok := oldSpecs[spec.Id]; !ok {
- added = append(added, spec)
- }
- }
- }
- for _, step := range newSteps {
- for _, spec := range step.Specs {
- if oldSpec, ok := oldSpecs[spec.Id]; ok {
- if !cmp.Equal(oldSpec, spec, protocmp.Transform()) {
- updated = append(updated, spec)
- }
- }
- }
- }
- return removed, added, updated
-}
-
-func validateSteps(steps []*v1pb.Plan_Step) error {
- if len(steps) == 0 {
- return errors.Errorf("the plan has zero step")
- }
- var databaseTarget, databaseGroupTarget int
- configTypeCount := map[string]int{}
- seenID := map[string]bool{}
- for _, step := range steps {
- if len(step.Specs) == 0 {
- return errors.Errorf("the plan step has zero spec")
- }
- seenIDInStep := map[string]bool{}
- for _, spec := range step.Specs {
- id := spec.GetId()
- if id == "" {
- return errors.Errorf("spec id cannot be empty")
- }
- if seenID[id] {
- return errors.Errorf("found duplicate spec id %q", spec.GetId())
- }
- seenID[id] = true
- seenIDInStep[id] = true
- switch config := spec.Config.(type) {
- case *v1pb.Plan_Spec_ChangeDatabaseConfig:
- configTypeCount["ChangeDatabaseConfig"]++
- c := config.ChangeDatabaseConfig
- if _, _, err := common.GetInstanceDatabaseID(c.Target); err == nil {
- databaseTarget++
- } else if _, _, err := common.GetProjectIDDatabaseGroupID(c.Target); err == nil {
- databaseGroupTarget++
- } else {
- return errors.Errorf("unknown target %q", c.Target)
- }
- case *v1pb.Plan_Spec_CreateDatabaseConfig:
- configTypeCount["CreateDatabaseConfig"]++
- case *v1pb.Plan_Spec_ExportDataConfig:
- configTypeCount["ExportDataConfig"]++
- default:
- return errors.Errorf("unexpected config type %T", spec.Config)
- }
- }
- for _, spec := range step.Specs {
- for _, dependOnSpec := range spec.DependsOnSpecs {
- if !seenIDInStep[dependOnSpec] {
- return errors.Errorf("spec %q depends on spec %q, but spec %q is not found in the step", spec.Id, dependOnSpec, dependOnSpec)
- }
- if dependOnSpec == spec.Id {
- return errors.Errorf("spec %q depends on itself", spec.Id)
- }
- }
- }
- }
-
- if len(configTypeCount) > 1 {
- msg := "expect one kind of config, found"
- for k, v := range configTypeCount {
- msg += fmt.Sprintf(" %v %v", v, k)
- }
- return errors.New(msg)
- }
-
- if databaseGroupTarget > 0 && databaseTarget > 0 {
- return errors.Errorf("found databaseGroupTarget and databaseTarget, expect only one kind")
- }
- return nil
-}
-
// GetPipelineCreate gets a pipeline create message from a plan.
// serializeTasks serialize tasks on the same database using taskDAG.
-func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, steps []*storepb.PlanConfig_Step, project *store.ProjectMessage, serializeTasks bool) (*store.PipelineMessage, error) {
+func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.Manager, licenseService enterprise.LicenseService, dbFactory *dbfactory.DBFactory, steps []*storepb.PlanConfig_Step, snapshot *storepb.PlanConfig_DeploymentSnapshot /* nullable */, project *store.ProjectMessage, serializeTasks bool) (*store.PipelineMessage, error) {
// Flatten all specs from steps.
var specs []*storepb.PlanConfig_Spec
for _, step := range steps {
@@ -1078,7 +967,7 @@ func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.
// Step 1 - transform database group specs.
// Others are untouched.
- transformSpecs, err := transformDatabaseGroupSpecs(ctx, s, project, specs)
+ transformSpecs, err := transformDatabaseGroupSpecs(ctx, s, project, specs, snapshot)
if err != nil {
return nil, errors.Wrapf(err, "failed to transform database group specs")
}
@@ -1097,11 +986,15 @@ func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.
// For ChangeDatabase specs, we will try to rebuild the steps based on the deployment config.
if filterByDeploymentConfig {
- deploymentConfig, err := s.GetDeploymentConfigV2(ctx, project.UID)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to get deployment config")
+ deploymentConfig := snapshot.GetDeploymentConfig()
+ if deploymentConfig == nil {
+ deploymentConfigMessage, err := s.GetDeploymentConfigV2(ctx, project.UID)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get deployment config")
+ }
+ deploymentConfig = deploymentConfigMessage.Config
}
- if err := utils.ValidateDeploymentSchedule(deploymentConfig.Config.GetSchedule()); err != nil {
+ 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.
@@ -1126,7 +1019,7 @@ func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.
}
}
// Calculate the matrix of databases based on the deployment schedule.
- matrix, err := utils.GetDatabaseMatrixFromDeploymentSchedule(deploymentConfig.Config.GetSchedule(), databases)
+ matrix, err := utils.GetDatabaseMatrixFromDeploymentSchedule(deploymentConfig.GetSchedule(), databases)
if err != nil {
return nil, errors.Wrapf(err, "failed to get database matrix from deployment schedule")
}
@@ -1148,7 +1041,7 @@ func GetPipelineCreate(ctx context.Context, s *store.Store, sheetManager *sheet.
}
step := &storepb.PlanConfig_Step{
- Title: deploymentConfig.Config.GetSchedule().Deployments[i].Title,
+ Title: deploymentConfig.GetSchedule().Deployments[i].Title,
}
for _, database := range databases {
name := common.FormatDatabase(database.InstanceID, database.DatabaseName)
diff --git a/backend/api/v1/rollout_service_converter.go b/backend/api/v1/rollout_service_converter.go
index a99320e373..0805d881ad 100644
--- a/backend/api/v1/rollout_service_converter.go
+++ b/backend/api/v1/rollout_service_converter.go
@@ -182,9 +182,10 @@ func convertPlan(plan *v1pb.Plan) *storepb.PlanConfig {
return nil
}
return &storepb.PlanConfig{
- Steps: convertPlanSteps(plan.Steps),
- VcsSource: convertPlanVcsSource(plan.VcsSource),
- ReleaseSource: convertPlanReleaseSource(plan.ReleaseSource),
+ Steps: convertPlanSteps(plan.Steps),
+ VcsSource: convertPlanVcsSource(plan.VcsSource),
+ ReleaseSource: convertPlanReleaseSource(plan.ReleaseSource),
+ DeploymentSnapshot: nil,
}
}
diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.go
index 17369620fb..bbd5587017 100644
--- a/backend/api/v1/rollout_service_task.go
+++ b/backend/api/v1/rollout_service_task.go
@@ -25,14 +25,14 @@ import (
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
)
-func transformDatabaseGroupSpecs(ctx context.Context, s *store.Store, project *store.ProjectMessage, specs []*storepb.PlanConfig_Spec) ([]*storepb.PlanConfig_Spec, error) {
+func transformDatabaseGroupSpecs(ctx context.Context, s *store.Store, project *store.ProjectMessage, specs []*storepb.PlanConfig_Spec, snapshot *storepb.PlanConfig_DeploymentSnapshot) ([]*storepb.PlanConfig_Spec, error) {
var rspecs []*storepb.PlanConfig_Spec
for _, spec := range specs {
if config := spec.GetChangeDatabaseConfig(); config != nil {
// transform database group.
if _, _, err := common.GetProjectIDDatabaseGroupID(config.Target); err == nil {
- specsFromDatabaseGroup, err := transformDatabaseGroupTargetToSpecs(ctx, s, spec, config, project)
+ specsFromDatabaseGroup, err := transformDatabaseGroupTargetToSpecs(ctx, s, spec, config, project, snapshot)
if err != nil {
return nil, errors.Wrapf(err, "failed to transform databaseGroup target to steps")
}
@@ -46,7 +46,29 @@ func transformDatabaseGroupSpecs(ctx context.Context, s *store.Store, project *s
return rspecs, nil
}
-func transformDatabaseGroupTargetToSpecs(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, project *store.ProjectMessage) ([]*storepb.PlanConfig_Spec, error) {
+func transformDatabaseGroupTargetToSpecs(ctx context.Context, s *store.Store, spec *storepb.PlanConfig_Spec, c *storepb.PlanConfig_ChangeDatabaseConfig, project *store.ProjectMessage, snapshot *storepb.PlanConfig_DeploymentSnapshot) ([]*storepb.PlanConfig_Spec, error) {
+ // Use snapshot result if it's present.
+ for _, s := range snapshot.GetDatabaseGroupSnapshots() {
+ if s.DatabaseGroup == c.Target {
+ var specs []*storepb.PlanConfig_Spec
+ for _, database := range s.Databases {
+ s, ok := proto.Clone(spec).(*storepb.PlanConfig_Spec)
+ if !ok {
+ return nil, errors.Errorf("failed to clone, got %T", s)
+ }
+ proto.Merge(s, &storepb.PlanConfig_Spec{
+ Config: &storepb.PlanConfig_Spec_ChangeDatabaseConfig{
+ ChangeDatabaseConfig: &storepb.PlanConfig_ChangeDatabaseConfig{
+ Target: database,
+ },
+ },
+ })
+ specs = append(specs, s)
+ }
+ return specs, nil
+ }
+ }
+
projectID, databaseGroupID, err := common.GetProjectIDDatabaseGroupID(c.Target)
if err != nil {
return nil, errors.Wrapf(err, "failed to get project and deployment id from target %q", c.Target)
diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.go
index a4836b867d..397333b890 100644
--- a/backend/runner/approval/runner.go
+++ b/backend/runner/approval/runner.go
@@ -420,7 +420,7 @@ func (r *Runner) getDatabaseGeneralIssueRisk(ctx context.Context, issue *store.I
return 0, store.RiskSourceUnknown, false, nil
}
- pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.licenseService, r.dbFactory, plan.Config.Steps, issue.Project, false)
+ pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.licenseService, r.dbFactory, plan.Config.GetSteps(), plan.Config.GetDeploymentSnapshot(), issue.Project, false)
if err != nil {
return 0, store.RiskSourceUnknown, false, errors.Wrap(err, "failed to get pipeline create")
}
@@ -582,7 +582,7 @@ func (r *Runner) getDatabaseDataExportIssueRisk(ctx context.Context, issue *stor
return 0, store.RiskSourceUnknown, false, errors.Errorf("plan %v not found", *issue.PlanUID)
}
- pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.licenseService, r.dbFactory, plan.Config.Steps, issue.Project, false)
+ pipelineCreate, err := apiv1.GetPipelineCreate(ctx, r.store, r.sheetManager, r.licenseService, r.dbFactory, plan.Config.GetSteps(), plan.Config.GetDeploymentSnapshot(), issue.Project, false)
if err != nil {
return 0, store.RiskSourceUnknown, false, errors.Wrap(err, "failed to get pipeline create")
}
diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.ts
index 1921331068..2ee967dfb0 100644
--- a/frontend/src/types/proto/store/plan.ts
+++ b/frontend/src/types/proto/store/plan.ts
@@ -18,6 +18,7 @@ import {
vCSTypeToJSON,
vCSTypeToNumber,
} from "./common";
+import { DeploymentConfig } from "./deployment_config";
import { PreUpdateBackupDetail } from "./plan_check_run";
export const protobufPackage = "bytebase.store";
@@ -26,6 +27,7 @@ export interface PlanConfig {
steps: PlanConfig_Step[];
vcsSource: PlanConfig_VCSSource | undefined;
releaseSource: PlanConfig_ReleaseSource | undefined;
+ deploymentSnapshot: PlanConfig_DeploymentSnapshot | undefined;
}
export interface PlanConfig_Step {
@@ -263,8 +265,22 @@ export interface PlanConfig_SpecReleaseSource {
file: string;
}
+export interface PlanConfig_DeploymentSnapshot {
+ /** The snapshot of the project deployment config at the time of creation. */
+ deploymentConfig: DeploymentConfig | undefined;
+ databaseGroupSnapshots: PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot[];
+}
+
+/** The snapshot of the database group at the time of creation. */
+export interface PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ /** Format: projects/{project}/databaseGroups/{databaseGroup}. */
+ databaseGroup: string;
+ /** Format: instances/{instance-id}/databases/{database-name}. */
+ databases: string[];
+}
+
function createBasePlanConfig(): PlanConfig {
- return { steps: [], vcsSource: undefined, releaseSource: undefined };
+ return { steps: [], vcsSource: undefined, releaseSource: undefined, deploymentSnapshot: undefined };
}
export const PlanConfig: MessageFns<PlanConfig> = {
@@ -273,10 +289,13 @@ export const PlanConfig: MessageFns<PlanConfig> = {
PlanConfig_Step.encode(v!, writer.uint32(10).fork()).join();
}
if (message.vcsSource !== undefined) {
- PlanConfig_VCSSource.encode(message.vcsSource, writer.uint32(66).fork()).join();
+ PlanConfig_VCSSource.encode(message.vcsSource, writer.uint32(18).fork()).join();
}
if (message.releaseSource !== undefined) {
- PlanConfig_ReleaseSource.encode(message.releaseSource, writer.uint32(74).fork()).join();
+ PlanConfig_ReleaseSource.encode(message.releaseSource, writer.uint32(26).fork()).join();
+ }
+ if (message.deploymentSnapshot !== undefined) {
+ PlanConfig_DeploymentSnapshot.encode(message.deploymentSnapshot, writer.uint32(34).fork()).join();
}
return writer;
},
@@ -296,22 +315,30 @@ export const PlanConfig: MessageFns<PlanConfig> = {
message.steps.push(PlanConfig_Step.decode(reader, reader.uint32()));
continue;
}
- case 8: {
- if (tag !== 66) {
+ case 2: {
+ if (tag !== 18) {
break;
}
message.vcsSource = PlanConfig_VCSSource.decode(reader, reader.uint32());
continue;
}
- case 9: {
- if (tag !== 74) {
+ case 3: {
+ if (tag !== 26) {
break;
}
message.releaseSource = PlanConfig_ReleaseSource.decode(reader, reader.uint32());
continue;
}
+ case 4: {
+ if (tag !== 34) {
+ break;
+ }
+
+ message.deploymentSnapshot = PlanConfig_DeploymentSnapshot.decode(reader, reader.uint32());
+ continue;
+ }
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -326,6 +353,9 @@ export const PlanConfig: MessageFns<PlanConfig> = {
steps: globalThis.Array.isArray(object?.steps) ? object.steps.map((e: any) => PlanConfig_Step.fromJSON(e)) : [],
vcsSource: isSet(object.vcsSource) ? PlanConfig_VCSSource.fromJSON(object.vcsSource) : undefined,
releaseSource: isSet(object.releaseSource) ? PlanConfig_ReleaseSource.fromJSON(object.releaseSource) : undefined,
+ deploymentSnapshot: isSet(object.deploymentSnapshot)
+ ? PlanConfig_DeploymentSnapshot.fromJSON(object.deploymentSnapshot)
+ : undefined,
};
},
@@ -340,6 +370,9 @@ export const PlanConfig: MessageFns<PlanConfig> = {
if (message.releaseSource !== undefined) {
obj.releaseSource = PlanConfig_ReleaseSource.toJSON(message.releaseSource);
}
+ if (message.deploymentSnapshot !== undefined) {
+ obj.deploymentSnapshot = PlanConfig_DeploymentSnapshot.toJSON(message.deploymentSnapshot);
+ }
return obj;
},
@@ -355,6 +388,9 @@ export const PlanConfig: MessageFns<PlanConfig> = {
message.releaseSource = (object.releaseSource !== undefined && object.releaseSource !== null)
? PlanConfig_ReleaseSource.fromPartial(object.releaseSource)
: undefined;
+ message.deploymentSnapshot = (object.deploymentSnapshot !== undefined && object.deploymentSnapshot !== null)
+ ? PlanConfig_DeploymentSnapshot.fromPartial(object.deploymentSnapshot)
+ : undefined;
return message;
},
};
@@ -1514,6 +1550,179 @@ export const PlanConfig_SpecReleaseSource: MessageFns<PlanConfig_SpecReleaseSour
},
};
+function createBasePlanConfig_DeploymentSnapshot(): PlanConfig_DeploymentSnapshot {
+ return { deploymentConfig: undefined, databaseGroupSnapshots: [] };
+}
+
+export const PlanConfig_DeploymentSnapshot: MessageFns<PlanConfig_DeploymentSnapshot> = {
+ encode(message: PlanConfig_DeploymentSnapshot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.deploymentConfig !== undefined) {
+ DeploymentConfig.encode(message.deploymentConfig, writer.uint32(10).fork()).join();
+ }
+ for (const v of message.databaseGroupSnapshots) {
+ PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.encode(v!, writer.uint32(18).fork()).join();
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): PlanConfig_DeploymentSnapshot {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePlanConfig_DeploymentSnapshot();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.deploymentConfig = DeploymentConfig.decode(reader, reader.uint32());
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.databaseGroupSnapshots.push(
+ PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.decode(reader, reader.uint32()),
+ );
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): PlanConfig_DeploymentSnapshot {
+ return {
+ deploymentConfig: isSet(object.deploymentConfig) ? DeploymentConfig.fromJSON(object.deploymentConfig) : undefined,
+ databaseGroupSnapshots: globalThis.Array.isArray(object?.databaseGroupSnapshots)
+ ? object.databaseGroupSnapshots.map((e: any) => PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.fromJSON(e))
+ : [],
+ };
+ },
+
+ toJSON(message: PlanConfig_DeploymentSnapshot): unknown {
+ const obj: any = {};
+ if (message.deploymentConfig !== undefined) {
+ obj.deploymentConfig = DeploymentConfig.toJSON(message.deploymentConfig);
+ }
+ if (message.databaseGroupSnapshots?.length) {
+ obj.databaseGroupSnapshots = message.databaseGroupSnapshots.map((e) =>
+ PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.toJSON(e)
+ );
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<PlanConfig_DeploymentSnapshot>): PlanConfig_DeploymentSnapshot {
+ return PlanConfig_DeploymentSnapshot.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<PlanConfig_DeploymentSnapshot>): PlanConfig_DeploymentSnapshot {
+ const message = createBasePlanConfig_DeploymentSnapshot();
+ message.deploymentConfig = (object.deploymentConfig !== undefined && object.deploymentConfig !== null)
+ ? DeploymentConfig.fromPartial(object.deploymentConfig)
+ : undefined;
+ message.databaseGroupSnapshots =
+ object.databaseGroupSnapshots?.map((e) => PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.fromPartial(e)) ||
+ [];
+ return message;
+ },
+};
+
+function createBasePlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot(): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ return { databaseGroup: "", databases: [] };
+}
+
+export const PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot: MessageFns<
+ PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot
+> = {
+ encode(
+ message: PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot,
+ writer: BinaryWriter = new BinaryWriter(),
+ ): BinaryWriter {
+ if (message.databaseGroup !== "") {
+ writer.uint32(10).string(message.databaseGroup);
+ }
+ for (const v of message.databases) {
+ writer.uint32(18).string(v!);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.databaseGroup = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.databases.push(reader.string());
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ return {
+ databaseGroup: isSet(object.databaseGroup) ? globalThis.String(object.databaseGroup) : "",
+ databases: globalThis.Array.isArray(object?.databases)
+ ? object.databases.map((e: any) => globalThis.String(e))
+ : [],
+ };
+ },
+
+ toJSON(message: PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot): unknown {
+ const obj: any = {};
+ if (message.databaseGroup !== "") {
+ obj.databaseGroup = message.databaseGroup;
+ }
+ if (message.databases?.length) {
+ obj.databases = message.databases;
+ }
+ return obj;
+ },
+
+ create(
+ base?: DeepPartial<PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot>,
+ ): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ return PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot.fromPartial(base ?? {});
+ },
+ fromPartial(
+ object: DeepPartial<PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot>,
+ ): PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ const message = createBasePlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot();
+ message.databaseGroup = object.databaseGroup ?? "";
+ message.databases = object.databases?.map((e) => e) || [];
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 6bb9f58ac1..26241a6b76 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -197,6 +197,8 @@
- [PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry](#bytebase-store-PlanConfig-ChangeDatabaseConfig-GhostFlagsEntry)
- [PlanConfig.CreateDatabaseConfig](#bytebase-store-PlanConfig-CreateDatabaseConfig)
- [PlanConfig.CreateDatabaseConfig.LabelsEntry](#bytebase-store-PlanConfig-CreateDatabaseConfig-LabelsEntry)
+ - [PlanConfig.DeploymentSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot)
+ - [PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DatabaseGroupSnapshot)
- [PlanConfig.ExportDataConfig](#bytebase-store-PlanConfig-ExportDataConfig)
- [PlanConfig.ReleaseSource](#bytebase-store-PlanConfig-ReleaseSource)
- [PlanConfig.Spec](#bytebase-store-PlanConfig-Spec)
@@ -3114,6 +3116,7 @@ InstanceRole is the API message for instance role.
| steps | [PlanConfig.Step](#bytebase-store-PlanConfig-Step) | repeated | |
| vcs_source | [PlanConfig.VCSSource](#bytebase-store-PlanConfig-VCSSource) | | |
| release_source | [PlanConfig.ReleaseSource](#bytebase-store-PlanConfig-ReleaseSource) | | |
+| deployment_snapshot | [PlanConfig.DeploymentSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot) | | |
@@ -3196,6 +3199,38 @@ InstanceRole is the API message for instance role.
+<a name="bytebase-store-PlanConfig-DeploymentSnapshot"></a>
+
+### PlanConfig.DeploymentSnapshot
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| deployment_config | [DeploymentConfig](#bytebase-store-DeploymentConfig) | | The snapshot of the project deployment config at the time of creation. |
+| database_group_snapshots | [PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot](#bytebase-store-PlanConfig-DeploymentSnapshot-DatabaseGroupSnapshot) | repeated | |
+
+
+
+
+
+
+<a name="bytebase-store-PlanConfig-DeploymentSnapshot-DatabaseGroupSnapshot"></a>
+
+### PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
+The snapshot of the database group at the time of creation.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| database_group | [string](#string) | | Format: projects/{project}/databaseGroups/{databaseGroup}. |
+| databases | [string](#string) | repeated | Format: instances/{instance-id}/databases/{database-name}. |
+
+
+
+
+
+
<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 06160979d5..49c184e118 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -962,6 +962,14 @@
<a href="#bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry"><span class="badge">M</span>PlanConfig.CreateDatabaseConfig.LabelsEntry</a>
</li>
+ <li>
+ <a href="#bytebase.store.PlanConfig.DeploymentSnapshot"><span class="badge">M</span>PlanConfig.DeploymentSnapshot</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot"><span class="badge">M</span>PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot</a>
+ </li>
+
<li>
<a href="#bytebase.store.PlanConfig.ExportDataConfig"><span class="badge">M</span>PlanConfig.ExportDataConfig</a>
</li>
@@ -8321,6 +8329,13 @@ Format: instances/{instance}/databases/{database} </p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>deployment_snapshot</td>
+ <td><a href="#bytebase.store.PlanConfig.DeploymentSnapshot">PlanConfig.DeploymentSnapshot</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
</tbody>
</table>
@@ -8544,6 +8559,68 @@ Format: environments/prod where prod is the environment resource ID. </p></td>
+ <h3 id="bytebase.store.PlanConfig.DeploymentSnapshot">PlanConfig.DeploymentSnapshot</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>deployment_config</td>
+ <td><a href="#bytebase.store.DeploymentConfig">DeploymentConfig</a></td>
+ <td></td>
+ <td><p>The snapshot of the project deployment config at the time of creation. </p></td>
+ </tr>
+
+ <tr>
+ <td>database_group_snapshots</td>
+ <td><a href="#bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot">PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot">PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot</h3>
+ <p>The snapshot of the database group 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>database_group</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>Format: projects/{project}/databaseGroups/{databaseGroup}. </p></td>
+ </tr>
+
+ <tr>
+ <td>databases</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>Format: instances/{instance-id}/databases/{database-name}. </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 1cc225784f..257f008af2 100644
--- a/proto/generated-go/store/plan.pb.go
+++ b/proto/generated-go/store/plan.pb.go
@@ -93,12 +93,13 @@ func (PlanConfig_ChangeDatabaseConfig_Type) EnumDescriptor() ([]byte, []int) {
}
type PlanConfig struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Steps []*PlanConfig_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
- VcsSource *PlanConfig_VCSSource `protobuf:"bytes,8,opt,name=vcs_source,json=vcsSource,proto3" json:"vcs_source,omitempty"`
- ReleaseSource *PlanConfig_ReleaseSource `protobuf:"bytes,9,opt,name=release_source,json=releaseSource,proto3" json:"release_source,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Steps []*PlanConfig_Step `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
+ VcsSource *PlanConfig_VCSSource `protobuf:"bytes,2,opt,name=vcs_source,json=vcsSource,proto3" json:"vcs_source,omitempty"`
+ ReleaseSource *PlanConfig_ReleaseSource `protobuf:"bytes,3,opt,name=release_source,json=releaseSource,proto3" json:"release_source,omitempty"`
+ DeploymentSnapshot *PlanConfig_DeploymentSnapshot `protobuf:"bytes,4,opt,name=deployment_snapshot,json=deploymentSnapshot,proto3" json:"deployment_snapshot,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *PlanConfig) Reset() {
@@ -152,6 +153,13 @@ func (x *PlanConfig) GetReleaseSource() *PlanConfig_ReleaseSource {
return nil
}
+func (x *PlanConfig) GetDeploymentSnapshot() *PlanConfig_DeploymentSnapshot {
+ if x != nil {
+ return x.DeploymentSnapshot
+ }
+ return nil
+}
+
type PlanConfig_Step struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Use the title if set.
@@ -791,6 +799,114 @@ func (x *PlanConfig_SpecReleaseSource) GetFile() string {
return ""
}
+type PlanConfig_DeploymentSnapshot struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The snapshot of the project deployment config at the time of creation.
+ DeploymentConfig *DeploymentConfig `protobuf:"bytes,1,opt,name=deployment_config,json=deploymentConfig,proto3" json:"deployment_config,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() {
+ *x = PlanConfig_DeploymentSnapshot{}
+ mi := &file_store_plan_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanConfig_DeploymentSnapshot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PlanConfig_DeploymentSnapshot) ProtoMessage() {}
+
+func (x *PlanConfig_DeploymentSnapshot) ProtoReflect() protoreflect.Message {
+ mi := &file_store_plan_proto_msgTypes[9]
+ 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.ProtoReflect.Descriptor instead.
+func (*PlanConfig_DeploymentSnapshot) Descriptor() ([]byte, []int) {
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 8}
+}
+
+func (x *PlanConfig_DeploymentSnapshot) GetDeploymentConfig() *DeploymentConfig {
+ if x != nil {
+ return x.DeploymentConfig
+ }
+ return nil
+}
+
+func (x *PlanConfig_DeploymentSnapshot) GetDatabaseGroupSnapshots() []*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot {
+ if x != nil {
+ return x.DatabaseGroupSnapshots
+ }
+ return nil
+}
+
+// The snapshot of the database group at the time of creation.
+type PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Format: projects/{project}/databaseGroups/{databaseGroup}.
+ DatabaseGroup string `protobuf:"bytes,1,opt,name=database_group,json=databaseGroup,proto3" json:"database_group,omitempty"`
+ // Format: instances/{instance-id}/databases/{database-name}.
+ Databases []string `protobuf:"bytes,2,rep,name=databases,proto3" json:"databases,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) Reset() {
+ *x = PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot{}
+ mi := &file_store_plan_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) ProtoMessage() {}
+
+func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) ProtoReflect() protoreflect.Message {
+ mi := &file_store_plan_proto_msgTypes[12]
+ 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_DatabaseGroupSnapshot.ProtoReflect.Descriptor instead.
+func (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) Descriptor() ([]byte, []int) {
+ return file_store_plan_proto_rawDescGZIP(), []int{0, 8, 0}
+}
+
+func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) GetDatabaseGroup() string {
+ if x != nil {
+ return x.DatabaseGroup
+ }
+ return ""
+}
+
+func (x *PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot) GetDatabases() []string {
+ if x != nil {
+ return x.Databases
+ }
+ return nil
+}
+
var File_store_plan_proto protoreflect.FileDescriptor
var file_store_plan_proto_rawDesc = []byte{
@@ -803,158 +919,186 @@ var file_store_plan_proto_rawDesc = []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, 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,
- 0xb5, 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, 0x43, 0x0a, 0x0a, 0x76, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 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, 0x56, 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
- 0x09, 0x76, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x72, 0x65,
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x09, 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, 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,
+ 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, 0xd8,
+ 0x15, 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, 0x43, 0x0a, 0x0a, 0x76, 0x63, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 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, 0xa7, 0x04, 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, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x70,
- 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x06, 0x20,
- 0x03, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x53, 0x70,
- 0x65, 0x63, 0x73, 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,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09,
+ 0x76, 0x63, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 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,
+ 0xa7, 0x04, 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, 0x28, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x65,
+ 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x73, 0x18, 0x06, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x53, 0x70, 0x65,
+ 0x63, 0x73, 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, 0xd9, 0x03, 0x0a, 0x14, 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,
+ 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, 0x12,
+ 0x59, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x3b, 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,
+ 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41,
+ 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61,
+ 0x62, 0x65, 0x6c, 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, 0x1a, 0xd7, 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, 0x48, 0x00, 0x52, 0x14, 0x63,
+ 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, 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, 0xd9, 0x03, 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,
- 0x12, 0x59, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x3b, 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, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xe2,
- 0x41, 0x01, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c,
- 0x61, 0x62, 0x65, 0x6c, 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, 0x1a, 0xd7, 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, 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, 0x71, 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, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x05, 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, 0x8e, 0x01, 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x76, 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x43, 0x53, 0x54, 0x79, 0x70, 0x65,
- 0x52, 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x63, 0x73,
- 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0c, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x28,
- 0x0a, 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75,
- 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 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, 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,
+ 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, 0x71, 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, 0x0a, 0x0a, 0x06, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x05, 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, 0x8e, 0x01, 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x76, 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x43, 0x53, 0x54, 0x79, 0x70, 0x65, 0x52,
+ 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x63, 0x73, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0c, 0x76, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x28, 0x0a,
+ 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x72,
+ 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 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, 0xc0, 0x02, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f,
+ 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x4d, 0x0a,
+ 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x18, 0x01, 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, 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 (
@@ -970,7 +1114,7 @@ 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, 11)
+var file_store_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_store_plan_proto_goTypes = []any{
(PlanConfig_ChangeDatabaseConfig_Type)(0), // 0: bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
(*PlanConfig)(nil), // 1: bytebase.store.PlanConfig
@@ -982,34 +1126,40 @@ var file_store_plan_proto_goTypes = []any{
(*PlanConfig_VCSSource)(nil), // 7: bytebase.store.PlanConfig.VCSSource
(*PlanConfig_ReleaseSource)(nil), // 8: bytebase.store.PlanConfig.ReleaseSource
(*PlanConfig_SpecReleaseSource)(nil), // 9: bytebase.store.PlanConfig.SpecReleaseSource
- nil, // 10: bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry
- nil, // 11: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp
- (*PreUpdateBackupDetail)(nil), // 13: bytebase.store.PreUpdateBackupDetail
- (ExportFormat)(0), // 14: bytebase.store.ExportFormat
- (VCSType)(0), // 15: bytebase.store.VCSType
+ (*PlanConfig_DeploymentSnapshot)(nil), // 10: bytebase.store.PlanConfig.DeploymentSnapshot
+ nil, // 11: bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry
+ nil, // 12: bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ (*PlanConfig_DeploymentSnapshot_DatabaseGroupSnapshot)(nil), // 13: bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
+ (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
+ (*PreUpdateBackupDetail)(nil), // 15: bytebase.store.PreUpdateBackupDetail
+ (ExportFormat)(0), // 16: bytebase.store.ExportFormat
+ (VCSType)(0), // 17: bytebase.store.VCSType
+ (*DeploymentConfig)(nil), // 18: bytebase.store.DeploymentConfig
}
var file_store_plan_proto_depIdxs = []int32{
2, // 0: bytebase.store.PlanConfig.steps:type_name -> bytebase.store.PlanConfig.Step
7, // 1: bytebase.store.PlanConfig.vcs_source:type_name -> bytebase.store.PlanConfig.VCSSource
8, // 2: bytebase.store.PlanConfig.release_source:type_name -> bytebase.store.PlanConfig.ReleaseSource
- 3, // 3: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec
- 12, // 4: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp
- 9, // 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
- 10, // 9: bytebase.store.PlanConfig.CreateDatabaseConfig.labels:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry
- 0, // 10: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
- 11, // 11: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
- 13, // 12: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
- 14, // 13: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
- 15, // 14: bytebase.store.PlanConfig.VCSSource.vcs_type:type_name -> bytebase.store.VCSType
- 15, // [15:15] is the sub-list for method output_type
- 15, // [15:15] is the sub-list for method input_type
- 15, // [15:15] is the sub-list for extension type_name
- 15, // [15:15] is the sub-list for extension extendee
- 0, // [0:15] is the sub-list for field type_name
+ 10, // 3: bytebase.store.PlanConfig.deployment_snapshot:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot
+ 3, // 4: bytebase.store.PlanConfig.Step.specs:type_name -> bytebase.store.PlanConfig.Spec
+ 14, // 5: bytebase.store.PlanConfig.Spec.earliest_allowed_time:type_name -> google.protobuf.Timestamp
+ 9, // 6: bytebase.store.PlanConfig.Spec.spec_release_source:type_name -> bytebase.store.PlanConfig.SpecReleaseSource
+ 4, // 7: bytebase.store.PlanConfig.Spec.create_database_config:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig
+ 5, // 8: bytebase.store.PlanConfig.Spec.change_database_config:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig
+ 6, // 9: bytebase.store.PlanConfig.Spec.export_data_config:type_name -> bytebase.store.PlanConfig.ExportDataConfig
+ 11, // 10: bytebase.store.PlanConfig.CreateDatabaseConfig.labels:type_name -> bytebase.store.PlanConfig.CreateDatabaseConfig.LabelsEntry
+ 0, // 11: bytebase.store.PlanConfig.ChangeDatabaseConfig.type:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.Type
+ 12, // 12: bytebase.store.PlanConfig.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.store.PlanConfig.ChangeDatabaseConfig.GhostFlagsEntry
+ 15, // 13: bytebase.store.PlanConfig.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.store.PreUpdateBackupDetail
+ 16, // 14: bytebase.store.PlanConfig.ExportDataConfig.format:type_name -> bytebase.store.ExportFormat
+ 17, // 15: bytebase.store.PlanConfig.VCSSource.vcs_type:type_name -> bytebase.store.VCSType
+ 18, // 16: bytebase.store.PlanConfig.DeploymentSnapshot.deployment_config:type_name -> bytebase.store.DeploymentConfig
+ 13, // 17: bytebase.store.PlanConfig.DeploymentSnapshot.database_group_snapshots:type_name -> bytebase.store.PlanConfig.DeploymentSnapshot.DatabaseGroupSnapshot
+ 18, // [18:18] is the sub-list for method output_type
+ 18, // [18:18] is the sub-list for method input_type
+ 18, // [18:18] is the sub-list for extension type_name
+ 18, // [18:18] is the sub-list for extension extendee
+ 0, // [0:18] is the sub-list for field type_name
}
func init() { file_store_plan_proto_init() }
@@ -1018,6 +1168,7 @@ 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),
@@ -1032,7 +1183,7 @@ func file_store_plan_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_plan_proto_rawDesc,
NumEnums: 1,
- NumMessages: 11,
+ NumMessages: 13,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/plan.proto b/proto/store/plan.proto
index a4925d9acb..4a5c18b7f0 100644
--- a/proto/store/plan.proto
+++ b/proto/store/plan.proto
@@ -6,6 +6,7 @@ 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";
@@ -13,6 +14,12 @@ option go_package = "generated-go/store";
message PlanConfig {
repeated Step steps = 1;
+ VCSSource vcs_source = 2;
+
+ ReleaseSource release_source = 3;
+
+ DeploymentSnapshot deployment_snapshot = 4;
+
message Step {
// Use the title if set.
// Use a generated title if empty.
@@ -37,10 +44,6 @@ message PlanConfig {
}
}
- VCSSource vcs_source = 8;
-
- ReleaseSource release_source = 9;
-
message CreateDatabaseConfig {
// The resource name of the instance on which the database is created.
// Format: instances/{instance}
@@ -140,4 +143,18 @@ message PlanConfig {
// Format: projects/{project}/releases/{release}/files/{id}
string file = 1;
}
+
+ message DeploymentSnapshot {
+ // The snapshot of the project deployment config at the time of creation.
+ DeploymentConfig deployment_config = 1;
+ repeated DatabaseGroupSnapshot database_group_snapshots = 2;
+
+ // The snapshot of the database group at the time of creation.
+ message DatabaseGroupSnapshot {
+ // Format: projects/{project}/databaseGroups/{databaseGroup}.
+ string database_group = 1;
+ // Format: instances/{instance-id}/databases/{database-name}.
+ repeated string databases = 2;
+ }
+ }
}