Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing mappers for AsyncWorkflowConfiguration #5904

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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{
taylanisikdemir marked this conversation as resolved.
Show resolved Hide resolved
Enabled: true,
QueueType: "custom",
QueueConfig: &types.DataBlob{
EncodingType: types.EncodingTypeThriftRW.Ptr(),
Data: []byte("custom queue config"),
},
},
}
DomainReplicationConfiguration = types.DomainReplicationConfiguration{
ActiveClusterName: ClusterName1,
Expand Down
Loading