Skip to content

Commit 6ac39b6

Browse files
remove ActiveClusters from error types
1 parent 127968d commit 6ac39b6

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
lines changed

common/cache/domainCache_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ func Test_IsActiveIn(t *testing.T) {
332332
DomainName: "test-domain",
333333
CurrentCluster: "A",
334334
ActiveCluster: "B",
335-
ActiveClusters: []string{"B"},
335+
// TODO(active-active): After ActiveClusters field is introduced, uncomment following line
336+
// ActiveClusters: []string{"B"},
336337
},
337338
},
338339
}
@@ -1199,7 +1200,8 @@ func Test_GetActiveDomainByID(t *testing.T) {
11991200
DomainName: "passive",
12001201
CurrentCluster: "A",
12011202
ActiveCluster: "B",
1202-
ActiveClusters: []string{"B"},
1203+
// TODO(active-active): After ActiveClusters field is introduced, uncomment following line
1204+
// ActiveClusters: []string{"B"},
12031205
},
12041206
},
12051207
}

common/errors/domainNotActiveError.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ func NewDomainNotActiveError(domainName string, currentCluster string, activeClu
4242
DomainName: domainName,
4343
CurrentCluster: currentCluster,
4444
ActiveCluster: activeCluster,
45-
ActiveClusters: activeClusters,
45+
// TODO(active-active): After ActiveClusters field is introduced, uncomment this line and update following lines
46+
// - common/types/testdata/error.go
47+
// - common/testing/allisset_test.go
48+
// - mappers
49+
// ActiveClusters: activeClusters,
4650
}
4751
}
4852

common/types/shared.go

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,11 +2010,10 @@ func (v *DomainInfo) GetUUID() (o string) {
20102010
// this is a retriable error and *must* be retried under at least
20112011
// some circumstances due to domain failover races.
20122012
type DomainNotActiveError struct {
2013-
Message string `json:"message"`
2014-
DomainName string `json:"domainName"`
2015-
CurrentCluster string `json:"currentCluster"`
2016-
ActiveCluster string `json:"activeCluster,omitempty"`
2017-
ActiveClusters []string `json:"activeClusters,omitempty"`
2013+
Message string `json:"message"`
2014+
DomainName string `json:"domainName"`
2015+
CurrentCluster string `json:"currentCluster"`
2016+
ActiveCluster string `json:"activeCluster,omitempty"`
20182017
}
20192018

20202019
// GetCurrentCluster is an internal getter (TBD...)
@@ -2033,14 +2032,6 @@ func (v *DomainNotActiveError) GetActiveCluster() (o string) {
20332032
return
20342033
}
20352034

2036-
// GetActiveClusters is an internal getter (TBD...)
2037-
func (v *DomainNotActiveError) GetActiveClusters() (o []string) {
2038-
if v != nil {
2039-
return v.ActiveClusters
2040-
}
2041-
return
2042-
}
2043-
20442035
// DomainReplicationConfiguration is an internal type (TBD...)
20452036
type DomainReplicationConfiguration struct {
20462037
ActiveClusterName string `json:"activeClusterName,omitempty"`
@@ -2174,10 +2165,9 @@ const (
21742165

21752166
// EntityNotExistsError is an internal type (TBD...)
21762167
type EntityNotExistsError struct {
2177-
Message string `json:"message,required"`
2178-
CurrentCluster string `json:"currentCluster,omitempty"`
2179-
ActiveCluster string `json:"activeCluster,omitempty"`
2180-
ActiveClusters []string `json:"activeClusters,omitempty"`
2168+
Message string `json:"message,required"`
2169+
CurrentCluster string `json:"currentCluster,omitempty"`
2170+
ActiveCluster string `json:"activeCluster,omitempty"`
21812171
}
21822172

21832173
// WorkflowExecutionAlreadyCompletedError is an internal type (TBD...)

common/types/testdata/error.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,11 @@ var (
6060
DomainName: DomainName,
6161
CurrentCluster: ClusterName1,
6262
ActiveCluster: ClusterName2,
63-
ActiveClusters: []string{ClusterName2},
6463
}
6564
EntityNotExistsError = types.EntityNotExistsError{
6665
Message: ErrorMessage,
6766
CurrentCluster: ClusterName1,
6867
ActiveCluster: ClusterName2,
69-
ActiveClusters: []string{ClusterName2},
7068
}
7169
WorkflowExecutionAlreadyCompletedError = types.WorkflowExecutionAlreadyCompletedError{
7270
Message: ErrorMessage,

0 commit comments

Comments
 (0)