Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: no preview plan (#16289)
Danny Xude5f12ab2a8f
diff --git a/backend/api/v1/plan_service.go b/backend/api/v1/plan_service.goindex a322da49f9..5c4ed425d6 100644--- a/backend/api/v1/plan_service.go+++ b/backend/api/v1/plan_service.go@@ -2,7 +2,6 @@ package v1import ("context"- "fmt""log/slog""slices""strings"@@ -12,7 +11,6 @@ import (celast "github.com/google/cel-go/common/ast"celoperators "github.com/google/cel-go/common/operators""github.com/google/go-cmp/cmp"- "github.com/google/uuid""github.com/pkg/errors""google.golang.org/grpc/codes""google.golang.org/grpc/status"@@ -984,204 +982,6 @@ func (s *PlanService) getUserByIdentifier(ctx context.Context, identifier stringreturn user, nil}-// Deprecated.-func (s *PlanService) PreviewPlan(ctx context.Context, request *v1pb.PreviewPlanRequest) (*v1pb.PreviewPlanResponse, error) {- projectID, err := common.GetProjectID(request.Project)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, "failed to get project from %v, err: %v", request.Project, err)- }-- project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{ResourceID: &projectID})- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to get project, err: %v", err)- }-- _, releaseUID, err := common.GetProjectReleaseUID(request.Release)- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, "failed to get releaseUID from %q, err: %v", request.Release, err)- }- release, err := s.store.GetRelease(ctx, releaseUID)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to get release, err: %v", err)- }- if release == nil {- return nil, status.Errorf(codes.NotFound, "release %q not found", request.Release)- }-- allDatabases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &projectID})- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to list databases, err: %v", err)- }- allDatabasesByName := map[string]*store.DatabaseMessage{}-- for _, db := range allDatabases {- name := common.FormatDatabase(db.InstanceID, db.DatabaseName)- allDatabasesByName[name] = db- }-- var databaseTargets, databaseGroupTargets [][]string- for _, target := range request.Targets {- if instance, database, err := common.GetInstanceDatabaseID(target); err == nil {- databaseTargets = append(databaseTargets, []string{instance, database})- } else if projectID, databaseGroupID, err := common.GetProjectIDDatabaseGroupID(target); err == nil {- databaseGroupTargets = append(databaseGroupTargets, []string{projectID, databaseGroupID})- } else {- return nil, status.Errorf(codes.InvalidArgument, "unknown target %v", target)- }- }-- databasesToDeploy := map[string]bool{}-- for _, databaseTarget := range databaseTargets {- name := common.FormatDatabase(databaseTarget[0], databaseTarget[1])- databasesToDeploy[name] = true- }-- for _, databaseGroupTarget := range databaseGroupTargets {- projectID, databaseGroupID := databaseGroupTarget[0], databaseGroupTarget[1]- if projectID != project.ResourceID {- return nil, status.Errorf(codes.InvalidArgument, "databaseGroup target projectID %q doesn't match the projectID of request.project %q", projectID, request.Project)- }-- databaseGroup, err := s.store.GetDatabaseGroup(ctx, &store.FindDatabaseGroupMessage{ProjectID: &project.ResourceID, ResourceID: &databaseGroupID})- if err != nil {- return nil, errors.Wrapf(err, "failed to get database group %q", databaseGroupID)- }- if databaseGroup == nil {- return nil, errors.Errorf("database group %q not found", databaseGroupID)- }- matchedDatabases, _, err := utils.GetMatchedAndUnmatchedDatabasesInDatabaseGroup(ctx, databaseGroup, allDatabases)- if err != nil {- return nil, errors.Wrapf(err, "failed to find matched databases")- }- for _, db := range matchedDatabases {- name := common.FormatDatabase(db.InstanceID, db.DatabaseName)- databasesToDeploy[name] = true- }- }-- response := &v1pb.PreviewPlanResponse{}-- var allSpecs []*v1pb.Plan_Spec- for database := range databasesToDeploy {- db, ok := allDatabasesByName[database]- if !ok {- continue- }- specs, ooo, abm, err := s.getSpecsForDatabase(ctx, db, release, request.Release, request.AllowOutOfOrder)- if err != nil {- return nil, status.Errorf(codes.Internal, "failed to get specs for database, err: %v", err)- }- if len(ooo.Files) > 0 {- response.OutOfOrderFiles = append(response.OutOfOrderFiles, ooo)- }- if len(abm.Files) > 0 {- response.AppliedButModifiedFiles = append(response.AppliedButModifiedFiles, abm)- }- allSpecs = append(allSpecs, specs...)- }-- response.Plan = &v1pb.Plan{- Title: fmt.Sprintf("Preview plan for release %q", request.Release),- Steps: []*v1pb.Plan_Step{- {- Title: "",- Specs: allSpecs,- },- },- }-- return response, nil-}--func (s *PlanService) getSpecsForDatabase(ctx context.Context, database *store.DatabaseMessage, release *store.ReleaseMessage, releaseName string, allowOoo bool) ([]*v1pb.Plan_Spec, *v1pb.PreviewPlanResponse_DatabaseFiles, *v1pb.PreviewPlanResponse_DatabaseFiles, error) {- revisions, err := s.store.ListRevisions(ctx, &store.FindRevisionMessage{InstanceID: &database.InstanceID, DatabaseName: &database.DatabaseName})- if err != nil {- return nil, nil, nil, errors.Wrapf(err, "failed to list revisions")- }- return getSpecs(database, revisions, release, releaseName, allowOoo)-}--func getSpecs(database *store.DatabaseMessage, revisions []*store.RevisionMessage, release *store.ReleaseMessage, releaseName string, allowOoo bool) ([]*v1pb.Plan_Spec, *v1pb.PreviewPlanResponse_DatabaseFiles, *v1pb.PreviewPlanResponse_DatabaseFiles, error) {- var specs []*v1pb.Plan_Spec- var outOfOrderFiles []string- var modifiedFiles []string-- var lastVersion string- revisionByVersion := map[string]*store.RevisionMessage{}-- for _, r := range revisions {- if lastVersion == "" {- lastVersion = r.Version- } else if lastVersion < r.Version {- lastVersion = r.Version- }- revisionByVersion[r.Version] = r- }-- for _, file := range release.Payload.Files {- r, ok := revisionByVersion[file.Version]- if ok {- // applied, so we will not deploy it.- if r.Payload.SheetSha256 != file.SheetSha256 {- // It's been modified! warn users.- modifiedFiles = append(modifiedFiles, common.FormatReleaseFile(releaseName, file.Id))- }- continue- }-- if lastVersion != "" && lastVersion >= file.Version {- // out of order detected- outOfOrderFiles = append(outOfOrderFiles, common.FormatReleaseFile(releaseName, file.Id))-- // allowOutOfOrder=false- // continue so that we don't add it into the plan.- if !allowOoo {- continue- }- }-- spec := &v1pb.Plan_Spec{- Id: uuid.NewString(),- Config: &v1pb.Plan_Spec_ChangeDatabaseConfig{- ChangeDatabaseConfig: &v1pb.Plan_ChangeDatabaseConfig{- Type: convertReleaseFileChangeTypeToPlanSpecType(file.ChangeType),- Target: common.FormatDatabase(database.InstanceID, database.DatabaseName),- Sheet: file.Sheet,- Release: common.FormatReleaseName(release.ProjectID, release.UID),- },- },- }- specs = append(specs, spec)- }-- return specs,- &v1pb.PreviewPlanResponse_DatabaseFiles{- Database: common.FormatDatabase(database.InstanceID, database.DatabaseName),- Files: outOfOrderFiles,- },- &v1pb.PreviewPlanResponse_DatabaseFiles{- Database: common.FormatDatabase(database.InstanceID, database.DatabaseName),- Files: modifiedFiles,- },- nil-}--func convertReleaseFileChangeTypeToPlanSpecType(t storepb.ReleasePayload_File_ChangeType) v1pb.Plan_ChangeDatabaseConfig_Type {- switch t {- case storepb.ReleasePayload_File_CHANGE_TYPE_UNSPECIFIED:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE- case storepb.ReleasePayload_File_DDL:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE- case storepb.ReleasePayload_File_DDL_GHOST:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE_GHOST- case storepb.ReleasePayload_File_DML:- return v1pb.Plan_ChangeDatabaseConfig_DATA- default:- return v1pb.Plan_ChangeDatabaseConfig_MIGRATE- }-}-// diffSpecs check if there are any specs removed, added or updated in the new plan.// Only updating sheet is taken into account.func diffSpecsDirectly(oldSpecs []*v1pb.Plan_Spec, newSpecs []*v1pb.Plan_Spec) ([]*v1pb.Plan_Spec, []*v1pb.Plan_Spec, []*v1pb.Plan_Spec) {diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vueindex f033e00b58..3d8b2b8e5c 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue@@ -3,38 +3,11 @@<DrawerContent :title="$t('changelist.apply-to-database')"><template #default><div class="w-[calc(100vw-8rem)] lg:w-[60rem] max-w-[calc(100vw-8rem)]">- <StepTab- :step-list="stepList"- :current-index="state.currentStep"- :show-footer="false"- >- <template #0>- <DatabaseAndGroupSelector- :project="project"- :database-select-state="state.targetSelectState"- @update="handleTargetChange"- />- </template>- <template #1>- <div- v-if="!isRequesting && state.previewPlanResult"- class="space-y-4"- >- <PreviewPlanDetail- :release="release"- :preview-plan-result="state.previewPlanResult"- :database-select-state="state.targetSelectState"- :allow-out-of-order="state.allowOutOfOrder"- />- </div>- <div- v-else- class="flex items-center justify-center py-4 text-gray-400 text-sm"- >- <BBSpin />- </div>- </template>- </StepTab>+ <DatabaseAndGroupSelector+ :project="project"+ :database-select-state="state.targetSelectState"+ @update="handleTargetChange"+ /></div></template>@@ -43,7 +16,6 @@<div><divv-if="- state.currentStep === 0 &&state.targetSelectState?.changeSource === 'DATABASE' &&state.targetSelectState?.selectedDatabaseNameList.length > 0"@@ -58,28 +30,18 @@</div><div class="flex items-center justify-end gap-x-3">- <NCheckbox- v-if="state.currentStep === 1"- v-model:checked="state.allowOutOfOrder"- >- {{ $t("release.allow-out-of-order") }}- </NCheckbox>- <NButton quaternary @click.prevent="handleCancelClick">- {{- state.currentStep === 0- ? $t("common.cancel")- : $t("common.back")- }}+ <NButton quaternary @click.prevent="emit('close')">+ {{ $t("common.cancel") }}</NButton><ErrorTipsButtonstyle="--n-padding: 0 10px"- :errors="nextButtonErrors"+ :errors="createButtonErrors":button-props="{type: 'primary',}"- @click="handleClickNext"+ @click="handleCreate">- {{ $t("common.next") }}+ {{ $t("common.create") }}</ErrorTipsButton></div></div>@@ -89,31 +51,23 @@</template><script lang="ts" setup>-import { NButton, NCheckbox } from "naive-ui";-import { computed, reactive, ref, watch } from "vue";-import { useI18n } from "vue-i18n";+import { NButton } from "naive-ui";+import { computed, reactive } from "vue";import { useRouter } from "vue-router";-import { BBSpin } from "@/bbkit";import DatabaseAndGroupSelector, {type DatabaseSelectState,} from "@/components/DatabaseAndGroupSelector/";import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import { StepTab } from "@/components/v2";import { planServiceClient } from "@/grpcweb";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import { useDatabaseV1Store, useDBGroupStore } from "@/store";import { DatabaseGroup } from "@/types/proto/v1/database_group_service";-import {- PreviewPlanResponse,- type Plan_Spec,-} from "@/types/proto/v1/plan_service";import {extractProjectResourceName,generateIssueTitle,issueV1Slug,} from "@/utils";import { useReleaseDetailContext } from "../context";-import PreviewPlanDetail from "./PreviewPlanDetail.vue";import { createIssueFromPlan } from "./utils";const emit = defineEmits<{@@ -121,52 +75,26 @@ const emit = defineEmits<{}>();type LocalState = {- currentStep: number;- allowOutOfOrder: boolean;targetSelectState?: DatabaseSelectState;- previewPlanResult?: PreviewPlanResponse;};-const { t } = useI18n();const router = useRouter();const databaseStore = useDatabaseV1Store();const dbGroupStore = useDBGroupStore();const { release, project } = useReleaseDetailContext();-const isRequesting = ref(false);-const state = reactive<LocalState>({- currentStep: 0,- allowOutOfOrder: false,-});+const state = reactive<LocalState>({});-const stepList = computed(() => [- { title: t("database.sync-schema.select-target-databases") },- { title: t("common.preview") },-]);--const specList = computed((): Plan_Spec[] => {- return state.previewPlanResult?.plan?.specs || [];-});--const nextButtonErrors = computed(() => {+const createButtonErrors = computed(() => {const errors: string[] = [];- if (state.currentStep === 0) {- if (- !state.targetSelectState ||- (state.targetSelectState.changeSource === "DATABASE" &&- state.targetSelectState.selectedDatabaseNameList.length === 0) ||- (state.targetSelectState.changeSource === "GROUP" &&- !state.targetSelectState.selectedDatabaseGroup)- ) {- errors.push("Please select at least one database");- }- } else if (state.currentStep === 1) {- if (!state.previewPlanResult) {- errors.push("Failed to preview plan");- }- if (specList.value.length === 0) {- errors.push("No plan to apply");- }+ if (+ !state.targetSelectState ||+ (state.targetSelectState.changeSource === "DATABASE" &&+ state.targetSelectState.selectedDatabaseNameList.length === 0) ||+ (state.targetSelectState.changeSource === "GROUP" &&+ !state.targetSelectState.selectedDatabaseGroup)+ ) {+ errors.push("Please select at least one database");}return errors;});@@ -175,81 +103,55 @@ const handleTargetChange = (databaseSelectState: DatabaseSelectState) => {state.targetSelectState = databaseSelectState;};-const handleCancelClick = () => {- if (state.currentStep === 0) {- emit("close");- } else {- state.currentStep = 0;- state.previewPlanResult = undefined;- }-};--const handleClickNext = async () => {- if (state.currentStep === 0) {- await previewPlan();- } else if (state.currentStep === 1) {- if (!state.targetSelectState || !state.previewPlanResult) {- return;- }- const databaseList = state.targetSelectState.selectedDatabaseNameList.map(- (name) => databaseStore.getDatabaseByName(name)- );- const databaseGroup = DatabaseGroup.fromPartial({- ...dbGroupStore.getDBGroupByName(- state.targetSelectState.selectedDatabaseGroup || ""- ),- });- const createdPlan = await planServiceClient.createPlan({- parent: project.value.name,- plan: state.previewPlanResult.plan,- });- const createdIssue = await createIssueFromPlan(project.value.name, {- ...createdPlan,- // Override title and description.- title: generateIssueTitle(- "bb.issue.database.schema.update",- state.targetSelectState.changeSource === "DATABASE"- ? databaseList.map((db) => db.databaseName)- : [databaseGroup?.title]- ),- description: `Apply release "${release.value.title}"`,- });- router.push({- name: PROJECT_V1_ROUTE_ISSUE_DETAIL,- params: {- projectId: extractProjectResourceName(release.value.project),- issueSlug: issueV1Slug(createdIssue),- },- });- }-};--const previewPlan = async () => {+const handleCreate = async () => {if (!state.targetSelectState) {return;}- isRequesting.value = true;- const resp = await planServiceClient.previewPlan({- project: project.value.name,- release: release.value.name,- targets:+ const databaseList = state.targetSelectState.selectedDatabaseNameList.map(+ (name) => databaseStore.getDatabaseByName(name)+ );+ const databaseGroup = DatabaseGroup.fromPartial({+ ...dbGroupStore.getDBGroupByName(+ state.targetSelectState.selectedDatabaseGroup || ""+ ),+ });+ const createdPlan = await planServiceClient.createPlan({+ parent: project.value.name,+ plan: {+ title: `Release "${release.value.title}"`,+ description: `Apply release "${release.value.title}" to selected databases.`,+ specs: [+ {+ id: crypto.randomUUID(),+ changeDatabaseConfig: {+ targets: (state.targetSelectState.changeSource === "DATABASE"+ ? state.targetSelectState.selectedDatabaseNameList+ : [state.targetSelectState.selectedDatabaseGroup!]) || [],+ release: release.value.name,+ },+ }+ ],+ },+ });+ const createdIssue = await createIssueFromPlan(project.value.name, {+ ...createdPlan,+ // Override title and description.+ title: generateIssueTitle(+ "bb.issue.database.schema.update",state.targetSelectState.changeSource === "DATABASE"- ? state.targetSelectState.selectedDatabaseNameList- : [state.targetSelectState.selectedDatabaseGroup!],- allowOutOfOrder: state.allowOutOfOrder,+ ? databaseList.map((db) => db.databaseName)+ : [databaseGroup?.title]+ ),+ description: `Apply release "${release.value.title}"`,+ });+ router.push({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL,+ params: {+ projectId: extractProjectResourceName(release.value.project),+ issueSlug: issueV1Slug(createdIssue),+ },});- state.previewPlanResult = resp;- state.currentStep = 1;- isRequesting.value = false;};-watch(- () => state.allowOutOfOrder,- async () => {- if (state.currentStep === 1) {- await previewPlan();- }- }-);-</script>+</script>\ No newline at end of filediff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vuedeleted file mode 100644index 960a2ff21d..0000000000--- a/frontend/src/components/Release/ReleaseDetail/NavBar/PreviewPlanDetail.vue+++ /dev/null@@ -1,153 +0,0 @@-<template>- <NAlert v-if="shouldShowAppliedAlert" type="info">{{- $t(- "release.messages.bytebase-will-skip-those-files-has-been-applied-on-target-database"- )- }}</NAlert>- <div class="w-full flex flex-row flex-wrap gap-2">- <p class="w-full">- {{ $t("release.tasks-to-apply") }}- </p>- </div>- <div v-if="previewPlanResult.outOfOrderFiles.length > 0 && !allowOutOfOrder">- <p>- {{ $t("release.out-of-order-files") }}- </p>- <NTable class="mt-2" size="small">- <thead>- <tr>- <th class="w-64">- {{ $t("common.database") }}- </th>- <th>{{ $t("release.files") }}</th>- </tr>- </thead>- <tbody>- <tr- v-for="temp in previewPlanResult.outOfOrderFiles"- :key="temp.database"- >- <td>- <DatabaseView- class="text-sm"- :database="temp.database"- :link="false"- :show-not-found="true"- />- </td>- <td>- <div class="flex flex-row items-center gap-2">- <NTag- v-for="file in temp.files"- :key="file"- round- :size="'small'"- >- {{ getFileByName(file)?.version }}- </NTag>- </div>- </td>- </tr>- </tbody>- </NTable>- </div>- <div v-if="previewPlanResult.appliedButModifiedFiles.length > 0">- <p>- {{ $t("release.applied-but-modifed-files") }}- </p>- <NTable class="mt-2" size="small">- <thead>- <tr>- <th class="w-64">- {{ $t("common.database") }}- </th>- <th>{{ $t("release.files") }}</th>- </tr>- </thead>- <tbody>- <tr- v-for="temp in previewPlanResult.appliedButModifiedFiles"- :key="temp.database"- >- <td>- <DatabaseView- class="text-sm"- :database="temp.database"- :link="false"- :show-not-found="true"- />- </td>- <td>- <div class="flex flex-row items-center gap-2">- <NTag- v-for="file in temp.files"- :key="file"- round- :size="'small'"- >- {{ getFileByName(file)?.version }}- </NTag>- </div>- </td>- </tr>- </tbody>- </NTable>- </div>-</template>--<script lang="ts" setup>-import { NTag, NTable, NAlert } from "naive-ui";-import { computed } from "vue";-import type { DatabaseSelectState } from "@/components/DatabaseAndGroupSelector";-import DatabaseView from "@/components/v2/Model/DatabaseView.vue";-import { useDatabaseV1Store, useDBGroupStore } from "@/store";-import type { ComposedRelease } from "@/types";-import type {- Plan_Spec,- PreviewPlanResponse,-} from "@/types/proto/v1/plan_service";--const props = defineProps<{- release: ComposedRelease;- previewPlanResult: PreviewPlanResponse;- databaseSelectState?: DatabaseSelectState;- allowOutOfOrder?: boolean;-}>();--const databaseStore = useDatabaseV1Store();--const databaseGroupStore = useDBGroupStore();--const specList = computed((): Plan_Spec[] => {- return props.previewPlanResult.plan?.specs || [];-});--const targetDatabases = computed(() => {- if (!props.databaseSelectState) {- return [];- }- if (props.databaseSelectState.changeSource === "DATABASE") {- return props.databaseSelectState.selectedDatabaseNameList.map((name) =>- databaseStore.getDatabaseByName(name)- );- } else {- return (- databaseGroupStore.getDBGroupByName(- props.databaseSelectState.selectedDatabaseNameList[0]- )?.matchedDatabases || []- );- }-});--// Should show the alert when the number of files to apply is greater than the number of specs in the preview plan.-const shouldShowAppliedAlert = computed(() => {- return (- props.release.files.length * targetDatabases.value.length >- specList.value.length- );-});--const getFileByName = (name: string) => {- return props.release.files.find((file) => name.endsWith(`files/${file.id}`));-};-</script>diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 77afc7a986..3f1d7c78b4 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -2542,10 +2542,6 @@"files": "Files","create": "Create release","select": "Select release",- "tasks-to-apply": "Tasks to apply",- "out-of-order-files": "Out of order files",- "applied-but-modifed-files": "Applied but modified files",- "allow-out-of-order": "Allow out of order","archive-this-release": "Archive this release","total-files": "Total {count} files","actions": {@@ -2555,8 +2551,7 @@"messages": {"succeed-to-create-release": "Succeed to create release","files-will-always-be-sorted-and-executed-in-version-order": "The files will always be sorted and executed in version order.",- "cannot-modify-files-after-created": "You cannot modify files after the release is created.",- "bytebase-will-skip-those-files-has-been-applied-on-target-database": "Bytebase will automatically skip those files that have already been executed on the target database."+ "cannot-modify-files-after-created": "You cannot modify files after the release is created."},"usage-description": "The release is only used in custom GitOps with API integration."},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 22a305c5c7..168ec0f82a 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -2542,10 +2542,6 @@"files": "Archivos","create": "Crear lanzamiento","select": "Seleccionar versión",- "tasks-to-apply": "Tareas a aplicar",- "out-of-order-files": "Archivos fuera de servicio",- "applied-but-modifed-files": "Archivos aplicados pero modificados",- "allow-out-of-order": "Permitir fuera de servicio","archive-this-release": "Archivar este comunicado","total-files": "Total de {count} archivos","actions": {@@ -2555,8 +2551,7 @@"messages": {"succeed-to-create-release": "Tener éxito en crear el lanzamiento","files-will-always-be-sorted-and-executed-in-version-order": "Los archivos siempre se ordenarán y ejecutarán en orden de versión.",- "cannot-modify-files-after-created": "No es posible modificar archivos una vez creada la versión.",- "bytebase-will-skip-those-files-has-been-applied-on-target-database": "Bytebase omitirá automáticamente aquellos archivos que ya se hayan ejecutado en la base de datos de destino."+ "cannot-modify-files-after-created": "No es posible modificar archivos una vez creada la versión."},"usage-description": "El lanzamiento solo se utiliza en GitOps personalizado con integración de API."},diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 3a054b9637..02658595f1 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -2542,10 +2542,6 @@"files": "ファイル","create": "リリースを作成","select": "リリースを選択",- "tasks-to-apply": "適用するタスク",- "out-of-order-files": "順序が間違っているファイル",- "applied-but-modifed-files": "適用済みだが変更されたファイル",- "allow-out-of-order": "順序外を許可する","archive-this-release": "このリリースをアーカイブする","total-files": "合計 {count} ファイル","actions": {@@ -2555,8 +2551,7 @@"messages": {"succeed-to-create-release": "リリースの作成に成功","files-will-always-be-sorted-and-executed-in-version-order": "ファイルは常にバージョン順に並べ替えられ、実行されます。",- "cannot-modify-files-after-created": "リリースの作成後はファイルを変更できません。",- "bytebase-will-skip-those-files-has-been-applied-on-target-database": "Bytebase は、ターゲット データベースですでに実行されているファイルを自動的にスキップします。"+ "cannot-modify-files-after-created": "リリースの作成後はファイルを変更できません。"},"usage-description": "このリリースは、API統合を使用したカスタムGitOpsでのみ使用されます。"},diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 1e764996ce..442b292e78 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -2542,10 +2542,6 @@"files": "Tệp","create": "Tạo bản phát hành","select": "Chọn bản phát hành",- "tasks-to-apply": "Tác vụ để áp dụng",- "out-of-order-files": "Tệp không theo thứ tự",- "applied-but-modifed-files": "Đã áp dụng nhưng tệp đã sửa đổi",- "allow-out-of-order": "Cho phép không theo thứ tự","archive-this-release": "Lưu trữ bản phát hành này","total-files": "Tổng số {count} tệp","actions": {@@ -2555,8 +2551,7 @@"messages": {"succeed-to-create-release": "Đã tạo thành công bản phát hành","files-will-always-be-sorted-and-executed-in-version-order": "Các tệp sẽ luôn được sắp xếp và thực hiện theo thứ tự phiên bản.",- "cannot-modify-files-after-created": "Bạn không thể sửa đổi tệp sau khi bản phát hành được tạo.",- "bytebase-will-skip-those-files-has-been-applied-on-target-database": "Bytebase sẽ tự động bỏ qua những file đã được thực thi trên cơ sở dữ liệu đích."+ "cannot-modify-files-after-created": "Bạn không thể sửa đổi tệp sau khi bản phát hành được tạo."},"usage-description": "Bản phát hành chỉ được sử dụng trong GitOps tùy chỉnh với tích hợp API."},diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex bf1bf4d059..adce0c2376 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -2542,10 +2542,6 @@"files": "文件","create": "创建发布","select": "选择发布",- "tasks-to-apply": "待应用的任务",- "out-of-order-files": "无序文件",- "applied-but-modifed-files": "已应用但已修改的文件",- "allow-out-of-order": "允许无序文件","archive-this-release": "归档此发布","total-files": "共 {count} 个文件","actions": {@@ -2555,8 +2551,7 @@"messages": {"succeed-to-create-release": "成功创建发布","files-will-always-be-sorted-and-executed-in-version-order": "文件将始终按照版本顺序排序和执行。",- "cannot-modify-files-after-created": "发布创建后您无法修改文件。",- "bytebase-will-skip-those-files-has-been-applied-on-target-database": "Bytebase 将自动跳过那些已经在目标数据库上执行过的文件。"+ "cannot-modify-files-after-created": "发布创建后您无法修改文件。"},"usage-description": "发布包仅用于自定义的 GitOps 与 Bytebase API 集成。"},diff --git a/frontend/src/types/proto/v1/plan_service.ts b/frontend/src/types/proto/v1/plan_service.tsindex ad3dbaa595..1d6fc11214 100644--- a/frontend/src/types/proto/v1/plan_service.ts+++ b/frontend/src/types/proto/v1/plan_service.ts@@ -425,41 +425,6 @@ export interface BatchCancelPlanCheckRunsRequest {export interface BatchCancelPlanCheckRunsResponse {}-export interface PreviewPlanRequest {- /**- * The name of the project.- * Format: projects/{project}- */- project: string;- /** The release used for preview. */- release: string;- /**- * The targets to deploy.- * Can be database or databaseGroup.- * Format:- * projects/{project}/databaseGroups/{databaseGroup}- * instances/{instance}/databases/{database}- */- targets: string[];- allowOutOfOrder: boolean;-}--export interface PreviewPlanResponse {- plan:- | Plan- | undefined;- /** The out of order files of each database. */- outOfOrderFiles: PreviewPlanResponse_DatabaseFiles[];- /** The applied but modified files of each database. */- appliedButModifiedFiles: PreviewPlanResponse_DatabaseFiles[];-}--export interface PreviewPlanResponse_DatabaseFiles {- database: string;- /** Format: projects/{project}/releases/{release}/files/{file_id} */- files: string[];-}-export interface PlanCheckRun {/** Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun} */name: string;@@ -2790,262 +2755,6 @@ export const BatchCancelPlanCheckRunsResponse: MessageFns<BatchCancelPlanCheckRu},};-function createBasePreviewPlanRequest(): PreviewPlanRequest {- return { project: "", release: "", targets: [], allowOutOfOrder: false };-}--export const PreviewPlanRequest: MessageFns<PreviewPlanRequest> = {- encode(message: PreviewPlanRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.project !== "") {- writer.uint32(10).string(message.project);- }- if (message.release !== "") {- writer.uint32(18).string(message.release);- }- for (const v of message.targets) {- writer.uint32(26).string(v!);- }- if (message.allowOutOfOrder !== false) {- writer.uint32(32).bool(message.allowOutOfOrder);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): PreviewPlanRequest {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBasePreviewPlanRequest();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.project = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.release = reader.string();- continue;- }- case 3: {- if (tag !== 26) {- break;- }-- message.targets.push(reader.string());- continue;- }- case 4: {- if (tag !== 32) {- break;- }-- message.allowOutOfOrder = reader.bool();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: PreviewPlanRequest): unknown {- const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.release !== "") {- obj.release = message.release;- }- if (message.targets?.length) {- obj.targets = message.targets;- }- if (message.allowOutOfOrder !== false) {- obj.allowOutOfOrder = message.allowOutOfOrder;- }- return obj;- },-- create(base?: DeepPartial<PreviewPlanRequest>): PreviewPlanRequest {- return PreviewPlanRequest.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<PreviewPlanRequest>): PreviewPlanRequest {- const message = createBasePreviewPlanRequest();- message.project = object.project ?? "";- message.release = object.release ?? "";- message.targets = object.targets?.map((e) => e) || [];- message.allowOutOfOrder = object.allowOutOfOrder ?? false;- return message;- },-};--function createBasePreviewPlanResponse(): PreviewPlanResponse {- return { plan: undefined, outOfOrderFiles: [], appliedButModifiedFiles: [] };-}--export const PreviewPlanResponse: MessageFns<PreviewPlanResponse> = {- encode(message: PreviewPlanResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.plan !== undefined) {- Plan.encode(message.plan, writer.uint32(10).fork()).join();- }- for (const v of message.outOfOrderFiles) {- PreviewPlanResponse_DatabaseFiles.encode(v!, writer.uint32(18).fork()).join();- }- for (const v of message.appliedButModifiedFiles) {- PreviewPlanResponse_DatabaseFiles.encode(v!, writer.uint32(26).fork()).join();- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): PreviewPlanResponse {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBasePreviewPlanResponse();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.plan = Plan.decode(reader, reader.uint32());- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.outOfOrderFiles.push(PreviewPlanResponse_DatabaseFiles.decode(reader, reader.uint32()));- continue;- }- case 3: {- if (tag !== 26) {- break;- }-- message.appliedButModifiedFiles.push(PreviewPlanResponse_DatabaseFiles.decode(reader, reader.uint32()));- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: PreviewPlanResponse): unknown {- const obj: any = {};- if (message.plan !== undefined) {- obj.plan = Plan.toJSON(message.plan);- }- if (message.outOfOrderFiles?.length) {- obj.outOfOrderFiles = message.outOfOrderFiles.map((e) => PreviewPlanResponse_DatabaseFiles.toJSON(e));- }- if (message.appliedButModifiedFiles?.length) {- obj.appliedButModifiedFiles = message.appliedButModifiedFiles.map((e) =>- PreviewPlanResponse_DatabaseFiles.toJSON(e)- );- }- return obj;- },-- create(base?: DeepPartial<PreviewPlanResponse>): PreviewPlanResponse {- return PreviewPlanResponse.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<PreviewPlanResponse>): PreviewPlanResponse {- const message = createBasePreviewPlanResponse();- message.plan = (object.plan !== undefined && object.plan !== null) ? Plan.fromPartial(object.plan) : undefined;- message.outOfOrderFiles = object.outOfOrderFiles?.map((e) => PreviewPlanResponse_DatabaseFiles.fromPartial(e)) ||- [];- message.appliedButModifiedFiles =- object.appliedButModifiedFiles?.map((e) => PreviewPlanResponse_DatabaseFiles.fromPartial(e)) || [];- return message;- },-};--function createBasePreviewPlanResponse_DatabaseFiles(): PreviewPlanResponse_DatabaseFiles {- return { database: "", files: [] };-}--export const PreviewPlanResponse_DatabaseFiles: MessageFns<PreviewPlanResponse_DatabaseFiles> = {- encode(message: PreviewPlanResponse_DatabaseFiles, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.database !== "") {- writer.uint32(10).string(message.database);- }- for (const v of message.files) {- writer.uint32(18).string(v!);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): PreviewPlanResponse_DatabaseFiles {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBasePreviewPlanResponse_DatabaseFiles();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.database = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.files.push(reader.string());- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- toJSON(message: PreviewPlanResponse_DatabaseFiles): unknown {- const obj: any = {};- if (message.database !== "") {- obj.database = message.database;- }- if (message.files?.length) {- obj.files = message.files;- }- return obj;- },-- create(base?: DeepPartial<PreviewPlanResponse_DatabaseFiles>): PreviewPlanResponse_DatabaseFiles {- return PreviewPlanResponse_DatabaseFiles.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<PreviewPlanResponse_DatabaseFiles>): PreviewPlanResponse_DatabaseFiles {- const message = createBasePreviewPlanResponse_DatabaseFiles();- message.database = object.database ?? "";- message.files = object.files?.map((e) => e) || [];- return message;- },-};-function createBasePlanCheckRun(): PlanCheckRun {return {name: "",@@ -4121,65 +3830,6 @@ export const PlanServiceDefinition = {},},},- previewPlan: {- name: "PreviewPlan",- requestType: PreviewPlanRequest,- requestStream: false,- responseType: PreviewPlanResponse,- responseStream: false,- options: {- _unknownFields: {- 800010: [new Uint8Array([16, 98, 98, 46, 112, 108, 97, 110, 115, 46, 112, 114, 101, 118, 105, 101, 119])],- 800016: [new Uint8Array([1])],- 578365826: [- new Uint8Array([- 41,- 58,- 1,- 42,- 34,- 36,- 47,- 118,- 49,- 47,- 123,- 112,- 114,- 111,- 106,- 101,- 99,- 116,- 61,- 112,- 114,- 111,- 106,- 101,- 99,- 116,- 115,- 47,- 42,- 125,- 58,- 112,- 114,- 101,- 118,- 105,- 101,- 119,- 80,- 108,- 97,- 110,- ]),- ],- },- },- },},} as const;diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 11a5301c26..a800c1c70e 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -6134,37 +6134,6 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'- /v1/projects/{project}:previewPlan:- post:- tags:- - PlanService- operationId: PlanService_PreviewPlan- parameters:- - name: project- in: path- description: The project id.- required: true- schema:- type: string- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/PreviewPlanRequest'- required: true- responses:- "200":- description: OK- content:- application/json:- schema:- $ref: '#/components/schemas/PreviewPlanResponse'- default:- description: Default error response- content:- application/json:- schema:- $ref: '#/components/schemas/Status'/v1/projects/{project}:previewRollout:post:tags:@@ -11484,58 +11453,6 @@ components:expectedSchema:type: stringdescription: The expected SDL schema after normalizing.- PreviewPlanRequest:- required:- - project- - release- - targets- type: object- properties:- project:- type: string- description: |-- The name of the project.- Format: projects/{project}- release:- type: string- description: The release used for preview.- targets:- type: array- items:- type: string- description: |-- The targets to deploy.- Can be database or databaseGroup.- Format:- projects/{project}/databaseGroups/{databaseGroup}- instances/{instance}/databases/{database}- allowOutOfOrder:- type: boolean- PreviewPlanResponse:- type: object- properties:- plan:- $ref: '#/components/schemas/Plan'- outOfOrderFiles:- type: array- items:- $ref: '#/components/schemas/PreviewPlanResponse_DatabaseFiles'- description: The out of order files of each database.- appliedButModifiedFiles:- type: array- items:- $ref: '#/components/schemas/PreviewPlanResponse_DatabaseFiles'- description: The applied but modified files of each database.- PreviewPlanResponse_DatabaseFiles:- type: object- properties:- database:- type: string- files:- type: array- items:- type: string- description: 'Format: projects/{project}/releases/{release}/files/{file_id}'PreviewRolloutRequest:required:- projectdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex cbeee6be7e..5f625098e6 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -458,9 +458,6 @@- [PlanCheckRun.Result](#bytebase-v1-PlanCheckRun-Result)- [PlanCheckRun.Result.SqlReviewReport](#bytebase-v1-PlanCheckRun-Result-SqlReviewReport)- [PlanCheckRun.Result.SqlSummaryReport](#bytebase-v1-PlanCheckRun-Result-SqlSummaryReport)- - [PreviewPlanRequest](#bytebase-v1-PreviewPlanRequest)- - [PreviewPlanResponse](#bytebase-v1-PreviewPlanResponse)- - [PreviewPlanResponse.DatabaseFiles](#bytebase-v1-PreviewPlanResponse-DatabaseFiles)- [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest)- [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse)- [SearchPlansRequest](#bytebase-v1-SearchPlansRequest)@@ -7574,57 +7571,6 @@ When paginating, all other parameters provided to `ListPlans` must match the cal-<a name="bytebase-v1-PreviewPlanRequest"></a>--### PreviewPlanRequest----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| project | [string](#string) | | The name of the project. Format: projects/{project} |-| release | [string](#string) | | The release used for preview. |-| targets | [string](#string) | repeated | The targets to deploy. Can be database or databaseGroup. Format: projects/{project}/databaseGroups/{databaseGroup} instances/{instance}/databases/{database} |-| allow_out_of_order | [bool](#bool) | | |-------<a name="bytebase-v1-PreviewPlanResponse"></a>--### PreviewPlanResponse----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| plan | [Plan](#bytebase-v1-Plan) | | |-| out_of_order_files | [PreviewPlanResponse.DatabaseFiles](#bytebase-v1-PreviewPlanResponse-DatabaseFiles) | repeated | The out of order files of each database. |-| applied_but_modified_files | [PreviewPlanResponse.DatabaseFiles](#bytebase-v1-PreviewPlanResponse-DatabaseFiles) | repeated | The applied but modified files of each database. |-------<a name="bytebase-v1-PreviewPlanResponse-DatabaseFiles"></a>--### PreviewPlanResponse.DatabaseFiles----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| database | [string](#string) | | |-| files | [string](#string) | repeated | Format: projects/{project}/releases/{release}/files/{file_id} |------<a name="bytebase-v1-RunPlanChecksRequest"></a>### RunPlanChecksRequest@@ -7789,7 +7735,6 @@ Type is the database change type.| ListPlanCheckRuns | [ListPlanCheckRunsRequest](#bytebase-v1-ListPlanCheckRunsRequest) | [ListPlanCheckRunsResponse](#bytebase-v1-ListPlanCheckRunsResponse) | || RunPlanChecks | [RunPlanChecksRequest](#bytebase-v1-RunPlanChecksRequest) | [RunPlanChecksResponse](#bytebase-v1-RunPlanChecksResponse) | || BatchCancelPlanCheckRuns | [BatchCancelPlanCheckRunsRequest](#bytebase-v1-BatchCancelPlanCheckRunsRequest) | [BatchCancelPlanCheckRunsResponse](#bytebase-v1-BatchCancelPlanCheckRunsResponse) | |-| PreviewPlan | [PreviewPlanRequest](#bytebase-v1-PreviewPlanRequest) | [PreviewPlanResponse](#bytebase-v1-PreviewPlanResponse) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 6c19df2658..6dee86bea4 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1926,18 +1926,6 @@<a href="#bytebase.v1.PlanCheckRun.Result.SqlSummaryReport"><span class="badge">M</span>PlanCheckRun.Result.SqlSummaryReport</a></li>- <li>- <a href="#bytebase.v1.PreviewPlanRequest"><span class="badge">M</span>PreviewPlanRequest</a>- </li>-- <li>- <a href="#bytebase.v1.PreviewPlanResponse"><span class="badge">M</span>PreviewPlanResponse</a>- </li>-- <li>- <a href="#bytebase.v1.PreviewPlanResponse.DatabaseFiles"><span class="badge">M</span>PreviewPlanResponse.DatabaseFiles</a>- </li>-<li><a href="#bytebase.v1.RunPlanChecksRequest"><span class="badge">M</span>RunPlanChecksRequest</a></li>@@ -21089,125 +21077,6 @@ To supersede `line` and `column` above. </p></td>- <h3 id="bytebase.v1.PreviewPlanRequest">PreviewPlanRequest</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>project</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the project.-Format: projects/{project} </p></td>- </tr>-- <tr>- <td>release</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The release used for preview. </p></td>- </tr>-- <tr>- <td>targets</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The targets to deploy.-Can be database or databaseGroup.-Format:-projects/{project}/databaseGroups/{databaseGroup}-instances/{instance}/databases/{database} </p></td>- </tr>-- <tr>- <td>allow_out_of_order</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewPlanResponse">PreviewPlanResponse</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>plan</td>- <td><a href="#bytebase.v1.Plan">Plan</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>out_of_order_files</td>- <td><a href="#bytebase.v1.PreviewPlanResponse.DatabaseFiles">PreviewPlanResponse.DatabaseFiles</a></td>- <td>repeated</td>- <td><p>The out of order files of each database. </p></td>- </tr>-- <tr>- <td>applied_but_modified_files</td>- <td><a href="#bytebase.v1.PreviewPlanResponse.DatabaseFiles">PreviewPlanResponse.DatabaseFiles</a></td>- <td>repeated</td>- <td><p>The applied but modified files of each database. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.v1.PreviewPlanResponse.DatabaseFiles">PreviewPlanResponse.DatabaseFiles</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>database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>files</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Format: projects/{project}/releases/{release}/files/{file_id} </p></td>- </tr>-- </tbody>- </table>-----<h3 id="bytebase.v1.RunPlanChecksRequest">RunPlanChecksRequest</h3><p></p>@@ -21606,13 +21475,6 @@ The plan creator and the user with bb.plans.update permission on the project can<td><p></p></td></tr>- <tr>- <td>PreviewPlan</td>- <td><a href="#bytebase.v1.PreviewPlanRequest">PreviewPlanRequest</a></td>- <td><a href="#bytebase.v1.PreviewPlanResponse">PreviewPlanResponse</a></td>- <td><p></p></td>- </tr>-</tbody></table>@@ -21711,16 +21573,6 @@ The plan creator and the user with bb.plans.update permission on the project can</tr>--- <tr>- <td>PreviewPlan</td>- <td>POST</td>- <td>/v1/{project=projects/*}:previewPlan</td>- <td>*</td>- </tr>--</tbody></table>diff --git a/proto/generated-go/v1/plan_service.pb.go b/proto/generated-go/v1/plan_service.pb.goindex 4c69f34537..084447cff7 100644--- a/proto/generated-go/v1/plan_service.pb.go+++ b/proto/generated-go/v1/plan_service.pb.go@@ -139,7 +139,7 @@ func (x PlanCheckRun_Type) Number() protoreflect.EnumNumber {// Deprecated: Use PlanCheckRun_Type.Descriptor instead.func (PlanCheckRun_Type) EnumDescriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 0}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0}}type PlanCheckRun_Status int32@@ -194,7 +194,7 @@ func (x PlanCheckRun_Status) Number() protoreflect.EnumNumber {// Deprecated: Use PlanCheckRun_Status.Descriptor instead.func (PlanCheckRun_Status) EnumDescriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 1}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 1}}type PlanCheckRun_Result_Status int32@@ -246,7 +246,7 @@ func (x PlanCheckRun_Result_Status) Number() protoreflect.EnumNumber {// Deprecated: Use PlanCheckRun_Result_Status.Descriptor instead.func (PlanCheckRun_Result_Status) EnumDescriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 0, 0}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0, 0}}type GetPlanRequest struct {@@ -1130,144 +1130,6 @@ func (*BatchCancelPlanCheckRunsResponse) Descriptor() ([]byte, []int) {return file_v1_plan_service_proto_rawDescGZIP(), []int{13}}-type PreviewPlanRequest struct {- state protoimpl.MessageState `protogen:"open.v1"`- // The name of the project.- // Format: projects/{project}- Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`- // The release used for preview.- Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release,omitempty"`- // The targets to deploy.- // Can be database or databaseGroup.- // Format:- // projects/{project}/databaseGroups/{databaseGroup}- // instances/{instance}/databases/{database}- Targets []string `protobuf:"bytes,3,rep,name=targets,proto3" json:"targets,omitempty"`- AllowOutOfOrder bool `protobuf:"varint,4,opt,name=allow_out_of_order,json=allowOutOfOrder,proto3" json:"allow_out_of_order,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *PreviewPlanRequest) Reset() {- *x = PreviewPlanRequest{}- mi := &file_v1_plan_service_proto_msgTypes[14]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *PreviewPlanRequest) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*PreviewPlanRequest) ProtoMessage() {}--func (x *PreviewPlanRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[14]- 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 PreviewPlanRequest.ProtoReflect.Descriptor instead.-func (*PreviewPlanRequest) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{14}-}--func (x *PreviewPlanRequest) GetProject() string {- if x != nil {- return x.Project- }- return ""-}--func (x *PreviewPlanRequest) GetRelease() string {- if x != nil {- return x.Release- }- return ""-}--func (x *PreviewPlanRequest) GetTargets() []string {- if x != nil {- return x.Targets- }- return nil-}--func (x *PreviewPlanRequest) GetAllowOutOfOrder() bool {- if x != nil {- return x.AllowOutOfOrder- }- return false-}--type PreviewPlanResponse struct {- state protoimpl.MessageState `protogen:"open.v1"`- Plan *Plan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"`- // The out of order files of each database.- OutOfOrderFiles []*PreviewPlanResponse_DatabaseFiles `protobuf:"bytes,2,rep,name=out_of_order_files,json=outOfOrderFiles,proto3" json:"out_of_order_files,omitempty"`- // The applied but modified files of each database.- AppliedButModifiedFiles []*PreviewPlanResponse_DatabaseFiles `protobuf:"bytes,3,rep,name=applied_but_modified_files,json=appliedButModifiedFiles,proto3" json:"applied_but_modified_files,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *PreviewPlanResponse) Reset() {- *x = PreviewPlanResponse{}- mi := &file_v1_plan_service_proto_msgTypes[15]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *PreviewPlanResponse) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*PreviewPlanResponse) ProtoMessage() {}--func (x *PreviewPlanResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[15]- 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 PreviewPlanResponse.ProtoReflect.Descriptor instead.-func (*PreviewPlanResponse) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{15}-}--func (x *PreviewPlanResponse) GetPlan() *Plan {- if x != nil {- return x.Plan- }- return nil-}--func (x *PreviewPlanResponse) GetOutOfOrderFiles() []*PreviewPlanResponse_DatabaseFiles {- if x != nil {- return x.OutOfOrderFiles- }- return nil-}--func (x *PreviewPlanResponse) GetAppliedButModifiedFiles() []*PreviewPlanResponse_DatabaseFiles {- if x != nil {- return x.AppliedButModifiedFiles- }- return nil-}-type PlanCheckRun struct {state protoimpl.MessageState `protogen:"open.v1"`// Format: projects/{project}/plans/{plan}/planCheckRuns/{planCheckRun}@@ -1288,7 +1150,7 @@ type PlanCheckRun struct {func (x *PlanCheckRun) Reset() {*x = PlanCheckRun{}- mi := &file_v1_plan_service_proto_msgTypes[16]+ mi := &file_v1_plan_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1300,7 +1162,7 @@ func (x *PlanCheckRun) String() string {func (*PlanCheckRun) ProtoMessage() {}func (x *PlanCheckRun) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[16]+ mi := &file_v1_plan_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1313,7 +1175,7 @@ func (x *PlanCheckRun) ProtoReflect() protoreflect.Message {// Deprecated: Use PlanCheckRun.ProtoReflect.Descriptor instead.func (*PlanCheckRun) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14}}func (x *PlanCheckRun) GetName() string {@@ -1382,7 +1244,7 @@ type Plan_Step struct {func (x *Plan_Step) Reset() {*x = Plan_Step{}- mi := &file_v1_plan_service_proto_msgTypes[17]+ mi := &file_v1_plan_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1394,7 +1256,7 @@ func (x *Plan_Step) String() string {func (*Plan_Step) ProtoMessage() {}func (x *Plan_Step) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[17]+ mi := &file_v1_plan_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1440,7 +1302,7 @@ type Plan_Spec struct {func (x *Plan_Spec) Reset() {*x = Plan_Spec{}- mi := &file_v1_plan_service_proto_msgTypes[18]+ mi := &file_v1_plan_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1452,7 +1314,7 @@ func (x *Plan_Spec) String() string {func (*Plan_Spec) ProtoMessage() {}func (x *Plan_Spec) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[18]+ mi := &file_v1_plan_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1558,7 +1420,7 @@ type Plan_CreateDatabaseConfig struct {func (x *Plan_CreateDatabaseConfig) Reset() {*x = Plan_CreateDatabaseConfig{}- mi := &file_v1_plan_service_proto_msgTypes[20]+ mi := &file_v1_plan_service_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1570,7 +1432,7 @@ func (x *Plan_CreateDatabaseConfig) String() string {func (*Plan_CreateDatabaseConfig) ProtoMessage() {}func (x *Plan_CreateDatabaseConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[20]+ mi := &file_v1_plan_service_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1668,7 +1530,7 @@ type Plan_ChangeDatabaseConfig struct {func (x *Plan_ChangeDatabaseConfig) Reset() {*x = Plan_ChangeDatabaseConfig{}- mi := &file_v1_plan_service_proto_msgTypes[21]+ mi := &file_v1_plan_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1680,7 +1542,7 @@ func (x *Plan_ChangeDatabaseConfig) String() string {func (*Plan_ChangeDatabaseConfig) ProtoMessage() {}func (x *Plan_ChangeDatabaseConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[21]+ mi := &file_v1_plan_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1764,7 +1626,7 @@ type Plan_ExportDataConfig struct {func (x *Plan_ExportDataConfig) Reset() {*x = Plan_ExportDataConfig{}- mi := &file_v1_plan_service_proto_msgTypes[22]+ mi := &file_v1_plan_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1776,7 +1638,7 @@ func (x *Plan_ExportDataConfig) String() string {func (*Plan_ExportDataConfig) ProtoMessage() {}func (x *Plan_ExportDataConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[22]+ mi := &file_v1_plan_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1832,7 +1694,7 @@ type Plan_Deployment struct {func (x *Plan_Deployment) Reset() {*x = Plan_Deployment{}- mi := &file_v1_plan_service_proto_msgTypes[23]+ mi := &file_v1_plan_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1844,7 +1706,7 @@ func (x *Plan_Deployment) String() string {func (*Plan_Deployment) ProtoMessage() {}func (x *Plan_Deployment) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[23]+ mi := &file_v1_plan_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1885,7 +1747,7 @@ type Plan_ChangeDatabaseConfig_PreUpdateBackupDetail struct {func (x *Plan_ChangeDatabaseConfig_PreUpdateBackupDetail) Reset() {*x = Plan_ChangeDatabaseConfig_PreUpdateBackupDetail{}- mi := &file_v1_plan_service_proto_msgTypes[25]+ mi := &file_v1_plan_service_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1897,7 +1759,7 @@ func (x *Plan_ChangeDatabaseConfig_PreUpdateBackupDetail) String() string {func (*Plan_ChangeDatabaseConfig_PreUpdateBackupDetail) ProtoMessage() {}func (x *Plan_ChangeDatabaseConfig_PreUpdateBackupDetail) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[25]+ mi := &file_v1_plan_service_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1932,7 +1794,7 @@ type Plan_Deployment_DatabaseGroupMapping struct {func (x *Plan_Deployment_DatabaseGroupMapping) Reset() {*x = Plan_Deployment_DatabaseGroupMapping{}- mi := &file_v1_plan_service_proto_msgTypes[26]+ mi := &file_v1_plan_service_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1944,7 +1806,7 @@ func (x *Plan_Deployment_DatabaseGroupMapping) String() string {func (*Plan_Deployment_DatabaseGroupMapping) ProtoMessage() {}func (x *Plan_Deployment_DatabaseGroupMapping) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[26]+ mi := &file_v1_plan_service_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1974,59 +1836,6 @@ func (x *Plan_Deployment_DatabaseGroupMapping) GetDatabases() []string {return nil}-type PreviewPlanResponse_DatabaseFiles struct {- state protoimpl.MessageState `protogen:"open.v1"`- Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`- // Format: projects/{project}/releases/{release}/files/{file_id}- Files []string `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *PreviewPlanResponse_DatabaseFiles) Reset() {- *x = PreviewPlanResponse_DatabaseFiles{}- mi := &file_v1_plan_service_proto_msgTypes[27]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *PreviewPlanResponse_DatabaseFiles) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*PreviewPlanResponse_DatabaseFiles) ProtoMessage() {}--func (x *PreviewPlanResponse_DatabaseFiles) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[27]- 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 PreviewPlanResponse_DatabaseFiles.ProtoReflect.Descriptor instead.-func (*PreviewPlanResponse_DatabaseFiles) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{15, 0}-}--func (x *PreviewPlanResponse_DatabaseFiles) GetDatabase() string {- if x != nil {- return x.Database- }- return ""-}--func (x *PreviewPlanResponse_DatabaseFiles) GetFiles() []string {- if x != nil {- return x.Files- }- return nil-}-type PlanCheckRun_Result struct {state protoimpl.MessageState `protogen:"open.v1"`Status PlanCheckRun_Result_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.v1.PlanCheckRun_Result_Status" json:"status,omitempty"`@@ -2044,7 +1853,7 @@ type PlanCheckRun_Result struct {func (x *PlanCheckRun_Result) Reset() {*x = PlanCheckRun_Result{}- mi := &file_v1_plan_service_proto_msgTypes[28]+ mi := &file_v1_plan_service_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2056,7 +1865,7 @@ func (x *PlanCheckRun_Result) String() string {func (*PlanCheckRun_Result) ProtoMessage() {}func (x *PlanCheckRun_Result) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[28]+ mi := &file_v1_plan_service_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2069,7 +1878,7 @@ func (x *PlanCheckRun_Result) ProtoReflect() protoreflect.Message {// Deprecated: Use PlanCheckRun_Result.ProtoReflect.Descriptor instead.func (*PlanCheckRun_Result) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 0}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0}}func (x *PlanCheckRun_Result) GetStatus() PlanCheckRun_Result_Status {@@ -2153,7 +1962,7 @@ type PlanCheckRun_Result_SqlSummaryReport struct {func (x *PlanCheckRun_Result_SqlSummaryReport) Reset() {*x = PlanCheckRun_Result_SqlSummaryReport{}- mi := &file_v1_plan_service_proto_msgTypes[29]+ mi := &file_v1_plan_service_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2165,7 +1974,7 @@ func (x *PlanCheckRun_Result_SqlSummaryReport) String() string {func (*PlanCheckRun_Result_SqlSummaryReport) ProtoMessage() {}func (x *PlanCheckRun_Result_SqlSummaryReport) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[29]+ mi := &file_v1_plan_service_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2178,7 +1987,7 @@ func (x *PlanCheckRun_Result_SqlSummaryReport) ProtoReflect() protoreflect.Messa// Deprecated: Use PlanCheckRun_Result_SqlSummaryReport.ProtoReflect.Descriptor instead.func (*PlanCheckRun_Result_SqlSummaryReport) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 0, 0}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0, 0}}func (x *PlanCheckRun_Result_SqlSummaryReport) GetStatementTypes() []string {@@ -2216,7 +2025,7 @@ type PlanCheckRun_Result_SqlReviewReport struct {func (x *PlanCheckRun_Result_SqlReviewReport) Reset() {*x = PlanCheckRun_Result_SqlReviewReport{}- mi := &file_v1_plan_service_proto_msgTypes[30]+ mi := &file_v1_plan_service_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2228,7 +2037,7 @@ func (x *PlanCheckRun_Result_SqlReviewReport) String() string {func (*PlanCheckRun_Result_SqlReviewReport) ProtoMessage() {}func (x *PlanCheckRun_Result_SqlReviewReport) ProtoReflect() protoreflect.Message {- mi := &file_v1_plan_service_proto_msgTypes[30]+ mi := &file_v1_plan_service_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2241,7 +2050,7 @@ func (x *PlanCheckRun_Result_SqlReviewReport) ProtoReflect() protoreflect.Messag// Deprecated: Use PlanCheckRun_Result_SqlReviewReport.ProtoReflect.Descriptor instead.func (*PlanCheckRun_Result_SqlReviewReport) Descriptor() ([]byte, []int) {- return file_v1_plan_service_proto_rawDescGZIP(), []int{16, 0, 1}+ return file_v1_plan_service_proto_rawDescGZIP(), []int{14, 0, 1}}func (x *PlanCheckRun_Result_SqlReviewReport) GetLine() int32 {@@ -2400,21 +2209,7 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x06parent\x18\x01 \x01(\tB\x1a\xe2A\x01\x02\xfaA\x13\n" +"\x11bytebase.com/PlanR\x06parent\x12&\n" +"\x0fplan_check_runs\x18\x02 \x03(\tR\rplanCheckRuns\"\"\n" +- " BatchCancelPlanCheckRunsResponse\"\xd3\x01\n" +- "\x12PreviewPlanRequest\x127\n" +- "\aproject\x18\x01 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +- "\x14bytebase.com/ProjectR\aproject\x127\n" +- "\arelease\x18\x02 \x01(\tB\x1d\xe2A\x01\x02\xfaA\x16\n" +- "\x14bytebase.com/ReleaseR\arelease\x12\x1e\n" +- "\atargets\x18\x03 \x03(\tB\x04\xe2A\x01\x02R\atargets\x12+\n" +- "\x12allow_out_of_order\x18\x04 \x01(\bR\x0fallowOutOfOrder\"\xc9\x02\n" +- "\x13PreviewPlanResponse\x12%\n" +- "\x04plan\x18\x01 \x01(\v2\x11.bytebase.v1.PlanR\x04plan\x12[\n" +- "\x12out_of_order_files\x18\x02 \x03(\v2..bytebase.v1.PreviewPlanResponse.DatabaseFilesR\x0foutOfOrderFiles\x12k\n" +- "\x1aapplied_but_modified_files\x18\x03 \x03(\v2..bytebase.v1.PreviewPlanResponse.DatabaseFilesR\x17appliedButModifiedFiles\x1aA\n" +- "\rDatabaseFiles\x12\x1a\n" +- "\bdatabase\x18\x01 \x01(\tR\bdatabase\x12\x14\n" +- "\x05files\x18\x02 \x03(\tR\x05files\"\x81\v\n" ++ " BatchCancelPlanCheckRunsResponse\"\x81\v\n" +"\fPlanCheckRun\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x122\n" +"\x04type\x18\x03 \x01(\x0e2\x1e.bytebase.v1.PlanCheckRun.TypeR\x04type\x128\n" +@@ -2460,7 +2255,8 @@ const file_v1_plan_service_proto_rawDesc = "" +"\x04DONE\x10\x02\x12\n" +"\n" +"\x06FAILED\x10\x03\x12\f\n" +- "\bCANCELED\x10\x04J\x04\b\x02\x10\x032\xee\v\n" ++ "\bCANCELED\x10\x04J\x04\b\x02\x10\x032\xd2\n" ++ "\n" +"\vPlanService\x12{\n" +"\aGetPlan\x12\x1b.bytebase.v1.GetPlanRequest\x1a\x11.bytebase.v1.Plan\"@\xdaA\x04name\x8a\xea0\fbb.plans.get\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=projects/*/plans/*}\x12\x8f\x01\n" +"\tListPlans\x12\x1d.bytebase.v1.ListPlansRequest\x1a\x1e.bytebase.v1.ListPlansResponse\"C\xdaA\x06parent\x8a\xea0\rbb.plans.list\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=projects/*}/plans\x12\x9e\x01\n" +@@ -2471,8 +2267,7 @@ const file_v1_plan_service_proto_rawDesc = "" +"UpdatePlan\x12\x1e.bytebase.v1.UpdatePlanRequest\x1a\x11.bytebase.v1.Plan\"^\xdaA\x10plan,update_mask\x8a\xea0\x0fbb.plans.update\x90\xea0\x02\x98\xea0\x01\x82\xd3\xe4\x93\x02*:\x04plan2\"/v1/{plan.name=projects/*/plans/*}\x12\xbf\x01\n" +"\x11ListPlanCheckRuns\x12%.bytebase.v1.ListPlanCheckRunsRequest\x1a&.bytebase.v1.ListPlanCheckRunsResponse\"[\xdaA\x06parent\x8a\xea0\x15bb.planCheckRuns.list\x90\xea0\x01\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/plans/*}/planCheckRuns\x12\xb1\x01\n" +"\rRunPlanChecks\x12!.bytebase.v1.RunPlanChecksRequest\x1a\".bytebase.v1.RunPlanChecksResponse\"Y\xdaA\x04name\x8a\xea0\x14bb.planCheckRuns.run\x90\xea0\x01\x82\xd3\xe4\x93\x020:\x01*\"+/v1/{name=projects/*/plans/*}:runPlanChecks\x12\xe2\x01\n" +- "\x18BatchCancelPlanCheckRuns\x12,.bytebase.v1.BatchCancelPlanCheckRunsRequest\x1a-.bytebase.v1.BatchCancelPlanCheckRunsResponse\"i\xdaA\x06parent\x8a\xea0\x14bb.planCheckRuns.run\x90\xea0\x01\x82\xd3\xe4\x93\x02>:\x01*\"9/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancel\x12\x99\x01\n" +- "\vPreviewPlan\x12\x1f.bytebase.v1.PreviewPlanRequest\x1a .bytebase.v1.PreviewPlanResponse\"G\x8a\xea0\x10bb.plans.preview\x90\xea0\x01\x82\xd3\xe4\x93\x02):\x01*\"$/v1/{project=projects/*}:previewPlanB\x11Z\x0fgenerated-go/v1b\x06proto3"+ "\x18BatchCancelPlanCheckRuns\x12,.bytebase.v1.BatchCancelPlanCheckRunsRequest\x1a-.bytebase.v1.BatchCancelPlanCheckRunsResponse\"i\xdaA\x06parent\x8a\xea0\x14bb.planCheckRuns.run\x90\xea0\x01\x82\xd3\xe4\x93\x02>:\x01*\"9/v1/{parent=projects/*/plans/*}/planCheckRuns:batchCancelB\x11Z\x0fgenerated-go/v1b\x06proto3"var (file_v1_plan_service_proto_rawDescOnce sync.Once@@ -2487,7 +2282,7 @@ func file_v1_plan_service_proto_rawDescGZIP() []byte {}var file_v1_plan_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)-var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)+var file_v1_plan_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28)var file_v1_plan_service_proto_goTypes = []any{(Plan_ChangeDatabaseConfig_Type)(0), // 0: bytebase.v1.Plan.ChangeDatabaseConfig.Type(PlanCheckRun_Type)(0), // 1: bytebase.v1.PlanCheckRun.Type@@ -2507,87 +2302,79 @@ var file_v1_plan_service_proto_goTypes = []any{(*RunPlanChecksResponse)(nil), // 15: bytebase.v1.RunPlanChecksResponse(*BatchCancelPlanCheckRunsRequest)(nil), // 16: bytebase.v1.BatchCancelPlanCheckRunsRequest(*BatchCancelPlanCheckRunsResponse)(nil), // 17: bytebase.v1.BatchCancelPlanCheckRunsResponse- (*PreviewPlanRequest)(nil), // 18: bytebase.v1.PreviewPlanRequest- (*PreviewPlanResponse)(nil), // 19: bytebase.v1.PreviewPlanResponse- (*PlanCheckRun)(nil), // 20: bytebase.v1.PlanCheckRun- (*Plan_Step)(nil), // 21: bytebase.v1.Plan.Step- (*Plan_Spec)(nil), // 22: bytebase.v1.Plan.Spec- nil, // 23: bytebase.v1.Plan.PlanCheckRunStatusCountEntry- (*Plan_CreateDatabaseConfig)(nil), // 24: bytebase.v1.Plan.CreateDatabaseConfig- (*Plan_ChangeDatabaseConfig)(nil), // 25: bytebase.v1.Plan.ChangeDatabaseConfig- (*Plan_ExportDataConfig)(nil), // 26: bytebase.v1.Plan.ExportDataConfig- (*Plan_Deployment)(nil), // 27: bytebase.v1.Plan.Deployment- nil, // 28: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry- (*Plan_ChangeDatabaseConfig_PreUpdateBackupDetail)(nil), // 29: bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail- (*Plan_Deployment_DatabaseGroupMapping)(nil), // 30: bytebase.v1.Plan.Deployment.DatabaseGroupMapping- (*PreviewPlanResponse_DatabaseFiles)(nil), // 31: bytebase.v1.PreviewPlanResponse.DatabaseFiles- (*PlanCheckRun_Result)(nil), // 32: bytebase.v1.PlanCheckRun.Result- (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 33: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- (*PlanCheckRun_Result_SqlReviewReport)(nil), // 34: bytebase.v1.PlanCheckRun.Result.SqlReviewReport- (*fieldmaskpb.FieldMask)(nil), // 35: google.protobuf.FieldMask- (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp- (ExportFormat)(0), // 37: bytebase.v1.ExportFormat- (*ChangedResources)(nil), // 38: bytebase.v1.ChangedResources- (*Position)(nil), // 39: bytebase.v1.Position+ (*PlanCheckRun)(nil), // 18: bytebase.v1.PlanCheckRun+ (*Plan_Step)(nil), // 19: bytebase.v1.Plan.Step+ (*Plan_Spec)(nil), // 20: bytebase.v1.Plan.Spec+ nil, // 21: bytebase.v1.Plan.PlanCheckRunStatusCountEntry+ (*Plan_CreateDatabaseConfig)(nil), // 22: bytebase.v1.Plan.CreateDatabaseConfig+ (*Plan_ChangeDatabaseConfig)(nil), // 23: bytebase.v1.Plan.ChangeDatabaseConfig+ (*Plan_ExportDataConfig)(nil), // 24: bytebase.v1.Plan.ExportDataConfig+ (*Plan_Deployment)(nil), // 25: bytebase.v1.Plan.Deployment+ nil, // 26: bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry+ (*Plan_ChangeDatabaseConfig_PreUpdateBackupDetail)(nil), // 27: bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail+ (*Plan_Deployment_DatabaseGroupMapping)(nil), // 28: bytebase.v1.Plan.Deployment.DatabaseGroupMapping+ (*PlanCheckRun_Result)(nil), // 29: bytebase.v1.PlanCheckRun.Result+ (*PlanCheckRun_Result_SqlSummaryReport)(nil), // 30: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ (*PlanCheckRun_Result_SqlReviewReport)(nil), // 31: bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask+ (*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp+ (ExportFormat)(0), // 34: bytebase.v1.ExportFormat+ (*ChangedResources)(nil), // 35: bytebase.v1.ChangedResources+ (*Position)(nil), // 36: bytebase.v1.Position}var file_v1_plan_service_proto_depIdxs = []int32{11, // 0: bytebase.v1.ListPlansResponse.plans:type_name -> bytebase.v1.Plan11, // 1: bytebase.v1.SearchPlansResponse.plans:type_name -> bytebase.v1.Plan11, // 2: bytebase.v1.CreatePlanRequest.plan:type_name -> bytebase.v1.Plan11, // 3: bytebase.v1.UpdatePlanRequest.plan:type_name -> bytebase.v1.Plan- 35, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask- 21, // 5: bytebase.v1.Plan.steps:type_name -> bytebase.v1.Plan.Step- 22, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec- 36, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp- 36, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp- 23, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry- 27, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment- 20, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun- 11, // 12: bytebase.v1.PreviewPlanResponse.plan:type_name -> bytebase.v1.Plan- 31, // 13: bytebase.v1.PreviewPlanResponse.out_of_order_files:type_name -> bytebase.v1.PreviewPlanResponse.DatabaseFiles- 31, // 14: bytebase.v1.PreviewPlanResponse.applied_but_modified_files:type_name -> bytebase.v1.PreviewPlanResponse.DatabaseFiles- 1, // 15: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type- 2, // 16: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status- 32, // 17: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result- 36, // 18: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp- 22, // 19: bytebase.v1.Plan.Step.specs:type_name -> bytebase.v1.Plan.Spec- 24, // 20: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig- 25, // 21: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig- 26, // 22: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig- 0, // 23: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.Type- 28, // 24: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry- 29, // 25: bytebase.v1.Plan.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail- 37, // 26: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat- 30, // 27: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping- 3, // 28: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status- 33, // 29: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport- 34, // 30: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport- 38, // 31: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources- 39, // 32: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position- 39, // 33: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position- 4, // 34: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest- 5, // 35: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest- 7, // 36: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest- 9, // 37: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest- 10, // 38: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest- 12, // 39: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest- 14, // 40: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest- 16, // 41: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest- 18, // 42: bytebase.v1.PlanService.PreviewPlan:input_type -> bytebase.v1.PreviewPlanRequest- 11, // 43: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan- 6, // 44: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse- 8, // 45: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse- 11, // 46: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan- 11, // 47: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan- 13, // 48: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse- 15, // 49: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse- 17, // 50: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse- 19, // 51: bytebase.v1.PlanService.PreviewPlan:output_type -> bytebase.v1.PreviewPlanResponse- 43, // [43:52] is the sub-list for method output_type- 34, // [34:43] is the sub-list for method input_type- 34, // [34:34] is the sub-list for extension type_name- 34, // [34:34] is the sub-list for extension extendee- 0, // [0:34] is the sub-list for field type_name+ 32, // 4: bytebase.v1.UpdatePlanRequest.update_mask:type_name -> google.protobuf.FieldMask+ 19, // 5: bytebase.v1.Plan.steps:type_name -> bytebase.v1.Plan.Step+ 20, // 6: bytebase.v1.Plan.specs:type_name -> bytebase.v1.Plan.Spec+ 33, // 7: bytebase.v1.Plan.create_time:type_name -> google.protobuf.Timestamp+ 33, // 8: bytebase.v1.Plan.update_time:type_name -> google.protobuf.Timestamp+ 21, // 9: bytebase.v1.Plan.plan_check_run_status_count:type_name -> bytebase.v1.Plan.PlanCheckRunStatusCountEntry+ 25, // 10: bytebase.v1.Plan.deployment:type_name -> bytebase.v1.Plan.Deployment+ 18, // 11: bytebase.v1.ListPlanCheckRunsResponse.plan_check_runs:type_name -> bytebase.v1.PlanCheckRun+ 1, // 12: bytebase.v1.PlanCheckRun.type:type_name -> bytebase.v1.PlanCheckRun.Type+ 2, // 13: bytebase.v1.PlanCheckRun.status:type_name -> bytebase.v1.PlanCheckRun.Status+ 29, // 14: bytebase.v1.PlanCheckRun.results:type_name -> bytebase.v1.PlanCheckRun.Result+ 33, // 15: bytebase.v1.PlanCheckRun.create_time:type_name -> google.protobuf.Timestamp+ 20, // 16: bytebase.v1.Plan.Step.specs:type_name -> bytebase.v1.Plan.Spec+ 22, // 17: bytebase.v1.Plan.Spec.create_database_config:type_name -> bytebase.v1.Plan.CreateDatabaseConfig+ 23, // 18: bytebase.v1.Plan.Spec.change_database_config:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig+ 24, // 19: bytebase.v1.Plan.Spec.export_data_config:type_name -> bytebase.v1.Plan.ExportDataConfig+ 0, // 20: bytebase.v1.Plan.ChangeDatabaseConfig.type:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.Type+ 26, // 21: bytebase.v1.Plan.ChangeDatabaseConfig.ghost_flags:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.GhostFlagsEntry+ 27, // 22: bytebase.v1.Plan.ChangeDatabaseConfig.pre_update_backup_detail:type_name -> bytebase.v1.Plan.ChangeDatabaseConfig.PreUpdateBackupDetail+ 34, // 23: bytebase.v1.Plan.ExportDataConfig.format:type_name -> bytebase.v1.ExportFormat+ 28, // 24: bytebase.v1.Plan.Deployment.database_group_mappings:type_name -> bytebase.v1.Plan.Deployment.DatabaseGroupMapping+ 3, // 25: bytebase.v1.PlanCheckRun.Result.status:type_name -> bytebase.v1.PlanCheckRun.Result.Status+ 30, // 26: bytebase.v1.PlanCheckRun.Result.sql_summary_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlSummaryReport+ 31, // 27: bytebase.v1.PlanCheckRun.Result.sql_review_report:type_name -> bytebase.v1.PlanCheckRun.Result.SqlReviewReport+ 35, // 28: bytebase.v1.PlanCheckRun.Result.SqlSummaryReport.changed_resources:type_name -> bytebase.v1.ChangedResources+ 36, // 29: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.start_position:type_name -> bytebase.v1.Position+ 36, // 30: bytebase.v1.PlanCheckRun.Result.SqlReviewReport.end_position:type_name -> bytebase.v1.Position+ 4, // 31: bytebase.v1.PlanService.GetPlan:input_type -> bytebase.v1.GetPlanRequest+ 5, // 32: bytebase.v1.PlanService.ListPlans:input_type -> bytebase.v1.ListPlansRequest+ 7, // 33: bytebase.v1.PlanService.SearchPlans:input_type -> bytebase.v1.SearchPlansRequest+ 9, // 34: bytebase.v1.PlanService.CreatePlan:input_type -> bytebase.v1.CreatePlanRequest+ 10, // 35: bytebase.v1.PlanService.UpdatePlan:input_type -> bytebase.v1.UpdatePlanRequest+ 12, // 36: bytebase.v1.PlanService.ListPlanCheckRuns:input_type -> bytebase.v1.ListPlanCheckRunsRequest+ 14, // 37: bytebase.v1.PlanService.RunPlanChecks:input_type -> bytebase.v1.RunPlanChecksRequest+ 16, // 38: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:input_type -> bytebase.v1.BatchCancelPlanCheckRunsRequest+ 11, // 39: bytebase.v1.PlanService.GetPlan:output_type -> bytebase.v1.Plan+ 6, // 40: bytebase.v1.PlanService.ListPlans:output_type -> bytebase.v1.ListPlansResponse+ 8, // 41: bytebase.v1.PlanService.SearchPlans:output_type -> bytebase.v1.SearchPlansResponse+ 11, // 42: bytebase.v1.PlanService.CreatePlan:output_type -> bytebase.v1.Plan+ 11, // 43: bytebase.v1.PlanService.UpdatePlan:output_type -> bytebase.v1.Plan+ 13, // 44: bytebase.v1.PlanService.ListPlanCheckRuns:output_type -> bytebase.v1.ListPlanCheckRunsResponse+ 15, // 45: bytebase.v1.PlanService.RunPlanChecks:output_type -> bytebase.v1.RunPlanChecksResponse+ 17, // 46: bytebase.v1.PlanService.BatchCancelPlanCheckRuns:output_type -> bytebase.v1.BatchCancelPlanCheckRunsResponse+ 39, // [39:47] is the sub-list for method output_type+ 31, // [31:39] is the sub-list for method input_type+ 31, // [31:31] is the sub-list for extension type_name+ 31, // [31:31] is the sub-list for extension extendee+ 0, // [0:31] is the sub-list for field type_name}func init() { file_v1_plan_service_proto_init() }@@ -2598,14 +2385,14 @@ func file_v1_plan_service_proto_init() {file_v1_annotation_proto_init()file_v1_common_proto_init()file_v1_database_service_proto_init()- file_v1_plan_service_proto_msgTypes[18].OneofWrappers = []any{+ file_v1_plan_service_proto_msgTypes[16].OneofWrappers = []any{(*Plan_Spec_CreateDatabaseConfig)(nil),(*Plan_Spec_ChangeDatabaseConfig)(nil),(*Plan_Spec_ExportDataConfig)(nil),}- file_v1_plan_service_proto_msgTypes[21].OneofWrappers = []any{}- file_v1_plan_service_proto_msgTypes[22].OneofWrappers = []any{}- file_v1_plan_service_proto_msgTypes[28].OneofWrappers = []any{+ file_v1_plan_service_proto_msgTypes[19].OneofWrappers = []any{}+ file_v1_plan_service_proto_msgTypes[20].OneofWrappers = []any{}+ file_v1_plan_service_proto_msgTypes[25].OneofWrappers = []any{(*PlanCheckRun_Result_SqlSummaryReport_)(nil),(*PlanCheckRun_Result_SqlReviewReport_)(nil),}@@ -2615,7 +2402,7 @@ func file_v1_plan_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_plan_service_proto_rawDesc), len(file_v1_plan_service_proto_rawDesc)),NumEnums: 4,- NumMessages: 31,+ NumMessages: 28,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/plan_service.pb.gw.go b/proto/generated-go/v1/plan_service.pb.gw.goindex 680af4d753..00a9befa94 100644--- a/proto/generated-go/v1/plan_service.pb.gw.go+++ b/proto/generated-go/v1/plan_service.pb.gw.go@@ -420,48 +420,6 @@ func local_request_PlanService_BatchCancelPlanCheckRuns_0(ctx context.Context, mreturn msg, metadata, err}-func request_PlanService_PreviewPlan_0(ctx context.Context, marshaler runtime.Marshaler, client PlanServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq PreviewPlanRequest- metadata runtime.ServerMetadata- err error- )- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- val, ok := pathParams["project"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project")- }- protoReq.Project, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err)- }- msg, err := client.PreviewPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))- return msg, metadata, err-}--func local_request_PlanService_PreviewPlan_0(ctx context.Context, marshaler runtime.Marshaler, server PlanServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {- var (- protoReq PreviewPlanRequest- metadata runtime.ServerMetadata- err error- )- if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- val, ok := pathParams["project"]- if !ok {- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project")- }- protoReq.Project, err = runtime.String(val)- if err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err)- }- msg, err := server.PreviewPlan(ctx, &protoReq)- return msg, metadata, err-}-// RegisterPlanServiceHandlerServer registers the http handlers for service PlanService to "mux".// UnaryRPC :call PlanServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -628,26 +586,6 @@ func RegisterPlanServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux}forward_PlanService_BatchCancelPlanCheckRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodPost, pattern_PlanService_PreviewPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- var stream runtime.ServerTransportStream- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.PlanService/PreviewPlan", runtime.WithHTTPPathPattern("/v1/{project=projects/*}:previewPlan"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := local_request_PlanService_PreviewPlan_0(annotatedContext, inboundMarshaler, server, req, pathParams)- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_PlanService_PreviewPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })return nil}@@ -824,23 +762,6 @@ func RegisterPlanServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux}forward_PlanService_BatchCancelPlanCheckRuns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})- mux.Handle(http.MethodPost, pattern_PlanService_PreviewPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {- ctx, cancel := context.WithCancel(req.Context())- defer cancel()- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)- annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.PlanService/PreviewPlan", runtime.WithHTTPPathPattern("/v1/{project=projects/*}:previewPlan"))- if err != nil {- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)- return- }- resp, md, err := request_PlanService_PreviewPlan_0(annotatedContext, inboundMarshaler, client, req, pathParams)- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)- if err != nil {- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)- return- }- forward_PlanService_PreviewPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)- })return nil}@@ -853,7 +774,6 @@ var (pattern_PlanService_ListPlanCheckRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "plans", "parent", "planCheckRuns"}, ""))pattern_PlanService_RunPlanChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "plans", "name"}, "runPlanChecks"))pattern_PlanService_BatchCancelPlanCheckRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "plans", "parent", "planCheckRuns"}, "batchCancel"))- pattern_PlanService_PreviewPlan_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "projects", "project"}, "previewPlan")))var (@@ -865,5 +785,4 @@ var (forward_PlanService_ListPlanCheckRuns_0 = runtime.ForwardResponseMessageforward_PlanService_RunPlanChecks_0 = runtime.ForwardResponseMessageforward_PlanService_BatchCancelPlanCheckRuns_0 = runtime.ForwardResponseMessage- forward_PlanService_PreviewPlan_0 = runtime.ForwardResponseMessage)diff --git a/proto/generated-go/v1/plan_service_grpc.pb.go b/proto/generated-go/v1/plan_service_grpc.pb.goindex 792554c81f..531e4b976e 100644--- a/proto/generated-go/v1/plan_service_grpc.pb.go+++ b/proto/generated-go/v1/plan_service_grpc.pb.go@@ -27,7 +27,6 @@ const (PlanService_ListPlanCheckRuns_FullMethodName = "/bytebase.v1.PlanService/ListPlanCheckRuns"PlanService_RunPlanChecks_FullMethodName = "/bytebase.v1.PlanService/RunPlanChecks"PlanService_BatchCancelPlanCheckRuns_FullMethodName = "/bytebase.v1.PlanService/BatchCancelPlanCheckRuns"- PlanService_PreviewPlan_FullMethodName = "/bytebase.v1.PlanService/PreviewPlan")// PlanServiceClient is the client API for PlanService service.@@ -45,7 +44,6 @@ type PlanServiceClient interface {ListPlanCheckRuns(ctx context.Context, in *ListPlanCheckRunsRequest, opts ...grpc.CallOption) (*ListPlanCheckRunsResponse, error)RunPlanChecks(ctx context.Context, in *RunPlanChecksRequest, opts ...grpc.CallOption) (*RunPlanChecksResponse, error)BatchCancelPlanCheckRuns(ctx context.Context, in *BatchCancelPlanCheckRunsRequest, opts ...grpc.CallOption) (*BatchCancelPlanCheckRunsResponse, error)- PreviewPlan(ctx context.Context, in *PreviewPlanRequest, opts ...grpc.CallOption) (*PreviewPlanResponse, error)}type planServiceClient struct {@@ -136,16 +134,6 @@ func (c *planServiceClient) BatchCancelPlanCheckRuns(ctx context.Context, in *Bareturn out, nil}-func (c *planServiceClient) PreviewPlan(ctx context.Context, in *PreviewPlanRequest, opts ...grpc.CallOption) (*PreviewPlanResponse, error) {- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)- out := new(PreviewPlanResponse)- err := c.cc.Invoke(ctx, PlanService_PreviewPlan_FullMethodName, in, out, cOpts...)- if err != nil {- return nil, err- }- return out, nil-}-// PlanServiceServer is the server API for PlanService service.// All implementations must embed UnimplementedPlanServiceServer// for forward compatibility.@@ -161,7 +149,6 @@ type PlanServiceServer interface {ListPlanCheckRuns(context.Context, *ListPlanCheckRunsRequest) (*ListPlanCheckRunsResponse, error)RunPlanChecks(context.Context, *RunPlanChecksRequest) (*RunPlanChecksResponse, error)BatchCancelPlanCheckRuns(context.Context, *BatchCancelPlanCheckRunsRequest) (*BatchCancelPlanCheckRunsResponse, error)- PreviewPlan(context.Context, *PreviewPlanRequest) (*PreviewPlanResponse, error)mustEmbedUnimplementedPlanServiceServer()}@@ -196,9 +183,6 @@ func (UnimplementedPlanServiceServer) RunPlanChecks(context.Context, *RunPlanChefunc (UnimplementedPlanServiceServer) BatchCancelPlanCheckRuns(context.Context, *BatchCancelPlanCheckRunsRequest) (*BatchCancelPlanCheckRunsResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method BatchCancelPlanCheckRuns not implemented")}-func (UnimplementedPlanServiceServer) PreviewPlan(context.Context, *PreviewPlanRequest) (*PreviewPlanResponse, error) {- return nil, status.Errorf(codes.Unimplemented, "method PreviewPlan not implemented")-}func (UnimplementedPlanServiceServer) mustEmbedUnimplementedPlanServiceServer() {}func (UnimplementedPlanServiceServer) testEmbeddedByValue() {}@@ -364,24 +348,6 @@ func _PlanService_BatchCancelPlanCheckRuns_Handler(srv interface{}, ctx context.return interceptor(ctx, in, info, handler)}-func _PlanService_PreviewPlan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {- in := new(PreviewPlanRequest)- if err := dec(in); err != nil {- return nil, err- }- if interceptor == nil {- return srv.(PlanServiceServer).PreviewPlan(ctx, in)- }- info := &grpc.UnaryServerInfo{- Server: srv,- FullMethod: PlanService_PreviewPlan_FullMethodName,- }- handler := func(ctx context.Context, req interface{}) (interface{}, error) {- return srv.(PlanServiceServer).PreviewPlan(ctx, req.(*PreviewPlanRequest))- }- return interceptor(ctx, in, info, handler)-}-// PlanService_ServiceDesc is the grpc.ServiceDesc for PlanService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -421,10 +387,6 @@ var PlanService_ServiceDesc = grpc.ServiceDesc{MethodName: "BatchCancelPlanCheckRuns",Handler: _PlanService_BatchCancelPlanCheckRuns_Handler,},- {- MethodName: "PreviewPlan",- Handler: _PlanService_PreviewPlan_Handler,- },},Streams: []grpc.StreamDesc{},Metadata: "v1/plan_service.proto",diff --git a/proto/v1/v1/plan_service.proto b/proto/v1/v1/plan_service.protoindex 31771fdc58..8ef7c23bbf 100644--- a/proto/v1/v1/plan_service.proto+++ b/proto/v1/v1/plan_service.proto@@ -90,15 +90,6 @@ service PlanService {option (bytebase.v1.permission) = "bb.planCheckRuns.run";option (bytebase.v1.auth_method) = IAM;}-- rpc PreviewPlan(PreviewPlanRequest) returns (PreviewPlanResponse) {- option (google.api.http) = {- post: "/v1/{project=projects/*}:previewPlan"- body: "*"- };- option (bytebase.v1.permission) = "bb.plans.preview";- option (bytebase.v1.auth_method) = IAM;- }}message GetPlanRequest {@@ -423,45 +414,6 @@ message BatchCancelPlanCheckRunsRequest {message BatchCancelPlanCheckRunsResponse {}-message PreviewPlanRequest {- // The name of the project.- // Format: projects/{project}- string project = 1 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Project"}- ];-- // The release used for preview.- string release = 2 [- (google.api.field_behavior) = REQUIRED,- (google.api.resource_reference) = {type: "bytebase.com/Release"}- ];-- // The targets to deploy.- // Can be database or databaseGroup.- // Format:- // projects/{project}/databaseGroups/{databaseGroup}- // instances/{instance}/databases/{database}- repeated string targets = 3 [(google.api.field_behavior) = REQUIRED];-- bool allow_out_of_order = 4;-}--message PreviewPlanResponse {- Plan plan = 1;-- // The out of order files of each database.- repeated DatabaseFiles out_of_order_files = 2;- // The applied but modified files of each database.- repeated DatabaseFiles applied_but_modified_files = 3;-- message DatabaseFiles {- string database = 1;- // Format: projects/{project}/releases/{release}/files/{file_id}- repeated string files = 2;- }-}-message PlanCheckRun {reserved 2;