diff --git a/api/managementpb/json/client/rds/add_rds_responses.go b/api/managementpb/json/client/rds/add_rds_responses.go index 66474eb916..8b51a6a1f8 100644 --- a/api/managementpb/json/client/rds/add_rds_responses.go +++ b/api/managementpb/json/client/rds/add_rds_responses.go @@ -222,6 +222,9 @@ type AddRDSBody struct { // Limit of databases for auto-discovery. AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` } // Validate validates this add RDS body diff --git a/api/managementpb/json/managementpb.json b/api/managementpb/json/managementpb.json index 9316d2a776..cb9cb3873b 100644 --- a/api/managementpb/json/managementpb.json +++ b/api/managementpb/json/managementpb.json @@ -5167,6 +5167,11 @@ "type": "boolean", "x-order": 24 }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 31 + }, "disable_enhanced_metrics": { "description": "Disable enhanced metrics.", "type": "boolean", diff --git a/api/managementpb/rds.pb.go b/api/managementpb/rds.pb.go index e77a001e09..0e5d28b1d0 100644 --- a/api/managementpb/rds.pb.go +++ b/api/managementpb/rds.pb.go @@ -362,6 +362,8 @@ type AddRDSRequest struct { Database string `protobuf:"bytes,30,opt,name=database,proto3" json:"database,omitempty"` // Limit of databases for auto-discovery. AutoDiscoveryLimit int32 `protobuf:"varint,31,opt,name=auto_discovery_limit,json=autoDiscoveryLimit,proto3" json:"auto_discovery_limit,omitempty"` + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `protobuf:"varint,32,opt,name=disable_comments_parsing,json=disableCommentsParsing,proto3" json:"disable_comments_parsing,omitempty"` } func (x *AddRDSRequest) Reset() { @@ -613,6 +615,13 @@ func (x *AddRDSRequest) GetAutoDiscoveryLimit() int32 { return 0 } +func (x *AddRDSRequest) GetDisableCommentsParsing() bool { + if x != nil { + return x.DisableCommentsParsing + } + return false +} + type AddRDSResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -772,7 +781,7 @@ var file_managementpb_rds_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0xde, 0x0a, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, + 0x73, 0x22, 0x98, 0x0b, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -854,84 +863,87 @@ var file_managementpb_rds_proto_rawDesc = []byte{ 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xda, 0x04, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, - 0x6f, 0x64, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x44, 0x53, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x52, 0x0b, 0x72, 0x64, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2d, - 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x42, 0x0a, - 0x0f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x52, 0x0e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x12, 0x54, 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, - 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x51, 0x41, 0x4e, 0x4d, - 0x79, 0x53, 0x51, 0x4c, 0x50, 0x65, 0x72, 0x66, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, - 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x12, 0x69, 0x0a, 0x1b, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x51, 0x41, 0x4e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x53, 0x51, 0x4c, 0x50, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x52, 0x19, 0x71, 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, - 0x69, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, - 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, - 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, - 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x1b, 0x0a, - 0x17, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x50, 0x4f, - 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x32, 0xae, 0x02, 0x0a, 0x03, 0x52, - 0x44, 0x53, 0x12, 0xa1, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, - 0x44, 0x53, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x82, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x52, 0x44, - 0x53, 0x12, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, - 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, - 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, - 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x41, 0x64, 0x64, 0x42, 0x8b, 0x01, 0x0a, 0x0e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, - 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, - 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0xe2, 0x02, 0x16, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x20, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x1a, 0x3f, 0x0a, 0x11, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xda, 0x04, 0x0a, + 0x0e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x39, 0x0a, + 0x0c, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x52, 0x44, 0x53, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x72, 0x64, 0x73, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x42, 0x0a, 0x0f, 0x6d, 0x79, 0x73, 0x71, 0x6c, + 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4d, 0x79, 0x53, + 0x51, 0x4c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x14, 0x71, + 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x51, 0x41, 0x4e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x50, 0x65, + 0x72, 0x66, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x71, + 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x69, + 0x0a, 0x1b, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x51, 0x41, 0x4e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x50, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x19, + 0x71, 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x69, 0x0a, 0x11, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1f, + 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x45, + 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, + 0x16, 0x0a, 0x12, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, + 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x49, 0x53, 0x43, 0x4f, + 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, + 0x51, 0x4c, 0x10, 0x02, 0x32, 0xae, 0x02, 0x0a, 0x03, 0x52, 0x44, 0x53, 0x12, 0xa1, 0x01, 0x0a, + 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x12, 0x1e, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, + 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, + 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x12, 0x82, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x12, 0x19, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, + 0x1a, 0x12, 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, + 0x53, 0x2f, 0x41, 0x64, 0x64, 0x42, 0x8b, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, + 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0xca, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0xe2, 0x02, 0x16, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/managementpb/rds.pb.validate.go b/api/managementpb/rds.pb.validate.go index fe7d684fa0..f11c482138 100644 --- a/api/managementpb/rds.pb.validate.go +++ b/api/managementpb/rds.pb.validate.go @@ -524,6 +524,8 @@ func (m *AddRDSRequest) validate(all bool) error { // no validation rules for AutoDiscoveryLimit + // no validation rules for DisableCommentsParsing + if len(errors) > 0 { return AddRDSRequestMultiError(errors) } diff --git a/api/managementpb/rds.proto b/api/managementpb/rds.proto index a214130871..fbb70f3760 100644 --- a/api/managementpb/rds.proto +++ b/api/managementpb/rds.proto @@ -116,6 +116,8 @@ message AddRDSRequest { string database = 30; // Limit of databases for auto-discovery. int32 auto_discovery_limit = 31; + // Disable parsing comments from queries and showing them in QAN. + bool disable_comments_parsing = 32; } message AddRDSResponse { diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 20fda6ab9d..fc9a8d4331 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -29129,6 +29129,11 @@ "type": "integer", "format": "int32", "x-order": 30 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 31 } } } diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 9baf6b7a01..7f6c9b437a 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -20312,6 +20312,11 @@ "type": "integer", "format": "int32", "x-order": 30 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 31 } } } diff --git a/managed/services/management/rds.go b/managed/services/management/rds.go index 74f9df84d7..2ff44d2c30 100644 --- a/managed/services/management/rds.go +++ b/managed/services/management/rds.go @@ -368,13 +368,14 @@ func (s *RDSService) AddRDS(ctx context.Context, req *managementpb.AddRDSRequest // add MySQL PerfSchema QAN Agent if req.QanMysqlPerfschema { qanAgent, err := models.CreateAgent(tx.Querier, models.QANMySQLPerfSchemaAgentType, &models.CreateAgentParams{ - PMMAgentID: models.PMMServerAgentID, - ServiceID: service.ServiceID, - Username: req.Username, - Password: req.Password, - TLS: req.Tls, - TLSSkipVerify: req.TlsSkipVerify, - QueryExamplesDisabled: req.DisableQueryExamples, + PMMAgentID: models.PMMServerAgentID, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, + QueryExamplesDisabled: req.DisableQueryExamples, + CommentsParsingDisabled: req.DisableCommentsParsing, }) if err != nil { return err @@ -446,16 +447,17 @@ func (s *RDSService) AddRDS(ctx context.Context, req *managementpb.AddRDSRequest } } - // add MySQL PerfSchema QAN Agent + // add PostgreSQL Pgstatements QAN Agent if req.QanPostgresqlPgstatements { qanAgent, err := models.CreateAgent(tx.Querier, models.QANPostgreSQLPgStatementsAgentType, &models.CreateAgentParams{ - PMMAgentID: models.PMMServerAgentID, - ServiceID: service.ServiceID, - Username: req.Username, - Password: req.Password, - TLS: req.Tls, - TLSSkipVerify: req.TlsSkipVerify, - QueryExamplesDisabled: req.DisableQueryExamples, + PMMAgentID: models.PMMServerAgentID, + ServiceID: service.ServiceID, + Username: req.Username, + Password: req.Password, + TLS: req.Tls, + TLSSkipVerify: req.TlsSkipVerify, + QueryExamplesDisabled: req.DisableQueryExamples, + CommentsParsingDisabled: req.DisableCommentsParsing, }) if err != nil { return err