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: add statement to release.file (#14035)
boojack37f30ecf60dc
diff --git a/backend/api/v1/release_service.go b/backend/api/v1/release_service.goindex 84bb4702d9..6d094e7afa 100644--- a/backend/api/v1/release_service.go+++ b/backend/api/v1/release_service.go@@ -169,10 +169,15 @@ func convertToRelease(ctx context.Context, s *store.Store, release *store.Releasr := &v1pb.Release{Title: release.Payload.Title,CreateTime: timestamppb.New(release.CreatedTime),- Files: convertToReleaseFiles(release.Payload.Files),VcsSource: convertToReleaseVcsSource(release.Payload.VcsSource),}+ files, err := convertToReleaseFiles(ctx, s, release.Payload.Files)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to convert release files")+ }+ r.Files = files+project, err := s.GetProjectV2(ctx, &store.FindProjectMessage{UID: &release.ProjectUID})if err != nil {return nil, errors.Wrapf(err, "failed to find project")@@ -191,21 +196,34 @@ func convertToRelease(ctx context.Context, s *store.Store, release *store.Releasreturn r, nil}-func convertToReleaseFiles(files []*storepb.ReleasePayload_File) []*v1pb.Release_File {+func convertToReleaseFiles(ctx context.Context, s *store.Store, files []*storepb.ReleasePayload_File) ([]*v1pb.Release_File, error) {if files == nil {- return nil+ return nil, nil}- var rFiles []*v1pb.Release_File+ var v1Files []*v1pb.Release_Filefor _, f := range files {- rFiles = append(rFiles, &v1pb.Release_File{- Name: f.Name,- Sheet: f.Sheet,- SheetSha256: f.SheetSha256,- Type: v1pb.ReleaseFileType(f.Type),- Version: f.Version,+ _, sheetUID, err := common.GetProjectResourceIDSheetUID(f.Sheet)+ if err != nil {+ return nil, errors.Wrapf(err, "failed to get sheetUID from %q", f.Sheet)+ }+ sheet, err := s.GetSheet(ctx, &store.FindSheetMessage{UID: &sheetUID})+ if err != nil {+ return nil, errors.Wrapf(err, "failed to get sheet %q", f.Sheet)+ }+ if sheet == nil {+ return nil, errors.Errorf("sheet %q not found", f.Sheet)+ }+ v1Files = append(v1Files, &v1pb.Release_File{+ Name: f.Name,+ Sheet: f.Sheet,+ SheetSha256: f.SheetSha256,+ Type: v1pb.ReleaseFileType(f.Type),+ Version: f.Version,+ Statement: sheet.Statement,+ StatementSize: sheet.Size,})}- return rFiles+ return v1Files, nil}func convertToReleaseVcsSource(vs *storepb.ReleasePayload_VCSSource) *v1pb.Release_VCSSource {diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vueindex 3e13ad3f7a..2df963f5cd 100644--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue+++ b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue@@ -5,7 +5,7 @@<divclass="w-[calc(100vw-8rem)] lg:w-[60rem] max-w-[calc(100vw-8rem)] overflow-x-auto">- <div v-if="ready" class="flex flex-col">+ <div class="flex flex-col"><div class="mb-4 flex flex-row justify-start items-center gap-2"><span class="textlabel">{{ t("changelist.change-type") }}:</span><NRadioGroup v-model:value="state.changeType">@@ -13,46 +13,13 @@<NRadio :value="'DML'" :label="t('issue.title.change-data')" /></NRadioGroup></div>-- <NTabs v-model:value="state.changeSource" type="card">- <NTabPane name="DATABASE" :tab="$t('common.databases')">- <DatabaseV1Table- mode="PROJECT"- :database-list="schemaDatabaseList"- :show-selection="true"- :selected-database-names="state.selectedDatabaseNameList"- @update:selected-databases="- state.selectedDatabaseNameList = Array.from($event)- "- />- <SchemalessDatabaseTable- v-if="- state.changeType === 'DDL' &&- schemalessDatabaseList.length > 0- "- mode="PROJECT"- :database-list="schemalessDatabaseList"- />- </NTabPane>- <NTabPane name="GROUP" :tab="$t('common.database-groups')">- <DatabaseGroupDataTable- :database-group-list="dbGroupList"- :show-selection="true"- :single-selection="true"- :selected-database-group-names="- state.selectedDatabaseGroup- ? [state.selectedDatabaseGroup]- : []- "- @update:selected-database-groups="- state.selectedDatabaseGroup = head(Array.from($event))- "- />- </NTabPane>- </NTabs>+ <DatabaseAndGroupSelector+ :project="project"+ @update="handleTargetChange"+ /></div><div- v-if="!ready || state.isGenerating"+ v-if="state.isGenerating"v-zindexable="{ enabled: true }"class="absolute inset-0 flex flex-col items-center justify-center bg-white/50">@@ -66,14 +33,14 @@<div><divv-if="- state.changeSource === 'DATABASE' &&- flattenSelectedDatabaseNameList.length > 0+ state.targetSelectState?.changeSource === 'DATABASE' &&+ state.targetSelectState?.selectedDatabaseNameList.length > 0"class="textinfolabel">{{$t("database.selected-n-databases", {- n: flattenSelectedDatabaseNameList.length,+ n: state.targetSelectState?.selectedDatabaseNameList.length,})}}</div>@@ -102,43 +69,27 @@</template><script lang="ts" setup>-import { head } from "lodash-es";import { NButton } from "naive-ui";-import { NRadioGroup, NRadio, NTabs, NTabPane } from "naive-ui";+import { NRadioGroup, NRadio } from "naive-ui";import { zindexable as vZindexable } from "vdirs";-import { computed, reactive, watch } from "vue";+import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { BBSpin } from "@/bbkit";-import SchemalessDatabaseTable from "@/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue";-import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupDataTable.vue";+import DatabaseAndGroupSelector, {+ type DatabaseSelectState,+} from "@/components/DatabaseAndGroupSelector/";import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import DatabaseV1Table from "@/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";-import {- useDatabaseV1Store,- useDBGroupListByProject,- useDBGroupStore,-} from "@/store";-import { useDatabaseV1List } from "@/store/modules/v1/databaseList";-import type { ComposedDatabase } from "@/types";-import { DEFAULT_PROJECT_NAME } from "@/types";-import { State } from "@/types/proto/v1/common";+import { useDatabaseV1Store, useDBGroupStore } from "@/store";import { DatabaseGroup } from "@/types/proto/v1/database_group_service";-import {- extractProjectResourceName,- generateIssueTitle,- instanceV1HasAlterSchema,- sortDatabaseV1List,-} from "@/utils";+import { extractProjectResourceName, generateIssueTitle } from "@/utils";import { useChangelistDetailContext } from "../context";type LocalState = {- selectedDatabaseNameList: string[];changeType: "DDL" | "DML";- changeSource: "DATABASE" | "GROUP";isGenerating: boolean;- selectedDatabaseGroup?: string;+ targetSelectState?: DatabaseSelectState;};const { t } = useI18n();@@ -152,65 +103,42 @@ const {} = useChangelistDetailContext();const state = reactive<LocalState>({- selectedDatabaseNameList: [],changeType: "DDL",- changeSource: "DATABASE",isGenerating: false,});-const { ready } = useDatabaseV1List(project.value.name);-const { dbGroupList } = useDBGroupListByProject(project.value.name);--const databaseList = computed(() => {- let list: ComposedDatabase[] = [];- list = databaseStore.databaseListByProject(project.value.name);-- list = list.filter(- (db) => db.syncState == State.ACTIVE && db.project !== DEFAULT_PROJECT_NAME- );-- return sortDatabaseV1List(list);-});--const schemaDatabaseList = computed(() => {- if (state.changeType === "DDL") {- return databaseList.value.filter((db) =>- instanceV1HasAlterSchema(db.instanceResource)- );- }- return databaseList.value;-});--const schemalessDatabaseList = computed(() => {- return databaseList.value.filter(- (db) => !instanceV1HasAlterSchema(db.instanceResource)- );-});--const flattenSelectedDatabaseNameList = computed(() => {- return [...state.selectedDatabaseNameList];-});-const nextButtonErrors = computed(() => {const errors: string[] = [];if (- (state.changeSource === "DATABASE" &&- flattenSelectedDatabaseNameList.value.length === 0) ||- (state.changeSource === "GROUP" && !state.selectedDatabaseGroup)+ !state.targetSelectState ||+ (state.targetSelectState.changeSource === "DATABASE" &&+ state.targetSelectState.selectedDatabaseNameList.length === 0) ||+ (state.targetSelectState.changeSource === "GROUP" &&+ !state.targetSelectState.selectedDatabaseGroup)) {- errors.push(t("changelist.error.select-at-least-one-database"));+ errors.push("Please select at least one database");}return errors;});+const handleTargetChange = (databaseSelectState: DatabaseSelectState) => {+ state.targetSelectState = databaseSelectState;+};+const handleClickNext = async () => {+ if (!state.targetSelectState) {+ return;+ }+state.isGenerating = true;try {- const databaseList = flattenSelectedDatabaseNameList.value.map((name) =>- databaseStore.getDatabaseByName(name)+ const databaseList = state.targetSelectState.selectedDatabaseNameList.map(+ (name) => databaseStore.getDatabaseByName(name));const databaseGroup = DatabaseGroup.fromPartial({- ...dbGroupStore.getDBGroupByName(state.selectedDatabaseGroup || ""),+ ...dbGroupStore.getDBGroupByName(+ state.targetSelectState.selectedDatabaseGroup || ""+ ),});const query: Record<string, any> = {template:@@ -219,17 +147,17 @@ const handleClickNext = async () => {: "bb.issue.database.data.update",name: generateIssueTitle("bb.issue.database.schema.update",- state.changeSource === "DATABASE"+ state.targetSelectState.changeSource === "DATABASE"? databaseList.map((db) => db.databaseName): [databaseGroup?.databasePlaceholder]),changelist: changelist.value.name,description: `Apply changelist [${changelist.value.description}]`,};- if (state.changeSource === "DATABASE") {+ if (state.targetSelectState.changeSource === "DATABASE") {query.databaseList = databaseList.map((db) => db.name).join(",");} else {- query.databaseGroupName = state.selectedDatabaseGroup;+ query.databaseGroupName = state.targetSelectState.selectedDatabaseGroup;}router.push({@@ -244,16 +172,4 @@ const handleClickNext = async () => {state.isGenerating = false;}};--const reset = () => {- state.selectedDatabaseNameList = [];-};--watch(- show,- (show) => {- if (show) reset();- },- { immediate: true }-);</script>diff --git a/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue b/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vuenew file mode 100644index 0000000000..53b9fce836--- /dev/null+++ b/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue@@ -0,0 +1,79 @@+<template>+ <NTabs v-model:value="state.changeSource" type="card">+ <NTabPane name="DATABASE" :tab="$t('common.databases')">+ <DatabaseV1Table+ mode="PROJECT"+ :database-list="databaseList"+ :show-selection="true"+ :selected-database-names="state.selectedDatabaseNameList"+ @update:selected-databases="+ state.selectedDatabaseNameList = Array.from($event)+ "+ />+ </NTabPane>+ <NTabPane name="GROUP" :tab="$t('common.database-groups')">+ <DatabaseGroupDataTable+ :database-group-list="dbGroupList"+ :show-selection="true"+ :single-selection="true"+ :selected-database-group-names="+ state.selectedDatabaseGroup ? [state.selectedDatabaseGroup] : []+ "+ @update:selected-database-groups="+ state.selectedDatabaseGroup = head(Array.from($event))+ "+ />+ </NTabPane>+ </NTabs>+</template>++<script lang="ts" setup>+import { head } from "lodash-es";+import { NTabs, NTabPane } from "naive-ui";+import { computed, reactive, watch } from "vue";+import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupDataTable.vue";+import DatabaseV1Table from "@/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue";+import { useDatabaseV1Store, useDBGroupListByProject } from "@/store";+import { useDatabaseV1List } from "@/store/modules/v1/databaseList";+import { DEFAULT_PROJECT_NAME, type ComposedProject } from "@/types";+import { State } from "@/types/proto/v1/common";+import { sortDatabaseV1List } from "@/utils";+import type { DatabaseSelectState } from "./types";++const props = defineProps<{+ project: ComposedProject;+}>();++const emit = defineEmits<{+ (event: "close"): void;+ (event: "update", state: DatabaseSelectState): void;+}>();++const databaseStore = useDatabaseV1Store();++const state = reactive<DatabaseSelectState>({+ changeSource: "DATABASE",+ selectedDatabaseNameList: [],+});++useDatabaseV1List(props.project.name);+const { dbGroupList } = useDBGroupListByProject(props.project.name);++const databaseList = computed(() => {+ const list = databaseStore+ .databaseListByProject(props.project.name)+ .filter(+ (db) =>+ db.syncState == State.ACTIVE && db.project !== DEFAULT_PROJECT_NAME+ );+ return sortDatabaseV1List(list);+});++watch(+ () => state,+ () => {+ emit("update", state);+ },+ { deep: true }+);+</script>diff --git a/frontend/src/components/DatabaseAndGroupSelector/index.ts b/frontend/src/components/DatabaseAndGroupSelector/index.tsnew file mode 100644index 0000000000..bd3ff78e1a--- /dev/null+++ b/frontend/src/components/DatabaseAndGroupSelector/index.ts@@ -0,0 +1,5 @@+import DatabaseAndGroupSelector from "./DatabaseAndGroupSelector.vue";++export * from "./types";++export default DatabaseAndGroupSelector;diff --git a/frontend/src/components/DatabaseAndGroupSelector/types.ts b/frontend/src/components/DatabaseAndGroupSelector/types.tsnew file mode 100644index 0000000000..d21f5a4ffb--- /dev/null+++ b/frontend/src/components/DatabaseAndGroupSelector/types.ts@@ -0,0 +1,5 @@+export interface DatabaseSelectState {+ changeSource: "DATABASE" | "GROUP";+ selectedDatabaseNameList: string[];+ selectedDatabaseGroup?: string;+}diff --git a/frontend/src/components/Release/ReleaseDetail/MigrationFileTable/MigrationFileTable.vue b/frontend/src/components/Release/ReleaseDetail/MigrationFileTable/MigrationFileTable.vueindex 57977af8c0..b830360c0d 100644--- a/frontend/src/components/Release/ReleaseDetail/MigrationFileTable/MigrationFileTable.vue+++ b/frontend/src/components/Release/ReleaseDetail/MigrationFileTable/MigrationFileTable.vue@@ -2,7 +2,7 @@<NDataTablesize="small":columns="columnList"- :data="migrationFiles"+ :data="release.files":striped="true":row-key="(file) => file.version"/>@@ -16,30 +16,35 @@ import { useReleaseDetailContext } from "../context";const { release } = useReleaseDetailContext();-const migrationFiles = computed(() => release.value.files);-const columnList = computed(() => {const columns: DataTableColumn<Release_File>[] = [{key: "version",title: "Version",- ellipsis: true,+ width: 150,render: (file) => file.version,},{key: "title",title: "Filename",+ width: 200,ellipsis: true,render: (file) => file.name,},{key: "sheetSha256",- width: 150,title: "Hash",+ width: 150,render: (file) => {return <code class={"text-sm"}>{file.sheetSha256.slice(0, 8)}</code>;},},+ {+ key: "statement",+ title: "Statement",+ ellipsis: true,+ render: (file) => file.statement,+ },];return columns;});diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vueindex 4106de1bb1..faef61e75d 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue@@ -4,7 +4,7 @@</NButton><ApplyToDatabasePanel- v-if="state.showApplyToDatabasePanel"+ :show="state.showApplyToDatabasePanel"@close="state.showApplyToDatabasePanel = false"/></template>diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vueindex 32f15941f4..4d44d6eba7 100644--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue@@ -1,11 +1,11 @@<template>- <Drawer @close="emit('close')">+ <Drawer v-bind="$attrs" @close="emit('close')"><DrawerContent :title="'Apply to databases'"><template #default><divclass="w-[calc(100vw-8rem)] lg:w-[60rem] max-w-[calc(100vw-8rem)] overflow-x-auto">- <div v-if="ready" class="flex flex-col">+ <div class="flex flex-col"><div class="mb-4 flex flex-row justify-start items-center gap-2"><span class="textlabel">{{ "Change type" }}:</span><NRadioGroup v-model:value="state.changeType">@@ -13,46 +13,13 @@<NRadio :value="'DML'" :label="t('issue.title.change-data')" /></NRadioGroup></div>-- <NTabs v-model:value="state.changeSource" type="card">- <NTabPane name="DATABASE" :tab="$t('common.databases')">- <DatabaseV1Table- mode="PROJECT"- :database-list="schemaDatabaseList"- :show-selection="true"- :selected-database-names="state.selectedDatabaseNameList"- @update:selected-databases="- state.selectedDatabaseNameList = Array.from($event)- "- />- <SchemalessDatabaseTable- v-if="- state.changeType === 'DDL' &&- schemalessDatabaseList.length > 0- "- mode="PROJECT"- :database-list="schemalessDatabaseList"- />- </NTabPane>- <NTabPane name="GROUP" :tab="$t('common.database-groups')">- <DatabaseGroupDataTable- :database-group-list="dbGroupList"- :show-selection="true"- :single-selection="true"- :selected-database-group-names="- state.selectedDatabaseGroup- ? [state.selectedDatabaseGroup]- : []- "- @update:selected-database-groups="- state.selectedDatabaseGroup = head(Array.from($event))- "- />- </NTabPane>- </NTabs>+ <DatabaseAndGroupSelector+ :project="project"+ @update="handleTargetChange"+ /></div><div- v-if="!ready || state.isGenerating"+ v-if="state.isGenerating"v-zindexable="{ enabled: true }"class="absolute inset-0 flex flex-col items-center justify-center bg-white/50">@@ -66,14 +33,14 @@<div><divv-if="- state.changeSource === 'DATABASE' &&- flattenSelectedDatabaseNameList.length > 0+ state.targetSelectState?.changeSource === 'DATABASE' &&+ state.targetSelectState?.selectedDatabaseNameList.length > 0"class="textinfolabel">{{$t("database.selected-n-databases", {- n: flattenSelectedDatabaseNameList.length,+ n: state.targetSelectState?.selectedDatabaseNameList.length,})}}</div>@@ -102,35 +69,21 @@</template><script lang="ts" setup>-import { head } from "lodash-es";import { NButton } from "naive-ui";-import { NRadioGroup, NRadio, NTabs, NTabPane } from "naive-ui";+import { NRadioGroup, NRadio } from "naive-ui";import { zindexable as vZindexable } from "vdirs";import { computed, reactive } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { BBSpin } from "@/bbkit";-import SchemalessDatabaseTable from "@/components/AlterSchemaPrepForm/SchemalessDatabaseTable.vue";-import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupDataTable.vue";+import DatabaseAndGroupSelector, {+ type DatabaseSelectState,+} from "@/components/DatabaseAndGroupSelector/";import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";-import DatabaseV1Table from "@/components/v2/Model/DatabaseV1Table/DatabaseV1Table.vue";import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";-import {- useDatabaseV1Store,- useDBGroupListByProject,- useDBGroupStore,-} from "@/store";-import { useDatabaseV1List } from "@/store/modules/v1/databaseList";-import type { ComposedDatabase } from "@/types";-import { DEFAULT_PROJECT_NAME } from "@/types";-import { State } from "@/types/proto/v1/common";+import { useDatabaseV1Store, useDBGroupStore } from "@/store";import { DatabaseGroup } from "@/types/proto/v1/database_group_service";-import {- extractProjectResourceName,- generateIssueTitle,- instanceV1HasAlterSchema,- sortDatabaseV1List,-} from "@/utils";+import { extractProjectResourceName, generateIssueTitle } from "@/utils";import { useReleaseDetailContext } from "../context";const emit = defineEmits<{@@ -138,11 +91,9 @@ const emit = defineEmits<{}>();type LocalState = {- selectedDatabaseNameList: string[];changeType: "DDL" | "DML";- changeSource: "DATABASE" | "GROUP";isGenerating: boolean;- selectedDatabaseGroup?: string;+ targetSelectState?: DatabaseSelectState;};const { t } = useI18n();@@ -152,65 +103,42 @@ const dbGroupStore = useDBGroupStore();const { release, project } = useReleaseDetailContext();const state = reactive<LocalState>({- selectedDatabaseNameList: [],changeType: "DDL",- changeSource: "DATABASE",isGenerating: false,});-const { ready } = useDatabaseV1List(project.value.name);-const { dbGroupList } = useDBGroupListByProject(project.value.name);--const databaseList = computed(() => {- let list: ComposedDatabase[] = [];- list = databaseStore.databaseListByProject(project.value.name);-- list = list.filter(- (db) => db.syncState == State.ACTIVE && db.project !== DEFAULT_PROJECT_NAME- );-- return sortDatabaseV1List(list);-});--const schemaDatabaseList = computed(() => {- if (state.changeType === "DDL") {- return databaseList.value.filter((db) =>- instanceV1HasAlterSchema(db.instanceResource)- );- }- return databaseList.value;-});--const schemalessDatabaseList = computed(() => {- return databaseList.value.filter(- (db) => !instanceV1HasAlterSchema(db.instanceResource)- );-});--const flattenSelectedDatabaseNameList = computed(() => {- return [...state.selectedDatabaseNameList];-});-const nextButtonErrors = computed(() => {const errors: string[] = [];if (- (state.changeSource === "DATABASE" &&- flattenSelectedDatabaseNameList.value.length === 0) ||- (state.changeSource === "GROUP" && !state.selectedDatabaseGroup)+ !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;});+const handleTargetChange = (databaseSelectState: DatabaseSelectState) => {+ state.targetSelectState = databaseSelectState;+};+const handleClickNext = async () => {+ if (!state.targetSelectState) {+ return;+ }+state.isGenerating = true;try {- const databaseList = flattenSelectedDatabaseNameList.value.map((name) =>- databaseStore.getDatabaseByName(name)+ const databaseList = state.targetSelectState.selectedDatabaseNameList.map(+ (name) => databaseStore.getDatabaseByName(name));const databaseGroup = DatabaseGroup.fromPartial({- ...dbGroupStore.getDBGroupByName(state.selectedDatabaseGroup || ""),+ ...dbGroupStore.getDBGroupByName(+ state.targetSelectState.selectedDatabaseGroup || ""+ ),});const query: Record<string, any> = {template:@@ -219,18 +147,17 @@ const handleClickNext = async () => {: "bb.issue.database.data.update",name: generateIssueTitle("bb.issue.database.schema.update",- state.changeSource === "DATABASE"+ state.targetSelectState.changeSource === "DATABASE"? databaseList.map((db) => db.databaseName): [databaseGroup?.databasePlaceholder]),- // TODO(steven): handle issue creation for release.release: release.value.name,description: `Apply release [${release.value.title}]`,};- if (state.changeSource === "DATABASE") {+ if (state.targetSelectState.changeSource === "DATABASE") {query.databaseList = databaseList.map((db) => db.name).join(",");} else {- query.databaseGroupName = state.selectedDatabaseGroup;+ query.databaseGroupName = state.targetSelectState.selectedDatabaseGroup;}router.push({diff --git a/frontend/src/types/proto/v1/release_service.ts b/frontend/src/types/proto/v1/release_service.tsindex 2af24c8f76..9abda0be5a 100644--- a/frontend/src/types/proto/v1/release_service.ts+++ b/frontend/src/types/proto/v1/release_service.ts@@ -135,6 +135,9 @@ export interface Release_File {sheetSha256: string;type: ReleaseFileType;version: string;+ /** The statement is used for preview purpose. */+ statement: string;+ statementSize: Long;}export interface Release_VCSSource {@@ -653,7 +656,15 @@ export const Release: MessageFns<Release> = {};function createBaseRelease_File(): Release_File {- return { name: "", sheet: "", sheetSha256: "", type: ReleaseFileType.TYPE_UNSPECIFIED, version: "" };+ return {+ name: "",+ sheet: "",+ sheetSha256: "",+ type: ReleaseFileType.TYPE_UNSPECIFIED,+ version: "",+ statement: "",+ statementSize: Long.ZERO,+ };}export const Release_File: MessageFns<Release_File> = {@@ -673,6 +684,12 @@ export const Release_File: MessageFns<Release_File> = {if (message.version !== "") {writer.uint32(42).string(message.version);}+ if (message.statement !== "") {+ writer.uint32(50).string(message.statement);+ }+ if (!message.statementSize.equals(Long.ZERO)) {+ writer.uint32(56).int64(message.statementSize.toString());+ }return writer;},@@ -718,6 +735,20 @@ export const Release_File: MessageFns<Release_File> = {message.version = reader.string();continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.statement = reader.string();+ continue;+ case 7:+ if (tag !== 56) {+ break;+ }++ message.statementSize = Long.fromString(reader.int64().toString());+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -734,6 +765,8 @@ export const Release_File: MessageFns<Release_File> = {sheetSha256: isSet(object.sheetSha256) ? globalThis.String(object.sheetSha256) : "",type: isSet(object.type) ? releaseFileTypeFromJSON(object.type) : ReleaseFileType.TYPE_UNSPECIFIED,version: isSet(object.version) ? globalThis.String(object.version) : "",+ statement: isSet(object.statement) ? globalThis.String(object.statement) : "",+ statementSize: isSet(object.statementSize) ? Long.fromValue(object.statementSize) : Long.ZERO,};},@@ -754,6 +787,12 @@ export const Release_File: MessageFns<Release_File> = {if (message.version !== "") {obj.version = message.version;}+ if (message.statement !== "") {+ obj.statement = message.statement;+ }+ if (!message.statementSize.equals(Long.ZERO)) {+ obj.statementSize = (message.statementSize || Long.ZERO).toString();+ }return obj;},@@ -767,6 +806,10 @@ export const Release_File: MessageFns<Release_File> = {message.sheetSha256 = object.sheetSha256 ?? "";message.type = object.type ?? ReleaseFileType.TYPE_UNSPECIFIED;message.version = object.version ?? "";+ message.statement = object.statement ?? "";+ message.statementSize = (object.statementSize !== undefined && object.statementSize !== null)+ ? Long.fromValue(object.statementSize)+ : Long.ZERO;return message;},};diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 9e13c403e4..7b7d4cde7f 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -12242,6 +12242,13 @@ components:format: enumversion:type: string+ statement:+ readOnly: true+ type: string+ description: The statement is used for preview purpose.+ statementSize:+ readOnly: true+ type: stringRelease_VCSSource:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 59688ba328..a308b89a35 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -1679,6 +1679,8 @@ When paginating, all other parameters provided to `ListReleasesRequest` must mat| sheet_sha256 | [string](#string) | | The SHA256 hash value of the sheet. || type | [ReleaseFileType](#bytebase-v1-ReleaseFileType) | | || version | [string](#string) | | |+| statement | [string](#string) | | The statement is used for preview purpose. |+| statement_size | [int64](#int64) | | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 8c947d22e7..27034c0b28 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -5556,6 +5556,20 @@ Format: projects/{project}/sheets/{sheet} </p></td><td><p> </p></td></tr>+ <tr>+ <td>statement</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The statement is used for preview purpose. </p></td>+ </tr>++ <tr>+ <td>statement_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>diff --git a/proto/generated-go/v1/release_service.pb.go b/proto/generated-go/v1/release_service.pb.goindex 4bc0340348..fd0ae6708d 100644--- a/proto/generated-go/v1/release_service.pb.go+++ b/proto/generated-go/v1/release_service.pb.go@@ -452,6 +452,9 @@ type Release_File struct {SheetSha256 string `protobuf:"bytes,3,opt,name=sheet_sha256,json=sheetSha256,proto3" json:"sheet_sha256,omitempty"`Type ReleaseFileType `protobuf:"varint,4,opt,name=type,proto3,enum=bytebase.v1.ReleaseFileType" json:"type,omitempty"`Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`+ // The statement is used for preview purpose.+ Statement string `protobuf:"bytes,6,opt,name=statement,proto3" json:"statement,omitempty"`+ StatementSize int64 `protobuf:"varint,7,opt,name=statement_size,json=statementSize,proto3" json:"statement_size,omitempty"`}func (x *Release_File) Reset() {@@ -519,6 +522,20 @@ func (x *Release_File) GetVersion() string {return ""}+func (x *Release_File) GetStatement() string {+ if x != nil {+ return x.Statement+ }+ return ""+}++func (x *Release_File) GetStatementSize() int64 {+ if x != nil {+ return x.StatementSize+ }+ return 0+}+type Release_VCSSource struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -627,7 +644,7 @@ var file_v1_release_service_proto_rawDesc = []byte{0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xf1, 0x04, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73,+ 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xc2, 0x05, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73,0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x66,@@ -643,8 +660,8 @@ var file_v1_release_service_proto_rawDesc = []byte{0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41,- 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0xbe,- 0x01, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,+ 0x01, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x8f,+ 0x02, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73,0x68, 0x65, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xfa, 0x41, 0x14, 0x0a,0x12, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x53, 0x68,@@ -655,59 +672,64 @@ var file_v1_release_service_proto_rawDesc = []byte{0x0e, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52,0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,- 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a,- 0x66, 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x08,- 0x76, 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43, 0x53,- 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a,- 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75, 0x72,- 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 0x3a, 0x40, 0xea, 0x41, 0x3d, 0x0a, 0x14, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x6c, 0x65, 0x61,- 0x73, 0x65, 0x12, 0x25, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72,- 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f,- 0x7b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x7d, 0x2a, 0x36, 0x0a, 0x0f, 0x52, 0x65, 0x6c,- 0x65, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10,- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,- 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x44, 0x10,- 0x01, 0x32, 0xb9, 0x04, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65, 0x72,- 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61,- 0x73, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,- 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65,- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x0c, 0x4c, 0x69,- 0x73, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c,- 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52,- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x31, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22,- 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,+ 0x22, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01,+ 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d,+ 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74,+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x42, 0x04, 0xe2, 0x41, 0x01,+ 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65,+ 0x1a, 0x66, 0x0a, 0x09, 0x56, 0x43, 0x53, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2f, 0x0a,+ 0x08, 0x76, 0x63, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,+ 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x43,+ 0x53, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x76, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28,+ 0x0a, 0x10, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x75,+ 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x55, 0x72, 0x6c, 0x3a, 0x40, 0xea, 0x41, 0x3d, 0x0a, 0x14, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x6c, 0x65,+ 0x61, 0x73, 0x65, 0x12, 0x25, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70,+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73,+ 0x2f, 0x7b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x7d, 0x2a, 0x36, 0x0a, 0x0f, 0x52, 0x65,+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,+ 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,+ 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x44,+ 0x10, 0x01, 0x32, 0xb9, 0x04, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x53, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65,+ 0x61, 0x73, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x72,+ 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x86, 0x01, 0x0a, 0x0c, 0x4c,+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,+ 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x31, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70,+ 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61,+ 0x73, 0x65, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73,+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x42,+ 0xda, 0x41, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,+ 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,+ 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,- 0x65, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c,+ 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c,0x65, 0x61, 0x73, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x42, 0xda,- 0x41, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x07, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22,- 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,- 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65,- 0x61, 0x73, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x4f, 0xda, 0x41,- 0x13, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x07, 0x72, 0x65, 0x6c, 0x65,- 0x61, 0x73, 0x65, 0x32, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,- 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,- 0x2a, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a,- 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31,- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x4f, 0xda,+ 0x41, 0x13, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x3a, 0x07, 0x72, 0x65, 0x6c,+ 0x65, 0x61, 0x73, 0x65, 0x32, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x6c, 0x65, 0x61,+ 0x73, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,+ 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11,+ 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76,+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (diff --git a/proto/v1/release_service.proto b/proto/v1/release_service.protoindex 59a99e0f20..5b56efcc4b 100644--- a/proto/v1/release_service.proto+++ b/proto/v1/release_service.proto@@ -123,6 +123,10 @@ message Release {string sheet_sha256 = 3 [(google.api.field_behavior) = OUTPUT_ONLY];ReleaseFileType type = 4;string version = 5;++ // The statement is used for preview purpose.+ string statement = 6 [(google.api.field_behavior) = OUTPUT_ONLY];+ int64 statement_size = 7 [(google.api.field_behavior) = OUTPUT_ONLY];}message VCSSource {