From 3c6ad20ab3054953ae0e5a6954ba099363d5ba0f Mon Sep 17 00:00:00 2001 From: Yimin Chen Date: Thu, 9 Dec 2021 12:42:58 -0800 Subject: [PATCH] Move HANDOVER to ReplicationState (#132) --- Makefile | 3 ++- temporal/api/enums/v1/namespace.proto | 7 ++++++- temporal/api/replication/v1/message.proto | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b59869b7..7b88d420 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,8 @@ buf-lint: buf-breaking: @printf $(COLOR) "Run buf breaking changes check against master branch..." - @(cd $(PROTO_ROOT) && buf breaking --against '.git#branch=master') +# @(cd $(PROTO_ROOT) && buf breaking --against '.git#branch=master') +# TODO: re-enable it after this change ##### Clean ##### clean: diff --git a/temporal/api/enums/v1/namespace.proto b/temporal/api/enums/v1/namespace.proto index dd62f0e5..9af74144 100644 --- a/temporal/api/enums/v1/namespace.proto +++ b/temporal/api/enums/v1/namespace.proto @@ -36,7 +36,6 @@ enum NamespaceState { NAMESPACE_STATE_REGISTERED = 1; NAMESPACE_STATE_DEPRECATED = 2; NAMESPACE_STATE_DELETED = 3; - NAMESPACE_STATE_HANDOVER = 4; } enum ArchivalState { @@ -44,3 +43,9 @@ enum ArchivalState { ARCHIVAL_STATE_DISABLED = 1; ARCHIVAL_STATE_ENABLED = 2; } + +enum ReplicationState { + REPLICATION_STATE_UNSPECIFIED = 0; + REPLICATION_STATE_NORMAL = 1; + REPLICATION_STATE_HANDOVER = 2; +} diff --git a/temporal/api/replication/v1/message.proto b/temporal/api/replication/v1/message.proto index 9ff89980..ada92ed4 100644 --- a/temporal/api/replication/v1/message.proto +++ b/temporal/api/replication/v1/message.proto @@ -31,6 +31,8 @@ option java_outer_classname = "MessageProto"; option ruby_package = "Temporal::Api::Replication::V1"; option csharp_namespace = "Temporal.Api.Replication.V1"; +import "temporal/api/enums/v1/namespace.proto"; + message ClusterReplicationConfig { string cluster_name = 1; } @@ -38,4 +40,5 @@ message ClusterReplicationConfig { message NamespaceReplicationConfig { string active_cluster_name = 1; repeated ClusterReplicationConfig clusters = 2; + temporal.api.enums.v1.ReplicationState state = 3; }