Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: add validate only field in SetSetting (#5630)
h3n4la56be0505bc6
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 71146cb3cc..732b3e57d6 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -42,13 +42,9 @@ export interface FileDescriptorProto {sourceCodeInfo?: SourceCodeInfo;/*** The syntax of the proto file.- * The supported values are "proto2", "proto3", and "editions".- *- * If `edition` is present, this value must be "editions".+ * The supported values are "proto2" and "proto3".*/syntax: string;- /** The edition of the proto file, which is an opaque string. */- edition: string;}/** Describes a message type. */@@ -623,10 +619,6 @@ export interface MessageOptions {*/deprecated: boolean;/**- * NOTE: Do not set the option in .proto files. Always use the maps syntax- * instead. The option should only be implicitly set by the proto compiler- * parser.- ** Whether the message is an automatically generated map entry type for the* maps field.*@@ -644,23 +636,12 @@ export interface MessageOptions {* use a native map in the target language to hold the keys and values.* The reflection APIs in such implementations still need to work as* if the field is a repeated message field.- */- mapEntry: boolean;- /**- * Enable the legacy handling of JSON field name conflicts. This lowercases- * and strips underscored from the fields before comparison in proto3 only.- * The new behavior takes `json_name` into account and applies to proto2 as- * well.- *- * This should only be used as a temporary measure against broken builds due- * to the change in behavior for JSON field name conflicts.*- * TODO(b/261750190) This is legacy behavior we plan to remove once downstream- * teams have had time to migrate.- *- * @deprecated+ * NOTE: Do not set the option in .proto files. Always use the maps syntax+ * instead. The option should only be implicitly set by the proto compiler+ * parser.*/- deprecatedLegacyJsonFieldConflicts: boolean;+ mapEntry: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -724,8 +705,11 @@ export interface FieldOptions {* check its required fields, regardless of whether or not the message has* been parsed.*- * As of May 2022, lazy verifies the contents of the byte stream during- * parsing. An invalid byte stream will cause the overall parsing to fail.+ * As of 2021, lazy does no correctness checks on the byte stream during+ * parsing. This may lead to crashes if and when an invalid byte stream is+ * finally parsed upon access.+ *+ * TODO(b/211906113): Enable validation on lazy fields.*/lazy: boolean;/**@@ -743,13 +727,6 @@ export interface FieldOptions {deprecated: boolean;/** For Google-internal migration only. Do not use. */weak: boolean;- /**- * Indicate that the field value should not be printed out when using debug- * formats, e.g. when the field contains sensitive credentials.- */- debugRedact: boolean;- retention: FieldOptions_OptionRetention;- target: FieldOptions_OptionTargetType;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -836,137 +813,6 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string {}}-/**- * 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 = 0,- RETENTION_RUNTIME = 1,- RETENTION_SOURCE = 2,- UNRECOGNIZED = -1,-}--export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention {- switch (object) {- case 0:- case "RETENTION_UNKNOWN":- return FieldOptions_OptionRetention.RETENTION_UNKNOWN;- case 1:- case "RETENTION_RUNTIME":- return FieldOptions_OptionRetention.RETENTION_RUNTIME;- case 2:- case "RETENTION_SOURCE":- return FieldOptions_OptionRetention.RETENTION_SOURCE;- case -1:- case "UNRECOGNIZED":- default:- return FieldOptions_OptionRetention.UNRECOGNIZED;- }-}--export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string {- switch (object) {- case FieldOptions_OptionRetention.RETENTION_UNKNOWN:- return "RETENTION_UNKNOWN";- case FieldOptions_OptionRetention.RETENTION_RUNTIME:- return "RETENTION_RUNTIME";- case FieldOptions_OptionRetention.RETENTION_SOURCE:- return "RETENTION_SOURCE";- case FieldOptions_OptionRetention.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--/**- * 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. 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 = 0,- TARGET_TYPE_FILE = 1,- TARGET_TYPE_EXTENSION_RANGE = 2,- TARGET_TYPE_MESSAGE = 3,- TARGET_TYPE_FIELD = 4,- TARGET_TYPE_ONEOF = 5,- TARGET_TYPE_ENUM = 6,- TARGET_TYPE_ENUM_ENTRY = 7,- TARGET_TYPE_SERVICE = 8,- TARGET_TYPE_METHOD = 9,- UNRECOGNIZED = -1,-}--export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType {- switch (object) {- case 0:- case "TARGET_TYPE_UNKNOWN":- return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;- case 1:- case "TARGET_TYPE_FILE":- return FieldOptions_OptionTargetType.TARGET_TYPE_FILE;- case 2:- case "TARGET_TYPE_EXTENSION_RANGE":- return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE;- case 3:- case "TARGET_TYPE_MESSAGE":- return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE;- case 4:- case "TARGET_TYPE_FIELD":- return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD;- case 5:- case "TARGET_TYPE_ONEOF":- return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF;- case 6:- case "TARGET_TYPE_ENUM":- return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM;- case 7:- case "TARGET_TYPE_ENUM_ENTRY":- return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY;- case 8:- case "TARGET_TYPE_SERVICE":- return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE;- case 9:- case "TARGET_TYPE_METHOD":- return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD;- case -1:- case "UNRECOGNIZED":- default:- return FieldOptions_OptionTargetType.UNRECOGNIZED;- }-}--export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string {- switch (object) {- case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN:- return "TARGET_TYPE_UNKNOWN";- case FieldOptions_OptionTargetType.TARGET_TYPE_FILE:- return "TARGET_TYPE_FILE";- case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE:- return "TARGET_TYPE_EXTENSION_RANGE";- case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE:- return "TARGET_TYPE_MESSAGE";- case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD:- return "TARGET_TYPE_FIELD";- case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF:- return "TARGET_TYPE_ONEOF";- case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM:- return "TARGET_TYPE_ENUM";- case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY:- return "TARGET_TYPE_ENUM_ENTRY";- case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE:- return "TARGET_TYPE_SERVICE";- case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD:- return "TARGET_TYPE_METHOD";- case FieldOptions_OptionTargetType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}-export interface OneofOptions {/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];@@ -985,17 +831,6 @@ export interface EnumOptions {* is a formalization for deprecating enums.*/deprecated: boolean;- /**- * Enable the legacy handling of JSON field name conflicts. This lowercases- * and strips underscored from the fields before comparison in proto3 only.- * The new behavior takes `json_name` into account and applies to proto2 as- * well.- * TODO(b/261750190) Remove this legacy behavior once downstream teams have- * had time to migrate.- *- * @deprecated- */- deprecatedLegacyJsonFieldConflicts: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1287,57 +1122,10 @@ export interface GeneratedCodeInfo_Annotation {begin: number;/*** Identifies the ending offset in bytes in the generated code that- * relates to the identified object. The end offset should be one past+ * relates to the identified offset. The end offset should be one past* the last relevant byte (so the length of the text = end - begin).*/end: number;- semantic: GeneratedCodeInfo_Annotation_Semantic;-}--/**- * Represents the identified object's effect on the element in the original- * .proto file.- */-export enum GeneratedCodeInfo_Annotation_Semantic {- /** NONE - There is no effect or the effect is indescribable. */- NONE = 0,- /** SET - The element is set or otherwise mutated. */- SET = 1,- /** ALIAS - An alias to the element is returned. */- ALIAS = 2,- UNRECOGNIZED = -1,-}--export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic {- switch (object) {- case 0:- case "NONE":- return GeneratedCodeInfo_Annotation_Semantic.NONE;- case 1:- case "SET":- return GeneratedCodeInfo_Annotation_Semantic.SET;- case 2:- case "ALIAS":- return GeneratedCodeInfo_Annotation_Semantic.ALIAS;- case -1:- case "UNRECOGNIZED":- default:- return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED;- }-}--export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string {- switch (object) {- case GeneratedCodeInfo_Annotation_Semantic.NONE:- return "NONE";- case GeneratedCodeInfo_Annotation_Semantic.SET:- return "SET";- case GeneratedCodeInfo_Annotation_Semantic.ALIAS:- return "ALIAS";- case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }}function createBaseFileDescriptorSet(): FileDescriptorSet {@@ -1414,7 +1202,6 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",- edition: "",};}@@ -1460,9 +1247,6 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}- if (message.edition !== "") {- writer.uint32(106).string(message.edition);- }return writer;},@@ -1575,13 +1359,6 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;- case 13:- if (tag != 106) {- break;- }-- message.edition = reader.string();- continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -1611,7 +1388,6 @@ export const FileDescriptorProto = {options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,syntax: isSet(object.syntax) ? String(object.syntax) : "",- edition: isSet(object.edition) ? String(object.edition) : "",};},@@ -1658,7 +1434,6 @@ export const FileDescriptorProto = {message.sourceCodeInfo !== undefined &&(obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);message.syntax !== undefined && (obj.syntax = message.syntax);- message.edition !== undefined && (obj.edition = message.edition);return obj;},@@ -1684,7 +1459,6 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";- message.edition = object.edition ?? "";return message;},};@@ -3277,7 +3051,6 @@ function createBaseMessageOptions(): MessageOptions {noStandardDescriptorAccessor: false,deprecated: false,mapEntry: false,- deprecatedLegacyJsonFieldConflicts: false,uninterpretedOption: [],};}@@ -3296,9 +3069,6 @@ export const MessageOptions = {if (message.mapEntry === true) {writer.uint32(56).bool(message.mapEntry);}- if (message.deprecatedLegacyJsonFieldConflicts === true) {- writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3340,13 +3110,6 @@ export const MessageOptions = {message.mapEntry = reader.bool();continue;- case 11:- if (tag != 88) {- break;- }-- message.deprecatedLegacyJsonFieldConflicts = reader.bool();- continue;case 999:if (tag != 7994) {break;@@ -3371,9 +3134,6 @@ export const MessageOptions = {: false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false,- deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)- : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3387,8 +3147,6 @@ export const MessageOptions = {(obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);- message.deprecatedLegacyJsonFieldConflicts !== undefined &&- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3407,7 +3165,6 @@ export const MessageOptions = {message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false;message.deprecated = object.deprecated ?? false;message.mapEntry = object.mapEntry ?? false;- message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3422,9 +3179,6 @@ function createBaseFieldOptions(): FieldOptions {unverifiedLazy: false,deprecated: false,weak: false,- debugRedact: false,- retention: 0,- target: 0,uninterpretedOption: [],};}@@ -3452,15 +3206,6 @@ export const FieldOptions = {if (message.weak === true) {writer.uint32(80).bool(message.weak);}- if (message.debugRedact === true) {- writer.uint32(128).bool(message.debugRedact);- }- if (message.retention !== 0) {- writer.uint32(136).int32(message.retention);- }- if (message.target !== 0) {- writer.uint32(144).int32(message.target);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3523,27 +3268,6 @@ export const FieldOptions = {message.weak = reader.bool();continue;- case 16:- if (tag != 128) {- break;- }-- message.debugRedact = reader.bool();- continue;- case 17:- if (tag != 136) {- break;- }-- message.retention = reader.int32() as any;- continue;- case 18:- if (tag != 144) {- break;- }-- message.target = reader.int32() as any;- continue;case 999:if (tag != 7994) {break;@@ -3569,9 +3293,6 @@ export const FieldOptions = {unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,weak: isSet(object.weak) ? Boolean(object.weak) : false,- debugRedact: isSet(object.debugRedact) ? Boolean(object.debugRedact) : false,- retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,- target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3587,9 +3308,6 @@ export const FieldOptions = {message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);message.deprecated !== undefined && (obj.deprecated = message.deprecated);message.weak !== undefined && (obj.weak = message.weak);- message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);- message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));- message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3611,9 +3329,6 @@ export const FieldOptions = {message.unverifiedLazy = object.unverifiedLazy ?? false;message.deprecated = object.deprecated ?? false;message.weak = object.weak ?? false;- message.debugRedact = object.debugRedact ?? false;- message.retention = object.retention ?? 0;- message.target = object.target ?? 0;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3684,7 +3399,7 @@ export const OneofOptions = {};function createBaseEnumOptions(): EnumOptions {- return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };+ return { allowAlias: false, deprecated: false, uninterpretedOption: [] };}export const EnumOptions = {@@ -3695,9 +3410,6 @@ export const EnumOptions = {if (message.deprecated === true) {writer.uint32(24).bool(message.deprecated);}- if (message.deprecatedLegacyJsonFieldConflicts === true) {- writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);- }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3725,13 +3437,6 @@ export const EnumOptions = {message.deprecated = reader.bool();continue;- case 6:- if (tag != 48) {- break;- }-- message.deprecatedLegacyJsonFieldConflicts = reader.bool();- continue;case 999:if (tag != 7994) {break;@@ -3752,9 +3457,6 @@ export const EnumOptions = {return {allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false,deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false,- deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)- ? Boolean(object.deprecatedLegacyJsonFieldConflicts)- : false,uninterpretedOption: Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3765,8 +3467,6 @@ export const EnumOptions = {const obj: any = {};message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);message.deprecated !== undefined && (obj.deprecated = message.deprecated);- message.deprecatedLegacyJsonFieldConflicts !== undefined &&- (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);if (message.uninterpretedOption) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);} else {@@ -3783,7 +3483,6 @@ export const EnumOptions = {const message = createBaseEnumOptions();message.allowAlias = object.allowAlias ?? false;message.deprecated = object.deprecated ?? false;- message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -4531,7 +4230,7 @@ export const GeneratedCodeInfo = {};function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {- return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };+ return { path: [], sourceFile: "", begin: 0, end: 0 };}export const GeneratedCodeInfo_Annotation = {@@ -4550,9 +4249,6 @@ export const GeneratedCodeInfo_Annotation = {if (message.end !== 0) {writer.uint32(32).int32(message.end);}- if (message.semantic !== 0) {- writer.uint32(40).int32(message.semantic);- }return writer;},@@ -4600,13 +4296,6 @@ export const GeneratedCodeInfo_Annotation = {message.end = reader.int32();continue;- case 5:- if (tag != 40) {- break;- }-- message.semantic = reader.int32() as any;- continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -4622,7 +4311,6 @@ export const GeneratedCodeInfo_Annotation = {sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "",begin: isSet(object.begin) ? Number(object.begin) : 0,end: isSet(object.end) ? Number(object.end) : 0,- semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0,};},@@ -4636,7 +4324,6 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);message.begin !== undefined && (obj.begin = Math.round(message.begin));message.end !== undefined && (obj.end = Math.round(message.end));- message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));return obj;},@@ -4650,7 +4337,6 @@ export const GeneratedCodeInfo_Annotation = {message.sourceFile = object.sourceFile ?? "";message.begin = object.begin ?? 0;message.end = object.end ?? 0;- message.semantic = object.semantic ?? 0;return message;},};diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 220f922508..7ddc6816ef 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -19,6 +19,11 @@ export interface GetSettingResponse {export interface SetSettingRequest {/** The setting to update. */setting?: Setting;+ /**+ * validate_only is a flag to indicate whether to validate the setting value,+ * server would not persist the setting value if it is true.+ */+ validateOnly: boolean;}/** The schema of setting. */@@ -155,7 +160,7 @@ export const GetSettingResponse = {};function createBaseSetSettingRequest(): SetSettingRequest {- return { setting: undefined };+ return { setting: undefined, validateOnly: false };}export const SetSettingRequest = {@@ -163,6 +168,9 @@ export const SetSettingRequest = {if (message.setting !== undefined) {Setting.encode(message.setting, writer.uint32(10).fork()).ldelim();}+ if (message.validateOnly === true) {+ writer.uint32(16).bool(message.validateOnly);+ }return writer;},@@ -180,6 +188,13 @@ export const SetSettingRequest = {message.setting = Setting.decode(reader, reader.uint32());continue;+ case 2:+ if (tag != 16) {+ break;+ }++ message.validateOnly = reader.bool();+ continue;}if ((tag & 7) == 4 || tag == 0) {break;@@ -190,12 +205,16 @@ export const SetSettingRequest = {},fromJSON(object: any): SetSettingRequest {- return { setting: isSet(object.setting) ? Setting.fromJSON(object.setting) : undefined };+ return {+ setting: isSet(object.setting) ? Setting.fromJSON(object.setting) : undefined,+ validateOnly: isSet(object.validateOnly) ? Boolean(object.validateOnly) : false,+ };},toJSON(message: SetSettingRequest): unknown {const obj: any = {};message.setting !== undefined && (obj.setting = message.setting ? Setting.toJSON(message.setting) : undefined);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},@@ -208,6 +227,7 @@ export const SetSettingRequest = {message.setting = (object.setting !== undefined && object.setting !== null)? Setting.fromPartial(object.setting): undefined;+ message.validateOnly = object.validateOnly ?? false;return message;},};diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 13aeb4431d..3cca1fd9c2 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -4795,6 +4795,7 @@ The request message for updating a setting.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || setting | [Setting](#bytebase-v1-Setting) | | The setting to update. |+| validate_only | [bool](#bool) | | validate_only is a flag to indicate whether to validate the setting value, server would not persist the setting value if it is true. |diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex 809a62ef97..87eb063d63 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -126,6 +126,9 @@ type SetSettingRequest struct {// The setting to update.Setting *Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`+ // validate_only is a flag to indicate whether to validate the setting value,+ // server would not persist the setting value if it is true.+ ValidateOnly bool `protobuf:"varint,2,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"`}func (x *SetSettingRequest) Reset() {@@ -167,6 +170,13 @@ func (x *SetSettingRequest) GetSetting() *Setting {return nil}+func (x *SetSettingRequest) GetValidateOnly() bool {+ if x != nil {+ return x.ValidateOnly+ }+ return false+}+// The schema of setting.type Setting struct {state protoimpl.MessageState@@ -317,36 +327,38 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01,0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x22, 0x48, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x69, 0x6e, 0x67, 0x22, 0x6d, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74,0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65,0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42,- 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x47, 0x0a,- 0x07, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05,- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,- 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x35, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,- 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,- 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56,- 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xee, 0x01,- 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,- 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,- 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73,- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x0a, 0x53, 0x65,- 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2e,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32,- 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61,- 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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,+ 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a,+ 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x6e,+ 0x6c, 0x79, 0x22, 0x47, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,+ 0x65, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,+ 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56,+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x35, 0x0a, 0x05, 0x56,+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76,+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74,+ 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c,+ 0x75, 0x65, 0x32, 0xee, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75,+ 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x24, 0xda, 0x41, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x72, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74,+ 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69,+ 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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/generated-go/v1/setting_service.pb.gw.go b/proto/generated-go/v1/setting_service.pb.gw.goindex bc7dd2ae4e..37b4487494 100644--- a/proto/generated-go/v1/setting_service.pb.gw.go+++ b/proto/generated-go/v1/setting_service.pb.gw.go@@ -83,6 +83,10 @@ func local_request_SettingService_GetSetting_0(ctx context.Context, marshaler ru}+var (+ filter_SettingService_SetSetting_0 = &utilities.DoubleArray{Encoding: map[string]int{"setting": 0, "name": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}}+)+func request_SettingService_SetSetting_0(ctx context.Context, marshaler runtime.Marshaler, client SettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var protoReq SetSettingRequestvar metadata runtime.ServerMetadata@@ -112,6 +116,13 @@ func request_SettingService_SetSetting_0(ctx context.Context, marshaler runtime.return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "setting.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_SettingService_SetSetting_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+msg, err := client.SetSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))return msg, metadata, err@@ -146,6 +157,13 @@ func local_request_SettingService_SetSetting_0(ctx context.Context, marshaler rureturn nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "setting.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_SettingService_SetSetting_0); err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+msg, err := server.SetSetting(ctx, &protoReq)return msg, metadata, errdiff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex 29518f1173..69ef679656 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -37,6 +37,10 @@ message GetSettingResponse {message SetSettingRequest {// The setting to update.Setting setting = 1 [(google.api.field_behavior) = REQUIRED];++ // validate_only is a flag to indicate whether to validate the setting value,+ // server would not persist the setting value if it is true.+ bool validate_only = 2;}// The schema of setting.