Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: nil pointer (#15198)
ecmadaoa9bbf50262ed
diff --git a/backend/api/v1/audit.go b/backend/api/v1/audit.goindex 208cc4396e..c7d4582b1b 100644--- a/backend/api/v1/audit.go+++ b/backend/api/v1/audit.go@@ -101,7 +101,7 @@ func createAuditLog(ctx context.Context, request, response any, method string, sRequestMetadata: requestMetadata,}if err := storage.CreateAuditLog(createAuditLogCtx, p); err != nil {- return errors.Wrapf(err, "failed to create audit log")+ return err}}@@ -118,7 +118,7 @@ func (in *AuditInterceptor) AuditInterceptor(ctx context.Context, request any, sif needAudit(ctx) {if err := createAuditLog(ctx, request, response, serverInfo.FullMethod, in.store, serviceData, rerr); err != nil {- slog.Warn("audit interceptor: failed to create audit log", log.BBError(err))+ slog.Warn("audit interceptor: failed to create audit log", log.BBError(err), slog.String("method", serverInfo.FullMethod))}}@@ -315,6 +315,7 @@ func getRequestString(request any) (string, error) {if m == nil {return "", nil}+b, err := protojson.Marshal(m)if err != nil {return "", errdiff --git a/backend/runner/schemasync/syncer.go b/backend/runner/schemasync/syncer.goindex 35d4cde6a6..80fd140c45 100644--- a/backend/runner/schemasync/syncer.go+++ b/backend/runner/schemasync/syncer.go@@ -326,7 +326,9 @@ func (s *Syncer) SyncInstance(ctx context.Context, instance *store.InstanceMessaif err != nil {return nil, nil, nil, errors.Wrapf(err, "failed to create instance %q database %q in sync runner", instance.ResourceID, databaseMetadata.Name)}- newDatabases = append(newDatabases, newDatabase)+ if newDatabase != nil {+ newDatabases = append(newDatabases, newDatabase)+ }}}diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 2fdf22f5e2..ae3f877dc7 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -36,7 +36,7 @@ export enum Edition {EDITION_2024 = "EDITION_2024",/*** EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be- * used or relied on outside of tests.+ * used or relyed on outside of tests.*/EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",@@ -1093,13 +1093,12 @@ export interface MessageOptions {export interface FieldOptions {/**- * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.* The ctype option instructs the C++ code generator to use a different* representation of the field than it normally would. See the specific* options below. This option is only implemented to support use of* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of- * type "bytes" in the open source release.- * TODO: make ctype actually deprecated.+ * type "bytes" in the open source release -- sorry, we'll try to include+ * other types in a future version!*/ctype?:| FieldOptions_CType@@ -1315,7 +1314,11 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number}}-/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */+/**+ * If set to RETENTION_SOURCE, the option will be omitted from the binary.+ * Note: as of January 2023, support for this is in progress and does not yet+ * have an effect (b/264593489).+ */export enum FieldOptions_OptionRetention {RETENTION_UNKNOWN = "RETENTION_UNKNOWN",RETENTION_RUNTIME = "RETENTION_RUNTIME",@@ -1372,7 +1375,8 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option/*** This indicates the types of entities that the field may apply to when used* as an option. If it is unset, then the field may be freely used as an- * option on any kind of entity.+ * option on any kind of entity. Note: as of January 2023, support for this is+ * in progress and does not yet have an effect (b/264593489).*/export enum FieldOptions_OptionTargetType {TARGET_TYPE_UNKNOWN = "TARGET_TYPE_UNKNOWN",diff --git a/frontend/src/types/proto/v1/database_catalog_service.ts b/frontend/src/types/proto/v1/database_catalog_service.tsindex 20b4833932..f039aeef7c 100644--- a/frontend/src/types/proto/v1/database_catalog_service.ts+++ b/frontend/src/types/proto/v1/database_catalog_service.ts@@ -7,7 +7,6 @@/* eslint-disable */import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";import Long from "long";-import { FieldMask } from "../google/protobuf/field_mask";export const protobufPackage = "bytebase.v1";@@ -26,11 +25,7 @@ export interface UpdateDatabaseCatalogRequest {* The catalog's `name` field is used to identify the database catalog to update.* Format: instances/{instance}/databases/{database}/catalog*/- catalog:- | DatabaseCatalog- | undefined;- /** The list of fields to update. */- updateMask: string[] | undefined;+ catalog: DatabaseCatalog | undefined;}export interface DatabaseCatalog {@@ -228,7 +223,7 @@ export const GetDatabaseCatalogRequest: MessageFns<GetDatabaseCatalogRequest> =};function createBaseUpdateDatabaseCatalogRequest(): UpdateDatabaseCatalogRequest {- return { catalog: undefined, updateMask: undefined };+ return { catalog: undefined };}export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogRequest> = {@@ -236,9 +231,6 @@ export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogRequeif (message.catalog !== undefined) {DatabaseCatalog.encode(message.catalog, writer.uint32(10).fork()).join();}- if (message.updateMask !== undefined) {- FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).join();- }return writer;},@@ -257,14 +249,6 @@ export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogRequemessage.catalog = DatabaseCatalog.decode(reader, reader.uint32());continue;}- case 2: {- if (tag !== 18) {- break;- }-- message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));- continue;- }}if ((tag & 7) === 4 || tag === 0) {break;@@ -275,10 +259,7 @@ export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogReque},fromJSON(object: any): UpdateDatabaseCatalogRequest {- return {- catalog: isSet(object.catalog) ? DatabaseCatalog.fromJSON(object.catalog) : undefined,- updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,- };+ return { catalog: isSet(object.catalog) ? DatabaseCatalog.fromJSON(object.catalog) : undefined };},toJSON(message: UpdateDatabaseCatalogRequest): unknown {@@ -286,9 +267,6 @@ export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogRequeif (message.catalog !== undefined) {obj.catalog = DatabaseCatalog.toJSON(message.catalog);}- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }return obj;},@@ -300,7 +278,6 @@ export const UpdateDatabaseCatalogRequest: MessageFns<UpdateDatabaseCatalogRequemessage.catalog = (object.catalog !== undefined && object.catalog !== null)? DatabaseCatalog.fromPartial(object.catalog): undefined;- message.updateMask = object.updateMask ?? undefined;return message;},};diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex f9b80a9a1b..14ce7bdef1 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -1423,12 +1423,6 @@ paths:required: trueschema:type: string- - name: updateMask- in: query- description: The list of fields to update.- schema:- type: string- format: field-maskrequestBody:content:application/json:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 20e7b59ccf..cd17f7760f 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -1116,7 +1116,6 @@| catalog | [DatabaseCatalog](#bytebase-v1-DatabaseCatalog) | | The database catalog to update.The catalog's `name` field is used to identify the database catalog to update. Format: instances/{instance}/databases/{database}/catalog |-| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 923b0ee7e6..5c2fc5a9cc 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -3869,13 +3869,6 @@ The catalog's `name` field is used to identify the database catalog to updatFormat: instances/{instance}/databases/{database}/catalog </p></td></tr>- <tr>- <td>update_mask</td>- <td><a href="#google.protobuf.FieldMask">google.protobuf.FieldMask</a></td>- <td></td>- <td><p>The list of fields to update. </p></td>- </tr>-</tbody></table>diff --git a/proto/generated-go/v1/database_catalog_service.pb.go b/proto/generated-go/v1/database_catalog_service.pb.goindex 44dbf8cb71..e3b7270f88 100644--- a/proto/generated-go/v1/database_catalog_service.pb.go+++ b/proto/generated-go/v1/database_catalog_service.pb.go@@ -10,7 +10,6 @@ import (_ "google.golang.org/genproto/googleapis/api/annotations"protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"- fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"reflect "reflect"sync "sync"unsafe "unsafe"@@ -133,9 +132,7 @@ type UpdateDatabaseCatalogRequest struct {//// The catalog's `name` field is used to identify the database catalog to update.// Format: instances/{instance}/databases/{database}/catalog- Catalog *DatabaseCatalog `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"`- // The list of fields to update.- UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`+ Catalog *DatabaseCatalog `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -177,13 +174,6 @@ func (x *UpdateDatabaseCatalogRequest) GetCatalog() *DatabaseCatalog {return nil}-func (x *UpdateDatabaseCatalogRequest) GetUpdateMask() *fieldmaskpb.FieldMask {- if x != nil {- return x.UpdateMask- }- return nil-}-type DatabaseCatalog struct {state protoimpl.MessageState `protogen:"open.v1"`// The name of the database catalog.@@ -708,25 +698,19 @@ var file_v1_database_catalog_service_proto_rawDesc = string([]byte{0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69,0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,- 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x19, 0x47, 0x65,- 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,- 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74,- 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c,- 0x6f, 0x67, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f,- 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 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, 0xb1,+ 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x76, 0x31, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x42, 0x25, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x22, 0x5c, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x12, 0x3c, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x42,+ 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x22, 0xb1,0x01, 0x0a, 0x0f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c,0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,@@ -878,33 +862,31 @@ var file_v1_database_catalog_service_proto_goTypes = []any{(*ObjectSchema_StructKind)(nil), // 10: bytebase.v1.ObjectSchema.StructKind(*ObjectSchema_ArrayKind)(nil), // 11: bytebase.v1.ObjectSchema.ArrayKindnil, // 12: bytebase.v1.ObjectSchema.StructKind.PropertiesEntry- (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask}var file_v1_database_catalog_service_proto_depIdxs = []int32{3, // 0: bytebase.v1.UpdateDatabaseCatalogRequest.catalog:type_name -> bytebase.v1.DatabaseCatalog- 13, // 1: bytebase.v1.UpdateDatabaseCatalogRequest.update_mask:type_name -> google.protobuf.FieldMask- 4, // 2: bytebase.v1.DatabaseCatalog.schemas:type_name -> bytebase.v1.SchemaCatalog- 5, // 3: bytebase.v1.SchemaCatalog.tables:type_name -> bytebase.v1.TableCatalog- 8, // 4: bytebase.v1.TableCatalog.columns:type_name -> bytebase.v1.TableCatalog.Columns- 7, // 5: bytebase.v1.TableCatalog.object_schema:type_name -> bytebase.v1.ObjectSchema- 9, // 6: bytebase.v1.ColumnCatalog.labels:type_name -> bytebase.v1.ColumnCatalog.LabelsEntry- 7, // 7: bytebase.v1.ColumnCatalog.object_schema:type_name -> bytebase.v1.ObjectSchema- 0, // 8: bytebase.v1.ObjectSchema.type:type_name -> bytebase.v1.ObjectSchema.Type- 10, // 9: bytebase.v1.ObjectSchema.struct_kind:type_name -> bytebase.v1.ObjectSchema.StructKind- 11, // 10: bytebase.v1.ObjectSchema.array_kind:type_name -> bytebase.v1.ObjectSchema.ArrayKind- 6, // 11: bytebase.v1.TableCatalog.Columns.columns:type_name -> bytebase.v1.ColumnCatalog- 12, // 12: bytebase.v1.ObjectSchema.StructKind.properties:type_name -> bytebase.v1.ObjectSchema.StructKind.PropertiesEntry- 7, // 13: bytebase.v1.ObjectSchema.ArrayKind.kind:type_name -> bytebase.v1.ObjectSchema- 7, // 14: bytebase.v1.ObjectSchema.StructKind.PropertiesEntry.value:type_name -> bytebase.v1.ObjectSchema- 1, // 15: bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog:input_type -> bytebase.v1.GetDatabaseCatalogRequest- 2, // 16: bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog:input_type -> bytebase.v1.UpdateDatabaseCatalogRequest- 3, // 17: bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog:output_type -> bytebase.v1.DatabaseCatalog- 3, // 18: bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog:output_type -> bytebase.v1.DatabaseCatalog- 17, // [17:19] is the sub-list for method output_type- 15, // [15:17] is the sub-list for method input_type- 15, // [15:15] is the sub-list for extension type_name- 15, // [15:15] is the sub-list for extension extendee- 0, // [0:15] is the sub-list for field type_name+ 4, // 1: bytebase.v1.DatabaseCatalog.schemas:type_name -> bytebase.v1.SchemaCatalog+ 5, // 2: bytebase.v1.SchemaCatalog.tables:type_name -> bytebase.v1.TableCatalog+ 8, // 3: bytebase.v1.TableCatalog.columns:type_name -> bytebase.v1.TableCatalog.Columns+ 7, // 4: bytebase.v1.TableCatalog.object_schema:type_name -> bytebase.v1.ObjectSchema+ 9, // 5: bytebase.v1.ColumnCatalog.labels:type_name -> bytebase.v1.ColumnCatalog.LabelsEntry+ 7, // 6: bytebase.v1.ColumnCatalog.object_schema:type_name -> bytebase.v1.ObjectSchema+ 0, // 7: bytebase.v1.ObjectSchema.type:type_name -> bytebase.v1.ObjectSchema.Type+ 10, // 8: bytebase.v1.ObjectSchema.struct_kind:type_name -> bytebase.v1.ObjectSchema.StructKind+ 11, // 9: bytebase.v1.ObjectSchema.array_kind:type_name -> bytebase.v1.ObjectSchema.ArrayKind+ 6, // 10: bytebase.v1.TableCatalog.Columns.columns:type_name -> bytebase.v1.ColumnCatalog+ 12, // 11: bytebase.v1.ObjectSchema.StructKind.properties:type_name -> bytebase.v1.ObjectSchema.StructKind.PropertiesEntry+ 7, // 12: bytebase.v1.ObjectSchema.ArrayKind.kind:type_name -> bytebase.v1.ObjectSchema+ 7, // 13: bytebase.v1.ObjectSchema.StructKind.PropertiesEntry.value:type_name -> bytebase.v1.ObjectSchema+ 1, // 14: bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog:input_type -> bytebase.v1.GetDatabaseCatalogRequest+ 2, // 15: bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog:input_type -> bytebase.v1.UpdateDatabaseCatalogRequest+ 3, // 16: bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog:output_type -> bytebase.v1.DatabaseCatalog+ 3, // 17: bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog:output_type -> bytebase.v1.DatabaseCatalog+ 16, // [16:18] is the sub-list for method output_type+ 14, // [14:16] is the sub-list for method input_type+ 14, // [14:14] is the sub-list for extension type_name+ 14, // [14:14] is the sub-list for extension extendee+ 0, // [0:14] is the sub-list for field type_name}func init() { file_v1_database_catalog_service_proto_init() }diff --git a/proto/generated-go/v1/database_catalog_service.pb.gw.go b/proto/generated-go/v1/database_catalog_service.pb.gw.goindex 1b61f76067..7532ece20b 100644--- a/proto/generated-go/v1/database_catalog_service.pb.gw.go+++ b/proto/generated-go/v1/database_catalog_service.pb.gw.go@@ -71,28 +71,15 @@ func local_request_DatabaseCatalogService_GetDatabaseCatalog_0(ctx context.Contereturn msg, metadata, err}-var filter_DatabaseCatalogService_UpdateDatabaseCatalog_0 = &utilities.DoubleArray{Encoding: map[string]int{"catalog": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}}-func request_DatabaseCatalogService_UpdateDatabaseCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client DatabaseCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq UpdateDatabaseCatalogRequestmetadata runtime.ServerMetadataerr error)- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)- }- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Catalog); err != nil && !errors.Is(err, io.EOF) {+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Catalog); err != nil && !errors.Is(err, io.EOF) {return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}- if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {- if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Catalog); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- } else {- protoReq.UpdateMask = fieldMask- }- }val, ok := pathParams["catalog.name"]if !ok {return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "catalog.name")@@ -101,12 +88,6 @@ func request_DatabaseCatalogService_UpdateDatabaseCatalog_0(ctx context.Context,if err != nil {return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "catalog.name", err)}- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseCatalogService_UpdateDatabaseCatalog_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }msg, err := client.UpdateDatabaseCatalog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))return msg, metadata, err}@@ -117,20 +98,9 @@ func local_request_DatabaseCatalogService_UpdateDatabaseCatalog_0(ctx context.Cometadata runtime.ServerMetadataerr error)- newReader, berr := utilities.IOReaderFactory(req.Body)- if berr != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)- }- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Catalog); err != nil && !errors.Is(err, io.EOF) {+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Catalog); err != nil && !errors.Is(err, io.EOF) {return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)}- if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {- if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Catalog); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- } else {- protoReq.UpdateMask = fieldMask- }- }val, ok := pathParams["catalog.name"]if !ok {return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "catalog.name")@@ -139,12 +109,6 @@ func local_request_DatabaseCatalogService_UpdateDatabaseCatalog_0(ctx context.Coif err != nil {return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "catalog.name", err)}- if err := req.ParseForm(); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_DatabaseCatalogService_UpdateDatabaseCatalog_0); err != nil {- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)- }msg, err := server.UpdateDatabaseCatalog(ctx, &protoReq)return msg, metadata, err}diff --git a/proto/v1/database_catalog_service.proto b/proto/v1/database_catalog_service.protoindex 5838352347..a313a06955 100644--- a/proto/v1/database_catalog_service.proto+++ b/proto/v1/database_catalog_service.proto@@ -6,7 +6,6 @@ import "google/api/annotations.proto";import "google/api/client.proto";import "google/api/field_behavior.proto";import "google/api/resource.proto";-import "google/protobuf/field_mask.proto";import "v1/annotation.proto";option go_package = "generated-go/v1";@@ -46,9 +45,6 @@ message UpdateDatabaseCatalogRequest {// The catalog's `name` field is used to identify the database catalog to update.// Format: instances/{instance}/databases/{database}/catalogDatabaseCatalog catalog = 1 [(google.api.field_behavior) = REQUIRED];-- // The list of fields to update.- google.protobuf.FieldMask update_mask = 2;}message DatabaseCatalog {