Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: deprecate instance anomalies (#14956)
Danny Xu22d2fb3a342b
diff --git a/backend/api/v1/anomaly_service.go b/backend/api/v1/anomaly_service.goindex 8c7a457dd5..6487c5297a 100644--- a/backend/api/v1/anomaly_service.go+++ b/backend/api/v1/anomaly_service.go@@ -3,7 +3,6 @@ package v1import ("context""fmt"- "strings""time""github.com/pkg/errors"@@ -24,8 +23,6 @@ const ()var typesMap = map[string]api.AnomalyType{- "INSTANCE_CONNECTION": api.AnomalyInstanceConnection,- "MIGRATION_SCHEMA": api.AnomalyInstanceMigrationSchema,"DATABASE_CONNECTION": api.AnomalyDatabaseConnection,"DATABASE_SCHEMA_DRIFT": api.AnomalyDatabaseSchemaDrift,}@@ -69,43 +66,30 @@ func (s *AnomalyService) SearchAnomalies(ctx context.Context, request *v1pb.Searif len(resources) > 1 {return nil, status.Errorf(codes.InvalidArgument, "only one resource can be specified")} else if len(resources) == 1 {- sections := strings.Split(resources[0], "/")- if len(sections) == 2 {- // Treat as instances/{resource id}- insID, err := common.GetInstanceID(resources[0])- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, `invalid resource filter "%s": %v`, resources[0], err.Error())- }- find.InstanceID = &insID- } else if len(sections) == 4 {- // Treat as instances/{resource id}/databases/{db name}- insID, dbName, err := common.GetInstanceDatabaseID(resources[0])- if err != nil {- return nil, status.Errorf(codes.InvalidArgument, `invalid resource filter "%s": %v`, resources[0], err.Error())- }- instance, err := s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &insID})- if err != nil {- return nil, errors.Wrapf(err, "failed to get instance %s", insID)- }- if instance == nil {- return nil, status.Errorf(codes.NotFound, "instance %q not found", insID)- }- database, err := s.store.GetDatabaseV2(ctx, &store.FindDatabaseMessage{- InstanceID: &insID,- DatabaseName: &dbName,- IgnoreCaseSensitive: store.IgnoreDatabaseAndTableCaseSensitive(instance),- })- if err != nil {- return nil, status.Error(codes.Internal, err.Error())- }- if database == nil {- return nil, status.Errorf(codes.NotFound, "cannot found the database %s", resources[0])- }- find.InstanceID = &insID- find.DatabaseUID = &database.UID- } else {- return nil, status.Errorf(codes.InvalidArgument, `invalid resource filter "%s"`, resources[0])+ insID, dbName, err := common.GetInstanceDatabaseID(resources[0])+ if err != nil {+ return nil, status.Errorf(codes.InvalidArgument, `invalid resource filter "%s": %v`, resources[0], err.Error())+ }+ instance, err := s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &insID})+ if err != nil {+ return nil, errors.Wrapf(err, "failed to get instance %s", insID)+ }+ if instance == nil {+ return nil, status.Errorf(codes.NotFound, "instance %q not found", insID)}+ database, err := s.store.GetDatabaseV2(ctx, &store.FindDatabaseMessage{+ InstanceID: &insID,+ DatabaseName: &dbName,+ IgnoreCaseSensitive: store.IgnoreDatabaseAndTableCaseSensitive(instance),+ })+ if err != nil {+ return nil, status.Error(codes.Internal, err.Error())+ }+ if database == nil {+ return nil, status.Errorf(codes.NotFound, "cannot found the database %s", resources[0])+ }+ find.InstanceID = &insID+ find.DatabaseUID = &database.UID}}@@ -148,17 +132,6 @@ func (s *AnomalyService) convertToAnomaly(ctx context.Context, anomaly *store.An}switch anomaly.Type {- case api.AnomalyInstanceConnection:- detail := &storepb.AnomalyConnectionPayload{}- if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(anomaly.Payload), detail); err != nil {- return nil, errors.Wrapf(err, "failed to unmarshal instance connection anomaly payload")- }- pbAnomaly.Type = v1pb.Anomaly_INSTANCE_CONNECTION- pbAnomaly.Detail = &v1pb.Anomaly_InstanceConnectionDetail_{- InstanceConnectionDetail: &v1pb.Anomaly_InstanceConnectionDetail{- Detail: detail.Detail,- },- }case api.AnomalyDatabaseConnection:detail := &storepb.AnomalyConnectionPayload{}if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(anomaly.Payload), detail); err != nil {@@ -190,7 +163,7 @@ func (s *AnomalyService) convertToAnomaly(ctx context.Context, anomaly *store.Anfunc getSeverityFromAnomalyType(tp v1pb.Anomaly_AnomalyType) v1pb.Anomaly_AnomalySeverity {switch tp {- case v1pb.Anomaly_INSTANCE_CONNECTION, v1pb.Anomaly_MIGRATION_SCHEMA, v1pb.Anomaly_DATABASE_CONNECTION, v1pb.Anomaly_DATABASE_SCHEMA_DRIFT:+ case v1pb.Anomaly_DATABASE_CONNECTION, v1pb.Anomaly_DATABASE_SCHEMA_DRIFT:return v1pb.Anomaly_CRITICAL}return v1pb.Anomaly_ANOMALY_SEVERITY_UNSPECIFIEDdiff --git a/backend/legacyapi/anomaly.go b/backend/legacyapi/anomaly.goindex ce9f1e7b37..fa7db9335d 100644--- a/backend/legacyapi/anomaly.go+++ b/backend/legacyapi/anomaly.go@@ -4,10 +4,6 @@ package apitype AnomalyType stringconst (- // AnomalyInstanceConnection is the anomaly type for instance connections.- AnomalyInstanceConnection AnomalyType = "bb.anomaly.instance.connection"- // AnomalyInstanceMigrationSchema is the anomaly type for schema migrations.- AnomalyInstanceMigrationSchema AnomalyType = "bb.anomaly.instance.migration-schema"// AnomalyDatabaseConnection is the anomaly type for database connections.AnomalyDatabaseConnection AnomalyType = "bb.anomaly.database.connection"// AnomalyDatabaseSchemaDrift is the anomaly type for database schema drifts.diff --git a/backend/migrator/migration/prod/3.3/0007##instance_anomaly.sql b/backend/migrator/migration/prod/3.3/0007##instance_anomaly.sqlnew file mode 100644index 0000000000..a1a4becdb5--- /dev/null+++ b/backend/migrator/migration/prod/3.3/0007##instance_anomaly.sql@@ -0,0 +1 @@+DELETE FROM anomaly WHERE type = 'bb.anomaly.instance.connection' OR type = 'bb.anomaly.instance.migration-schema';\ No newline at end of filediff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex bf5f020cd2..2a11eae5e1 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -231,5 +231,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.3.6"), releaseVersion)+ require.Equal(t, semver.MustParse("3.3.7"), releaseVersion)}diff --git a/backend/runner/schemasync/syncer.go b/backend/runner/schemasync/syncer.goindex cc1ed5f69a..9e947dcf4e 100644--- a/backend/runner/schemasync/syncer.go+++ b/backend/runner/schemasync/syncer.go@@ -285,10 +285,8 @@ func (s *Syncer) SyncInstance(ctx context.Context, instance *store.InstanceMessainstanceMeta, err := s.GetInstanceMeta(ctx, instance)if err != nil {- s.upsertInstanceConnectionAnomaly(ctx, instance, err)return nil, nil, nil, err}- s.upsertInstanceConnectionAnomaly(ctx, instance, nil)updateInstance := &store.UpdateInstanceMessage{ResourceID: instance.ResourceID,@@ -679,44 +677,6 @@ func (s *Syncer) hasBackupSchema(ctx context.Context, instance *store.InstanceMereturn false}-func (s *Syncer) upsertInstanceConnectionAnomaly(ctx context.Context, instance *store.InstanceMessage, connErr error) {- if connErr != nil {- anomalyPayload := &storepb.AnomalyConnectionPayload{- Detail: connErr.Error(),- }- payload, err := protojson.Marshal(anomalyPayload)- if err != nil {- slog.Error("Failed to marshal anomaly payload",- slog.String("instance", instance.ResourceID),- slog.String("type", string(api.AnomalyInstanceConnection)),- log.BBError(err))- return- }- if _, err = s.store.UpsertActiveAnomalyV2(ctx, api.SystemBotID, &store.AnomalyMessage{- InstanceID: instance.ResourceID,- Type: api.AnomalyInstanceConnection,- Payload: string(payload),- }); err != nil {- slog.Error("Failed to create anomaly",- slog.String("instance", instance.ResourceID),- slog.String("type", string(api.AnomalyInstanceConnection)),- log.BBError(err))- }- return- }-- err := s.store.ArchiveAnomalyV2(ctx, &store.ArchiveAnomalyMessage{- InstanceID: &instance.ResourceID,- Type: api.AnomalyInstanceConnection,- })- if err != nil && common.ErrorCode(err) != common.NotFound {- slog.Error("Failed to close anomaly",- slog.String("instance", instance.ResourceID),- slog.String("type", string(api.AnomalyInstanceConnection)),- log.BBError(err))- }-}-func (s *Syncer) upsertDatabaseConnectionAnomaly(ctx context.Context, instance *store.InstanceMessage, database *store.DatabaseMessage, connErr error) {if connErr != nil {anomalyPayload := &storepb.AnomalyConnectionPayload{diff --git a/frontend/src/components/AnomalyCenter/AnomalyTable.vue b/frontend/src/components/AnomalyCenter/AnomalyTable.vueindex 7c2628515c..6787e6ec3a 100644--- a/frontend/src/components/AnomalyCenter/AnomalyTable.vue+++ b/frontend/src/components/AnomalyCenter/AnomalyTable.vue@@ -143,10 +143,6 @@ const columnList = computed(() => [const typeName = (type: Anomaly_AnomalyType): string => {switch (type) {- case Anomaly_AnomalyType.INSTANCE_CONNECTION:- return t("anomaly.types.connection-failure");- case Anomaly_AnomalyType.MIGRATION_SCHEMA:- return t("anomaly.types.missing-migration-schema");case Anomaly_AnomalyType.DATABASE_CONNECTION:return t("anomaly.types.connection-failure");case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT:@@ -158,11 +154,6 @@ const typeName = (type: Anomaly_AnomalyType): string => {const detail = (anomaly: Anomaly): string => {switch (anomaly.type) {- case Anomaly_AnomalyType.INSTANCE_CONNECTION: {- return anomaly.instanceConnectionDetail?.detail ?? "";- }- case Anomaly_AnomalyType.MIGRATION_SCHEMA:- return "Please create migration schema on the instance first.";case Anomaly_AnomalyType.DATABASE_CONNECTION: {return anomaly.databaseConnectionDetail?.detail ?? "";}@@ -176,32 +167,6 @@ const detail = (anomaly: Anomaly): string => {const action = (anomaly: Anomaly): Action => {switch (anomaly.type) {- case Anomaly_AnomalyType.INSTANCE_CONNECTION: {- return {- onClick: () => {- router.push({- name: INSTANCE_ROUTE_DETAIL,- params: {- instanceId: extractInstanceResourceName(anomaly.resource),- },- });- },- title: t("anomaly.action.check-instance"),- };- }- case Anomaly_AnomalyType.MIGRATION_SCHEMA: {- return {- onClick: () => {- router.push({- name: INSTANCE_ROUTE_DETAIL,- params: {- instanceId: extractInstanceResourceName(anomaly.resource),- },- });- },- title: t("anomaly.action.check-instance"),- };- }case Anomaly_AnomalyType.DATABASE_CONNECTION: {return {onClick: () => {diff --git a/frontend/src/store/modules/v1/anomaly.ts b/frontend/src/store/modules/v1/anomaly.tsindex 2d7223f903..1e11b145d0 100644--- a/frontend/src/store/modules/v1/anomaly.ts+++ b/frontend/src/store/modules/v1/anomaly.ts@@ -6,9 +6,7 @@ import type { Anomaly } from "@/types/proto/v1/anomaly_service";const buildFilter = (find: FindAnomalyMessage): string => {const filter: string[] = [];- if (find.instance) {- filter.push(`resource = "${find.instance}".`);- } else if (find.database) {+ if (find.database) {filter.push(`resource = "${find.database}".`);}if (find.type) {diff --git a/frontend/src/types/anomaly.ts b/frontend/src/types/anomaly.tsindex 8cdf6bdfa5..57faad1a7b 100644--- a/frontend/src/types/anomaly.ts+++ b/frontend/src/types/anomaly.ts@@ -1,7 +1,6 @@import type { Anomaly_AnomalyType } from "@/types/proto/v1/anomaly_service";export interface FindAnomalyMessage {- instance?: string;database?: string;type?: Anomaly_AnomalyType;}diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex ae3f877dc7..2fdf22f5e2 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -36,7 +36,7 @@ export enum Edition {EDITION_2024 = "EDITION_2024",/*** EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be- * used or relyed on outside of tests.+ * used or relied on outside of tests.*/EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",@@ -1093,12 +1093,13 @@ export interface MessageOptions {export interface FieldOptions {/**+ * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.* The ctype option instructs the C++ code generator to use a different* representation of the field than it normally would. See the specific* options below. This option is only implemented to support use of* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of- * type "bytes" in the open source release -- sorry, we'll try to include- * other types in a future version!+ * type "bytes" in the open source release.+ * TODO: make ctype actually deprecated.*/ctype?:| FieldOptions_CType@@ -1314,11 +1315,7 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number}}-/**- * 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).- */+/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */export enum FieldOptions_OptionRetention {RETENTION_UNKNOWN = "RETENTION_UNKNOWN",RETENTION_RUNTIME = "RETENTION_RUNTIME",@@ -1375,8 +1372,7 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option/*** This indicates the types of entities that the field may apply to when used* as an option. If it is unset, then the field may be freely used as an- * option on any kind of entity. Note: as of January 2023, support for this is- * in progress and does not yet have an effect (b/264593489).+ * option on any kind of entity.*/export enum FieldOptions_OptionTargetType {TARGET_TYPE_UNKNOWN = "TARGET_TYPE_UNKNOWN",diff --git a/frontend/src/types/proto/v1/anomaly_service.ts b/frontend/src/types/proto/v1/anomaly_service.tsindex 875128a38c..82344ad377 100644--- a/frontend/src/types/proto/v1/anomaly_service.ts+++ b/frontend/src/types/proto/v1/anomaly_service.ts@@ -73,14 +73,6 @@ export interface Anomaly {export enum Anomaly_AnomalyType {/** ANOMALY_TYPE_UNSPECIFIED - Unspecified anomaly type. */ANOMALY_TYPE_UNSPECIFIED = "ANOMALY_TYPE_UNSPECIFIED",- /**- * INSTANCE_CONNECTION - Instance level anomaly.- *- * INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down.- */- INSTANCE_CONNECTION = "INSTANCE_CONNECTION",- /** MIGRATION_SCHEMA - MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing. */- MIGRATION_SCHEMA = "MIGRATION_SCHEMA",/*** DATABASE_CONNECTION - Database level anomaly.*@@ -100,12 +92,6 @@ export function anomaly_AnomalyTypeFromJSON(object: any): Anomaly_AnomalyType {case 0:case "ANOMALY_TYPE_UNSPECIFIED":return Anomaly_AnomalyType.ANOMALY_TYPE_UNSPECIFIED;- case 1:- case "INSTANCE_CONNECTION":- return Anomaly_AnomalyType.INSTANCE_CONNECTION;- case 2:- case "MIGRATION_SCHEMA":- return Anomaly_AnomalyType.MIGRATION_SCHEMA;case 5:case "DATABASE_CONNECTION":return Anomaly_AnomalyType.DATABASE_CONNECTION;@@ -123,10 +109,6 @@ export function anomaly_AnomalyTypeToJSON(object: Anomaly_AnomalyType): string {switch (object) {case Anomaly_AnomalyType.ANOMALY_TYPE_UNSPECIFIED:return "ANOMALY_TYPE_UNSPECIFIED";- case Anomaly_AnomalyType.INSTANCE_CONNECTION:- return "INSTANCE_CONNECTION";- case Anomaly_AnomalyType.MIGRATION_SCHEMA:- return "MIGRATION_SCHEMA";case Anomaly_AnomalyType.DATABASE_CONNECTION:return "DATABASE_CONNECTION";case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT:@@ -141,10 +123,6 @@ export function anomaly_AnomalyTypeToNumber(object: Anomaly_AnomalyType): numberswitch (object) {case Anomaly_AnomalyType.ANOMALY_TYPE_UNSPECIFIED:return 0;- case Anomaly_AnomalyType.INSTANCE_CONNECTION:- return 1;- case Anomaly_AnomalyType.MIGRATION_SCHEMA:- return 2;case Anomaly_AnomalyType.DATABASE_CONNECTION:return 5;case Anomaly_AnomalyType.DATABASE_SCHEMA_DRIFT:diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 14af9208a6..1cd6879547 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8739,8 +8739,6 @@ components:type:enum:- ANOMALY_TYPE_UNSPECIFIED- - INSTANCE_CONNECTION- - MIGRATION_SCHEMA- DATABASE_CONNECTION- DATABASE_SCHEMA_DRIFTtype: stringdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 13ee0307e3..11e5bd020a 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -5495,10 +5495,6 @@ AnomalyType is the type of the anomaly.| Name | Number | Description || ---- | ------ | ----------- || ANOMALY_TYPE_UNSPECIFIED | 0 | Unspecified anomaly type. |-| INSTANCE_CONNECTION | 1 | Instance level anomaly.--INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down. |-| MIGRATION_SCHEMA | 2 | MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing. || DATABASE_CONNECTION | 5 | Database level anomaly.DATABASE_CONNECTION is the anomaly type for database connection, e.g. the database had been deleted. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 40991bc062..34cc3001d0 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -15755,20 +15755,6 @@ If this field is omitted, there are no subsequent pages. </p></td><td><p>Unspecified anomaly type.</p></td></tr>- <tr>- <td>INSTANCE_CONNECTION</td>- <td>1</td>- <td><p>Instance level anomaly.--INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down.</p></td>- </tr>-- <tr>- <td>MIGRATION_SCHEMA</td>- <td>2</td>- <td><p>MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing.</p></td>- </tr>-<tr><td>DATABASE_CONNECTION</td><td>5</td>diff --git a/proto/generated-go/v1/anomaly_service.pb.go b/proto/generated-go/v1/anomaly_service.pb.goindex d9216fb360..91488a8219 100644--- a/proto/generated-go/v1/anomaly_service.pb.go+++ b/proto/generated-go/v1/anomaly_service.pb.go@@ -28,12 +28,6 @@ type Anomaly_AnomalyType int32const (// Unspecified anomaly type.Anomaly_ANOMALY_TYPE_UNSPECIFIED Anomaly_AnomalyType = 0- // Instance level anomaly.- //- // INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down.- Anomaly_INSTANCE_CONNECTION Anomaly_AnomalyType = 1- // MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing.- Anomaly_MIGRATION_SCHEMA Anomaly_AnomalyType = 2// Database level anomaly.//// DATABASE_CONNECTION is the anomaly type for database connection, e.g. the database had been deleted.@@ -47,15 +41,11 @@ const (var (Anomaly_AnomalyType_name = map[int32]string{0: "ANOMALY_TYPE_UNSPECIFIED",- 1: "INSTANCE_CONNECTION",- 2: "MIGRATION_SCHEMA",5: "DATABASE_CONNECTION",6: "DATABASE_SCHEMA_DRIFT",}Anomaly_AnomalyType_value = map[string]int32{"ANOMALY_TYPE_UNSPECIFIED": 0,- "INSTANCE_CONNECTION": 1,- "MIGRATION_SCHEMA": 2,"DATABASE_CONNECTION": 5,"DATABASE_SCHEMA_DRIFT": 6,}@@ -610,7 +600,7 @@ var file_v1_anomaly_service_proto_rawDesc = []byte{0x61, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78,0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,- 0x6e, 0x22, 0xe9, 0x08, 0x0a, 0x07, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x12, 0x20, 0x0a,+ 0x6e, 0x22, 0xb9, 0x08, 0x0a, 0x07, 0x41, 0x6e, 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x12, 0x20, 0x0a,0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e,@@ -665,13 +655,10 @@ var file_v1_anomaly_service_proto_rawDesc = []byte{0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x53, 0x63,0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x73,0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x74,- 0x75, 0x61, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x8e, 0x01, 0x0a, 0x0b, 0x41, 0x6e,- 0x6f, 0x6d, 0x61, 0x6c, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x4e, 0x4f,- 0x4d, 0x41, 0x4c, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x53, 0x54, 0x41,- 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01,- 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43,- 0x48, 0x45, 0x4d, 0x41, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,+ 0x75, 0x61, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x5f, 0x0a, 0x0b, 0x41, 0x6e, 0x6f,+ 0x6d, 0x61, 0x6c, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x4e, 0x4f, 0x4d,+ 0x41, 0x4c, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41,0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12,0x19, 0x0a, 0x15, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x43, 0x48, 0x45,0x4d, 0x41, 0x5f, 0x44, 0x52, 0x49, 0x46, 0x54, 0x10, 0x06, 0x22, 0x57, 0x0a, 0x0f, 0x41, 0x6e,diff --git a/proto/v1/anomaly_service.proto b/proto/v1/anomaly_service.protoindex 02517f2ab5..08dba3eef1 100644--- a/proto/v1/anomaly_service.proto+++ b/proto/v1/anomaly_service.proto@@ -58,12 +58,6 @@ message Anomaly {enum AnomalyType {// Unspecified anomaly type.ANOMALY_TYPE_UNSPECIFIED = 0;- // Instance level anomaly.- //- // INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down.- INSTANCE_CONNECTION = 1;- // MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing.- MIGRATION_SCHEMA = 2;// Database level anomaly.//