Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: add redshift and mariadb (#5192)

Danny Xubfa74d4ad69f
diff --git a/backend/api/v1/common.go b/backend/api/v1/common.go
index f3422ce9cc..744c23cde8 100644
--- a/backend/api/v1/common.go
+++ b/backend/api/v1/common.go
@@ -315,6 +315,10 @@ func convertToEngine(engine db.Type) v1pb.Engine {
return v1pb.Engine_SPANNER
case db.MSSQL:
return v1pb.Engine_MSSQL
+ case db.Redshift:
+ return v1pb.Engine_REDSHIFT
+ case db.MariaDB:
+ return v1pb.Engine_MARIADB
}
return v1pb.Engine_ENGINE_UNSPECIFIED
}
@@ -343,6 +347,10 @@ func convertEngine(engine v1pb.Engine) db.Type {
return db.Spanner
case v1pb.Engine_MSSQL:
return db.MSSQL
+ case v1pb.Engine_REDSHIFT:
+ return db.Redshift
+ case v1pb.Engine_MARIADB:
+ return db.MariaDB
}
return db.UnknownType
}
diff --git a/backend/plugin/db/driver.go b/backend/plugin/db/driver.go
index 64d46634ba..fecad233e7 100644
--- a/backend/plugin/db/driver.go
+++ b/backend/plugin/db/driver.go
@@ -44,6 +44,10 @@ const (
Oracle Type = "ORACLE"
// MSSQL is the database type for MS SQL Server.
MSSQL Type = "MSSQL"
+ // Redshift is the database type for Redshift.
+ Redshift Type = "REDSHIFT"
+ // MariaDB is the database type for MariaDB.
+ MariaDB Type = "MARIADB"
// UnknownType is the database type for UNKNOWN.
UnknownType Type = "UNKNOWN"
diff --git a/frontend/src/assets/db-mariadb.svg b/frontend/src/assets/db-mariadb.svg
new file mode 100644
index 0000000000..157ee9c3c8
--- /dev/null
+++ b/frontend/src/assets/db-mariadb.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 789.1 195.64">
+ <defs>
+ <style>.cls-1{fill:#003545;}</style>
+ </defs>
+ <title>MDB-HLogo_RGB</title>
+ <path class="cls-1" d="M378.08,70l18.52,71.5h-14L370.26,90l-23.17,51.5H335.3l-23.07-51.2-12.68,51.2H285.89L304.21,70h12.08l24.95,55.36L366.1,70Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M449.27,97.64V89.32h13.47v52.19H449.27v-8.42c-3.56,6-10.89,9.51-19.8,9.51-18.62,0-29-13.08-29-28.23,0-14.55,9.9-26.24,27-26.24C437.29,88.13,445.41,91.5,449.27,97.64Zm-34.46,17.43c0,9.6,6,17.82,17.72,17.82,11.29,0,17.43-8,17.43-17.53s-6.33-17.62-18-17.62C420.65,97.74,414.81,105.86,414.81,115.07Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M493.13,141.51H479.66V89.32h13.47V101c3.56-8,10.79-12.87,18.81-12.87a24.2,24.2,0,0,1,8.42,1.39l-2.87,9.9a29.66,29.66,0,0,0-7.13-1c-9.71,0-17.23,7.33-17.23,18.12Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M527.09,75.55a6.86,6.86,0,0,1,7.23-7,7.1,7.1,0,0,1,7.33,7.23c0,3.47-2.38,6.93-7.33,6.93A6.93,6.93,0,0,1,527.09,75.55Zm.59,13.77h13.47v38.13c0,2.37.5,4.06,2.48,4.06a14.37,14.37,0,0,0,2.57-.3l2.08,9.8a23.72,23.72,0,0,1-8.91,1.59c-5.65,0-11.69-1.69-11.69-14.46Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M601.36,97.64V89.32h13.46v52.19H601.36v-8.42c-3.57,6-10.9,9.51-19.81,9.51-18.62,0-29-13.08-29-28.23,0-14.55,9.91-26.24,27-26.24C589.37,88.13,597.49,91.5,601.36,97.64Zm-34.47,17.43c0,9.6,6,17.82,17.73,17.82,11.29,0,17.43-8,17.43-17.53s-6.34-17.62-18-17.62C572.74,97.74,566.89,105.86,566.89,115.07Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M635.51,70H667.8c27.13,0,40.7,14.95,40.5,35.75.2,21.59-14.76,35.75-38.13,35.75H635.51Zm8.91,6.34v58.92H669c21.59,0,29.81-14.56,29.81-29.71,0-17.13-10.3-29.21-29.81-29.21Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M763.35,141.51h-41V70h36.94c14.16,0,27.63,2.67,27.43,18.52,0,11.19-6.93,14.26-14.26,15.45,10.4.89,16.64,7.52,16.64,18.22C789.19,138.24,775.13,141.51,763.35,141.51Zm-3.07-40.31c14.16,0,17.33-5.44,17.33-12.38,0-10.39-6.34-12.77-17.33-12.77H730.87V101.2Zm.39,6h-29.8v28.23H762c8.72,0,17.93-2.88,17.93-13.87C779.89,108.93,769.29,107.24,760.67,107.24Z" transform="translate(0 -3.38)"></path>
+ <path class="cls-1" d="M299.2,4.34a4.35,4.35,0,0,0-2.92-1c-2.9,0-6.65,2-8.66,3-.35.19-.62.33-.81.41A27.32,27.32,0,0,1,276,9.53c-3.86.12-7.19.35-11.5.8C238.82,13,227.43,32.6,216.42,51.6c-6,10.32-12.18,21-20.67,29.28a54.92,54.92,0,0,1-5.59,4.74c-8.78,6.54-19.81,11.17-28.43,14.47-8.26,3.15-17.28,6-26,8.74-8,2.51-15.51,4.89-22.44,7.46-3.13,1.16-5.79,2-8.13,2.83-6.31,2.1-10.87,3.62-17.51,8.17-2.59,1.77-5.19,3.69-7,5.14A73.46,73.46,0,0,0,66.8,147.05a86.62,86.62,0,0,1-11.6,14c-1.4,1.37-3.89,2-7.62,2-4.37,0-9.67-.9-15.28-1.85-5.77-1-11.75-2-16.87-2-4.17,0-7.35.67-9.74,2.06,0,0-4,2.34-5.69,5.36l1.66.75a34.71,34.71,0,0,1,7.1,5.07,35.39,35.39,0,0,0,7.37,5.25,6.61,6.61,0,0,1,2.27,1.51c-.7,1-1.73,2.35-2.8,3.76-5.92,7.74-9.37,12.63-7.39,15.29a6.09,6.09,0,0,0,3,.71c12.9,0,19.82-3.36,28.59-7.6,2.54-1.23,5.16-2.5,8.16-3.8,5.12-2.22,10.64-5.76,16.48-9.52,7.74-5,15.74-10.11,23.49-12.6a64,64,0,0,1,19.71-2.77c8.23,0,16.83,1.1,25.15,2.17,6.21.79,12.63,1.61,18.93,2,2.45.15,4.72.22,6.92.22a77.2,77.2,0,0,0,8.83-.47l.7-.24c4.42-2.72,6.49-8.55,8.5-14.18,1.29-3.63,2.37-6.89,4.05-9a2.79,2.79,0,0,1,.34-.28.4.4,0,0,1,.5.09s0,.05,0,.15c-1.06,22.06-9.9,36.05-18.88,48.49l-6,6.43s8.39,0,13.16-1.84c17.42-5.21,30.58-16.69,40.15-35a149.42,149.42,0,0,0,6.32-14.44c.16-.41,1.68-1.17,1.53.95,0,.63-.09,1.32-.14,2h0c0,.43-.06.87-.08,1.31-.25,3-1,9.57-1,9.57l5.38-2.88c13-8.22,23-24.74,30.56-50.47,3.16-10.72,5.47-21.37,7.51-30.76,2.44-11.23,4.55-20.93,7-24.68,3.78-5.89,9.55-9.87,15.13-13.73l2.28-1.58c7-4.93,14-10.62,15.54-21.22l0-.24C301.22,7.29,300.27,5.27,299.2,4.34Z" transform="translate(0 -3.38)"></path>
+</svg>
\ No newline at end of file
diff --git a/frontend/src/assets/db-redshift.svg b/frontend/src/assets/db-redshift.svg
new file mode 100644
index 0000000000..44542ec5b2
--- /dev/null
+++ b/frontend/src/assets/db-redshift.svg
@@ -0,0 +1 @@
+<svg enable-background="new 0 0 1615 1783.7" viewBox="0 0 1615 1783.7" xmlns="http://www.w3.org/2000/svg"><path d="m807.5 1363.8 678.3 161.5v-1270.5l-678.3 161.5z" fill="#205b97"/><path d="m1485.8 254.8 129.2 64.6v1141.3l-129.2 64.6zm-678.3 1109-678.3 161.5v-1270.5l678.3 161.5z" fill="#5193ce"/><path d="m129.2 254.8-129.2 64.6v1141.3l129.2 64.6z" fill="#205b97"/><path d="m979.8 1783.7 258.4-129.2v-1525.3l-258.4-129.2-79 847z" fill="#5193ce"/><path d="m635.2 1783.7-258.4-129.2v-1525.3l258.4-129.2 79 847z" fill="#205b97"/><path d="m635.2 0h348.1v1780.1h-348.1z" fill="#2e73b7"/></svg>
\ No newline at end of file
diff --git a/frontend/src/components/DatabaseOverviewPanel.vue b/frontend/src/components/DatabaseOverviewPanel.vue
index 5b6a37677d..73571f0124 100644
--- a/frontend/src/components/DatabaseOverviewPanel.vue
+++ b/frontend/src/components/DatabaseOverviewPanel.vue
@@ -274,7 +274,8 @@ const hasSchemaProperty = computed(() => {
databaseEngine.value === "POSTGRES" ||
databaseEngine.value === "SNOWFLAKE" ||
databaseEngine.value === "ORACLE" ||
- databaseEngine.value === "MSSQL"
+ databaseEngine.value === "MSSQL" ||
+ databaseEngine.value === "REDSHIFT"
);
});
diff --git a/frontend/src/components/InstanceEngineIcon.vue b/frontend/src/components/InstanceEngineIcon.vue
index 8b3d7b84ce..6a2d1d21e7 100644
--- a/frontend/src/components/InstanceEngineIcon.vue
+++ b/frontend/src/components/InstanceEngineIcon.vue
@@ -45,6 +45,8 @@ export default defineComponent({
REDIS: new URL("../assets/db-redis.png", import.meta.url).href,
ORACLE: new URL("../assets/db-oracle.svg", import.meta.url).href,
MSSQL: new URL("../assets/db-mssql.svg", import.meta.url).href,
+ REDSHIFT: new URL("../assets/db-redshift.svg", import.meta.url).href,
+ MARIADB: new URL("../assets/db-mariadb.svg", import.meta.url).href,
};
const SelectedEngineIconPath = computed(() => {
return EngineIconPath[props.instance.engine];
diff --git a/frontend/src/components/InstanceForm.vue b/frontend/src/components/InstanceForm.vue
index 89126749eb..e05e451234 100644
--- a/frontend/src/components/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm.vue
@@ -740,9 +740,11 @@ const engineList = computed(() => {
"SPANNER",
"REDIS",
"ORACLE",
+ "MSSQL",
];
if (isDev()) {
- engines.push("MSSQL");
+ engines.push("REDSHIFT");
+ engines.push("MARIADB");
}
return engines;
});
@@ -758,6 +760,8 @@ const EngineIconPath = {
REDIS: new URL("../assets/db-redis.png", import.meta.url).href,
ORACLE: new URL("../assets/db-oracle.svg", import.meta.url).href,
MSSQL: new URL("../assets/db-mssql.svg", import.meta.url).href,
+ REDSHIFT: new URL("../assets/db-redshift.svg", import.meta.url).href,
+ MARIADB: new URL("../assets/db-mariadb.svg", import.meta.url).href,
};
const mongodbConnectionStringSchemaList = ["mongodb://", "mongodb+srv://"];
@@ -847,6 +851,10 @@ const defaultPort = computed(() => {
return "";
}
return "27017";
+ } else if (basicInformation.value.engine == "REDSHIFT") {
+ return "5439";
+ } else if (basicInformation.value.engine == "MARIADB") {
+ return "3306";
}
return "3306";
});
@@ -921,7 +929,15 @@ const allowUpdate = computed((): boolean => {
});
const isEngineBeta = (engine: EngineType): boolean => {
- return ["MONGODB", "SPANNER", "REDIS", "ORACLE", "MSSQL"].includes(engine);
+ return [
+ "MONGODB",
+ "SPANNER",
+ "REDIS",
+ "ORACLE",
+ "MSSQL",
+ "REDSHIFT",
+ "MARIADB",
+ ].includes(engine);
};
// The default host name is 127.0.0.1 or host.docker.internal which is not applicable to Snowflake, so we change
diff --git a/frontend/src/types/instance.ts b/frontend/src/types/instance.ts
index fff787dd5f..6e9d4594ae 100644
--- a/frontend/src/types/instance.ts
+++ b/frontend/src/types/instance.ts
@@ -20,7 +20,9 @@ export type EngineType =
| "SPANNER"
| "REDIS"
| "ORACLE"
- | "MSSQL";
+ | "MSSQL"
+ | "REDSHIFT"
+ | "MARIADB";
export function convertEngineType(type: EngineType): Engine {
switch (type) {
@@ -44,6 +46,10 @@ export function convertEngineType(type: EngineType): Engine {
return Engine.ORACLE;
case "MSSQL":
return Engine.MSSQL;
+ case "REDSHIFT":
+ return Engine.REDSHIFT;
+ case "MARIADB":
+ return Engine.MARIADB;
}
return Engine.ENGINE_UNSPECIFIED;
}
@@ -68,6 +74,10 @@ export function defaultCharset(type: EngineType): string {
return "UTF8";
case "MSSQL":
return "";
+ case "REDSHIFT":
+ return "";
+ case "MARIADB":
+ return "";
}
}
@@ -93,6 +103,10 @@ export function engineName(type: EngineType): string {
return "Oracle";
case "MSSQL":
return "MSSQL";
+ case "REDSHIFT":
+ return "Redshift";
+ case "MARIADB":
+ return "MariaDB";
}
}
@@ -119,6 +133,10 @@ export function defaultCollation(type: EngineType): string {
return "BINARY_CI";
case "MSSQL":
return "";
+ case "REDSHIFT":
+ return "";
+ case "MARIADB":
+ return "";
}
}
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 732b3e57d6..71146cb3cc 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -42,9 +42,13 @@ export interface FileDescriptorProto {
sourceCodeInfo?: SourceCodeInfo;
/**
* The syntax of the proto file.
- * The supported values are "proto2" and "proto3".
+ * The supported values are "proto2", "proto3", and "editions".
+ *
+ * If `edition` is present, this value must be "editions".
*/
syntax: string;
+ /** The edition of the proto file, which is an opaque string. */
+ edition: string;
}
/** Describes a message type. */
@@ -619,6 +623,10 @@ 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.
*
@@ -636,12 +644,23 @@ 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.
- *
- * 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.
*/
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
+ */
+ deprecatedLegacyJsonFieldConflicts: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -705,11 +724,8 @@ export interface FieldOptions {
* check its required fields, regardless of whether or not the message has
* been parsed.
*
- * 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.
+ * 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.
*/
lazy: boolean;
/**
@@ -727,6 +743,13 @@ 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[];
}
@@ -813,6 +836,137 @@ 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[];
@@ -831,6 +985,17 @@ 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[];
}
@@ -1122,10 +1287,57 @@ export interface GeneratedCodeInfo_Annotation {
begin: number;
/**
* Identifies the ending offset in bytes in the generated code that
- * relates to the identified offset. The end offset should be one past
+ * relates to the identified object. 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 {
@@ -1202,6 +1414,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
options: undefined,
sourceCodeInfo: undefined,
syntax: "",
+ edition: "",
};
}
@@ -1247,6 +1460,9 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
writer.uint32(98).string(message.syntax);
}
+ if (message.edition !== "") {
+ writer.uint32(106).string(message.edition);
+ }
return writer;
},
@@ -1359,6 +1575,13 @@ 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;
@@ -1388,6 +1611,7 @@ 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) : "",
};
},
@@ -1434,6 +1658,7 @@ 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;
},
@@ -1459,6 +1684,7 @@ export const FileDescriptorProto = {
? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
: undefined;
message.syntax = object.syntax ?? "";
+ message.edition = object.edition ?? "";
return message;
},
};
@@ -3051,6 +3277,7 @@ function createBaseMessageOptions(): MessageOptions {
noStandardDescriptorAccessor: false,
deprecated: false,
mapEntry: false,
+ deprecatedLegacyJsonFieldConflicts: false,
uninterpretedOption: [],
};
}
@@ -3069,6 +3296,9 @@ 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();
}
@@ -3110,6 +3340,13 @@ 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;
@@ -3134,6 +3371,9 @@ 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))
: [],
@@ -3147,6 +3387,8 @@ 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 {
@@ -3165,6 +3407,7 @@ 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;
},
@@ -3179,6 +3422,9 @@ function createBaseFieldOptions(): FieldOptions {
unverifiedLazy: false,
deprecated: false,
weak: false,
+ debugRedact: false,
+ retention: 0,
+ target: 0,
uninterpretedOption: [],
};
}
@@ -3206,6 +3452,15 @@ 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();
}
@@ -3268,6 +3523,27 @@ 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;
@@ -3293,6 +3569,9 @@ 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))
: [],
@@ -3308,6 +3587,9 @@ 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 {
@@ -3329,6 +3611,9 @@ 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;
},
@@ -3399,7 +3684,7 @@ export const OneofOptions = {
};
function createBaseEnumOptions(): EnumOptions {
- return { allowAlias: false, deprecated: false, uninterpretedOption: [] };
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
}
export const EnumOptions = {
@@ -3410,6 +3695,9 @@ 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();
}
@@ -3437,6 +3725,13 @@ 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;
@@ -3457,6 +3752,9 @@ 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))
: [],
@@ -3467,6 +3765,8 @@ 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 {
@@ -3483,6 +3783,7 @@ 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;
},
@@ -4230,7 +4531,7 @@ export const GeneratedCodeInfo = {
};
function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation {
- return { path: [], sourceFile: "", begin: 0, end: 0 };
+ return { path: [], sourceFile: "", begin: 0, end: 0, semantic: 0 };
}
export const GeneratedCodeInfo_Annotation = {
@@ -4249,6 +4550,9 @@ 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;
},
@@ -4296,6 +4600,13 @@ 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;
@@ -4311,6 +4622,7 @@ 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,
};
},
@@ -4324,6 +4636,7 @@ 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;
},
@@ -4337,6 +4650,7 @@ 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/common.ts b/frontend/src/types/proto/v1/common.ts
index 85fad04670..dc89e980f6 100644
--- a/frontend/src/types/proto/v1/common.ts
+++ b/frontend/src/types/proto/v1/common.ts
@@ -54,6 +54,8 @@ export enum Engine {
ORACLE = 9,
SPANNER = 10,
MSSQL = 11,
+ REDSHIFT = 12,
+ MARIADB = 13,
UNRECOGNIZED = -1,
}
@@ -95,6 +97,12 @@ export function engineFromJSON(object: any): Engine {
case 11:
case "MSSQL":
return Engine.MSSQL;
+ case 12:
+ case "REDSHIFT":
+ return Engine.REDSHIFT;
+ case 13:
+ case "MARIADB":
+ return Engine.MARIADB;
case -1:
case "UNRECOGNIZED":
default:
@@ -128,6 +136,10 @@ export function engineToJSON(object: Engine): string {
return "SPANNER";
case Engine.MSSQL:
return "MSSQL";
+ case Engine.REDSHIFT:
+ return "REDSHIFT";
+ case Engine.MARIADB:
+ return "MARIADB";
case Engine.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 4a62f2b18c..73389f1883 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -405,6 +405,8 @@ Actuator concept is similar to the Spring Boot Actuator.
| ORACLE | 9 | |
| SPANNER | 10 | |
| MSSQL | 11 | |
+| REDSHIFT | 12 | |
+| MARIADB | 13 | |
diff --git a/proto/generated-go/v1/common.pb.go b/proto/generated-go/v1/common.pb.go
index ada49e1f0c..2f52759a34 100644
--- a/proto/generated-go/v1/common.pb.go
+++ b/proto/generated-go/v1/common.pb.go
@@ -84,6 +84,8 @@ const (
Engine_ORACLE Engine = 9
Engine_SPANNER Engine = 10
Engine_MSSQL Engine = 11
+ Engine_REDSHIFT Engine = 12
+ Engine_MARIADB Engine = 13
)
// Enum value maps for Engine.
@@ -101,6 +103,8 @@ var (
9: "ORACLE",
10: "SPANNER",
11: "MSSQL",
+ 12: "REDSHIFT",
+ 13: "MARIADB",
}
Engine_value = map[string]int32{
"ENGINE_UNSPECIFIED": 0,
@@ -115,6 +119,8 @@ var (
"ORACLE": 9,
"SPANNER": 10,
"MSSQL": 11,
+ "REDSHIFT": 12,
+ "MARIADB": 13,
}
)
@@ -153,7 +159,7 @@ var file_v1_common_proto_rawDesc = []byte{
0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45,
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a,
0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45,
- 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xaa, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69,
+ 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xc5, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69,
0x6e, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c,
0x49, 0x43, 0x4b, 0x48, 0x4f, 0x55, 0x53, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59,
@@ -164,8 +170,10 @@ var file_v1_common_proto_rawDesc = []byte{
0x4f, 0x44, 0x42, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x08,
0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x52, 0x41, 0x43, 0x4c, 0x45, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07,
0x53, 0x50, 0x41, 0x4e, 0x4e, 0x45, 0x52, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x53, 0x53,
- 0x51, 0x4c, 0x10, 0x0b, 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,
+ 0x51, 0x4c, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x44, 0x53, 0x48, 0x49, 0x46, 0x54,
+ 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x41, 0x52, 0x49, 0x41, 0x44, 0x42, 0x10, 0x0d, 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/common.proto b/proto/v1/common.proto
index b02c80342c..47a1eb976c 100644
--- a/proto/v1/common.proto
+++ b/proto/v1/common.proto
@@ -23,4 +23,6 @@ enum Engine {
ORACLE = 9;
SPANNER = 10;
MSSQL = 11;
+ REDSHIFT = 12;
+ MARIADB = 13;
}