Skip to content

Commit 2af19f2

Browse files
Update RegisterDomainRequest mapper to support active-active domains (#1442)
1 parent 654b9a7 commit 2af19f2

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

internal/compatibility/proto/request.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ func RegisterDomainRequest(t *shared.RegisterDomainRequest) *apiv1.RegisterDomai
223223
WorkflowExecutionRetentionPeriod: daysToDuration(t.WorkflowExecutionRetentionPeriodInDays),
224224
Clusters: ClusterReplicationConfigurationArray(t.Clusters),
225225
ActiveClusterName: t.GetActiveClusterName(),
226+
ActiveClustersByRegion: t.GetActiveClustersByRegion(),
226227
Data: t.Data,
227228
SecurityToken: t.GetSecurityToken(),
228229
IsGlobalDomain: t.GetIsGlobalDomain(),

internal/compatibility/testdata/domain.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,8 @@ var (
8888
ClusterReplicationConfigurationArray = []*apiv1.ClusterReplicationConfiguration{
8989
&ClusterReplicationConfiguration,
9090
}
91+
ActiveClustersByRegion = map[string]string{
92+
"Region1": ClusterName1,
93+
"Region2": ClusterName2,
94+
}
9195
)

internal/compatibility/testdata/service.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ var (
3434
WorkflowExecutionRetentionPeriod: DomainRetention,
3535
Clusters: ClusterReplicationConfigurationArray,
3636
ActiveClusterName: ClusterName1,
37+
ActiveClustersByRegion: ActiveClustersByRegion,
3738
Data: DomainData,
3839
SecurityToken: SecurityToken,
3940
IsGlobalDomain: true,

internal/compatibility/thrift/request.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func RegisterDomainRequest(t *apiv1.RegisterDomainRequest) *shared.RegisterDomai
226226
WorkflowExecutionRetentionPeriodInDays: durationToDays(t.WorkflowExecutionRetentionPeriod),
227227
Clusters: ClusterReplicationConfigurationArray(t.Clusters),
228228
ActiveClusterName: &t.ActiveClusterName,
229+
ActiveClustersByRegion: t.ActiveClustersByRegion,
229230
Data: t.Data,
230231
SecurityToken: &t.SecurityToken,
231232
IsGlobalDomain: &t.IsGlobalDomain,

0 commit comments

Comments
 (0)