Skip to content

Commit

Permalink
Scaffold the implementation of admin UpdateTaskListPartitionConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaddoll committed Nov 12, 2024
1 parent d2d1d47 commit 7f7e3d8
Show file tree
Hide file tree
Showing 37 changed files with 926 additions and 468 deletions.
408 changes: 207 additions & 201 deletions .gen/proto/history/v1/service.pb.yarpc.go

Large diffs are not rendered by default.

408 changes: 207 additions & 201 deletions .gen/proto/matching/v1/service.pb.yarpc.go

Large diffs are not rendered by default.

99 changes: 52 additions & 47 deletions .gen/proto/shared/v1/history.pb.yarpc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/admin/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ type Client interface {
UpdateDomainIsolationGroups(ctx context.Context, request *types.UpdateDomainIsolationGroupsRequest, opts ...yarpc.CallOption) (*types.UpdateDomainIsolationGroupsResponse, error)
GetDomainAsyncWorkflowConfiguraton(ctx context.Context, request *types.GetDomainAsyncWorkflowConfiguratonRequest, opts ...yarpc.CallOption) (*types.GetDomainAsyncWorkflowConfiguratonResponse, error)
UpdateDomainAsyncWorkflowConfiguraton(ctx context.Context, request *types.UpdateDomainAsyncWorkflowConfiguratonRequest, opts ...yarpc.CallOption) (*types.UpdateDomainAsyncWorkflowConfiguratonResponse, error)
UpdateTaskListPartitionConfig(ctx context.Context, request *types.UpdateTaskListPartitionConfigRequest, opts ...yarpc.CallOption) (*types.UpdateTaskListPartitionConfigResponse, error)
}
20 changes: 20 additions & 0 deletions client/admin/interface_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion client/templates/thrift.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/uber/cadence/common/types/mapper/thrift"
)

{{$unsupportedMethods := list "CountDLQMessages" "UpdateTaskListPartitionConfig" "RefreshTaskListPartitionConfig"}}

{{$interfaceName := .Interface.Name}}
{{$clientName := (index .Vars "client")}}
{{ $decorator := (printf "%s%s" (down $clientName) .Interface.Name) }}
Expand All @@ -16,7 +18,7 @@ import (
{{$Request := printf "%sRequest" $method.Name}}
{{$Response := printf "%sResponse" $method.Name}}
func (g {{$decorator}}) {{$method.Declaration}} {
{{- if eq $method.Name "CountDLQMessages"}}
{{- if has $method.Name $unsupportedMethods}}
return nil, thrift.ToError(&types.BadRequestError{Message: "Feature not supported on TChannel"})
{{- else if or (eq $method.Name "AddDecisionTask") (eq $method.Name "AddActivityTask")}}
{{(index $method.Results 1).Name}} = g.c.{{$method.Name}}({{(index $method.Params 0).Name}}, thrift.From{{$prefix}}{{$Request}}({{(index $method.Params 1).Name}}), {{(index $method.Params 2).Pass}})
Expand Down
20 changes: 20 additions & 0 deletions client/wrappers/errorinjectors/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions client/wrappers/grpc/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions client/wrappers/metered/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions client/wrappers/retryable/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions client/wrappers/thrift/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions client/wrappers/timeout/admin_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/startreedata/pinot-client-go v0.2.0 // latest release supports pinot v0.12.0 which is also internal version
github.com/stretchr/testify v1.8.3
github.com/uber-go/tally v3.3.15+incompatible // indirect
github.com/uber/cadence-idl v0.0.0-20241029201022-e82f1bd27ba2
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa
github.com/uber/ringpop-go v0.8.5 // indirect
github.com/uber/tchannel-go v1.22.2 // indirect
github.com/valyala/fastjson v1.4.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ github.com/uber-go/tally v3.3.12+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyu
github.com/uber-go/tally v3.3.15+incompatible h1:9hLSgNBP28CjIaDmAuRTq9qV+UZY+9PcvAkXO4nNMwg=
github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
github.com/uber/cadence-idl v0.0.0-20211111101836-d6b70b60eb8c/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
github.com/uber/cadence-idl v0.0.0-20241029201022-e82f1bd27ba2 h1:U4kzCmwPRT6tyS2U2AOLNHoWcDJuGS9sq303rCHfXKw=
github.com/uber/cadence-idl v0.0.0-20241029201022-e82f1bd27ba2/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa h1:pi5AePVFxcQyMF3DqIzSXciZK7sOyZaNv//53tIl4tw=
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM=
github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw=
Expand Down
1 change: 1 addition & 0 deletions common/log/tag/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ var (
AdminClientOperationUpdateDomainAsyncWorkflowConfiguraton = clientOperation("admin-update-domain-async-workflow-configuration")
AdminDeleteWorkflow = clientOperation("admin-delete-workflow")
MaintainCorruptWorkflow = clientOperation("maintain-corrupt-workflow")
AdminClientOperationUpdateTaskListPartitionConfig = clientOperation("admin-update-task-list-partition-config")

FrontendClientOperationDeprecateDomain = clientOperation("frontend-deprecate-domain")
FrontendClientOperationDescribeDomain = clientOperation("frontend-describe-domain")
Expand Down
Loading

0 comments on commit 7f7e3d8

Please sign in to comment.