Skip to content

Commit

Permalink
Add missing mappers for AsyncWorkflowConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
taylanisikdemir committed Apr 11, 2024
1 parent 8249589 commit e270368
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/types/mapper/proto/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,7 @@ func FromDescribeDomainResponseDomain(t *types.DescribeDomainResponse) *apiv1.Do
domain.HistoryArchivalUri = config.HistoryArchivalURI
domain.VisibilityArchivalStatus = FromArchivalStatus(config.VisibilityArchivalStatus)
domain.VisibilityArchivalUri = config.VisibilityArchivalURI
domain.AsyncWorkflowConfig = FromDomainAsyncWorkflowConfiguraton(config.AsyncWorkflowConfig)
}
if repl := t.ReplicationConfiguration; repl != nil {
domain.ActiveClusterName = repl.ActiveClusterName
Expand Down Expand Up @@ -1124,6 +1125,7 @@ func ToDescribeDomainResponseDomain(t *apiv1.Domain) *types.DescribeDomainRespon
VisibilityArchivalStatus: ToArchivalStatus(t.VisibilityArchivalStatus),
VisibilityArchivalURI: t.VisibilityArchivalUri,
IsolationGroups: ToIsolationGroupConfig(t.IsolationGroups),
AsyncWorkflowConfig: ToDomainAsyncWorkflowConfiguraton(t.AsyncWorkflowConfig),
},
ReplicationConfiguration: &types.DomainReplicationConfiguration{
ActiveClusterName: t.ActiveClusterName,
Expand Down Expand Up @@ -4303,6 +4305,7 @@ func FromUpdateDomainResponse(t *types.UpdateDomainResponse) *apiv1.UpdateDomain
domain.HistoryArchivalUri = config.HistoryArchivalURI
domain.VisibilityArchivalStatus = FromArchivalStatus(config.VisibilityArchivalStatus)
domain.VisibilityArchivalUri = config.VisibilityArchivalURI
domain.AsyncWorkflowConfig = FromDomainAsyncWorkflowConfiguraton(config.AsyncWorkflowConfig)
}
if repl := t.ReplicationConfiguration; repl != nil {
domain.ActiveClusterName = repl.ActiveClusterName
Expand Down Expand Up @@ -4334,7 +4337,8 @@ func ToUpdateDomainResponse(t *apiv1.UpdateDomainResponse) *types.UpdateDomainRe
HistoryArchivalURI: t.Domain.HistoryArchivalUri,
VisibilityArchivalStatus: ToArchivalStatus(t.Domain.VisibilityArchivalStatus),
VisibilityArchivalURI: t.Domain.VisibilityArchivalUri,
IsolationGroups: ToIsolationGroupConfig(t.GetDomain().GetIsolationGroups()),
IsolationGroups: ToIsolationGroupConfig(t.Domain.IsolationGroups),
AsyncWorkflowConfig: ToDomainAsyncWorkflowConfiguraton(t.Domain.AsyncWorkflowConfig),
},
ReplicationConfiguration: &types.DomainReplicationConfiguration{
ActiveClusterName: t.Domain.ActiveClusterName,
Expand Down
2 changes: 2 additions & 0 deletions common/types/mapper/thrift/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,7 @@ func FromDomainConfiguration(t *types.DomainConfiguration) *shared.DomainConfigu
VisibilityArchivalStatus: FromArchivalStatus(t.VisibilityArchivalStatus),
VisibilityArchivalURI: &t.VisibilityArchivalURI,
Isolationgroups: FromIsolationGroupConfig(t.IsolationGroups),
AsyncWorkflowConfiguration: FromDomainAsyncWorkflowConfiguraton(t.AsyncWorkflowConfig),
}
}

Expand All @@ -1891,6 +1892,7 @@ func ToDomainConfiguration(t *shared.DomainConfiguration) *types.DomainConfigura
VisibilityArchivalStatus: ToArchivalStatus(t.VisibilityArchivalStatus),
VisibilityArchivalURI: t.GetVisibilityArchivalURI(),
IsolationGroups: ToIsolationGroupConfig(t.Isolationgroups),
AsyncWorkflowConfig: ToDomainAsyncWorkflowConfiguraton(t.AsyncWorkflowConfiguration),
}
}

Expand Down
8 changes: 8 additions & 0 deletions common/types/testdata/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ var (
State: types.IsolationGroupStateDrained,
},
},
AsyncWorkflowConfig: &types.AsyncWorkflowConfiguration{
Enabled: true,
QueueType: "custom",
QueueConfig: &types.DataBlob{
EncodingType: types.EncodingTypeThriftRW.Ptr(),
Data: []byte("custom queue config"),
},
},
}
DomainReplicationConfiguration = types.DomainReplicationConfiguration{
ActiveClusterName: ClusterName1,
Expand Down

0 comments on commit e270368

Please sign in to comment.