Skip to content
Open
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
9 changes: 1 addition & 8 deletions cliext/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ type ClientOptionsBuilder struct {
// Logger is the slog logger to use for the client. If set, it will be
// wrapped with the SDK's structured logger adapter.
Logger *slog.Logger

// PayloadCodec is populated by Build when a remote payload codec is
// configured. Callers can use it to decode payloads outside the gRPC
// interceptor chain (e.g. payloads nested inside opaque proto bytes).
PayloadCodec converter.PayloadCodec
}
Comment thread
chaptersix marked this conversation as resolved.

type oauthCredentials struct {
Expand Down Expand Up @@ -269,7 +264,6 @@ func (b *ClientOptionsBuilder) Build(ctx context.Context) (client.Options, error
}
clientOpts.ConnectionOptions.DialOptions = append(
clientOpts.ConnectionOptions.DialOptions, grpc.WithChainUnaryInterceptor(interceptor))
b.PayloadCodec = payloadCodec
}

// Set connect timeout for GetSystemInfo if provided.
Expand All @@ -294,8 +288,7 @@ func parseKeyValuePairs(pairs []string) (map[string]string, error) {
}

// newRemotePayloadCodec constructs a remote payload codec from the configured endpoint,
// auth, and headers. The returned codec can be used both inside a gRPC interceptor and
// to decode payloads nested inside opaque proto bytes (e.g. system Nexus operation inputs).
// auth, and headers.
func newRemotePayloadCodec(
namespace string,
codecEndpoint string,
Expand Down
8 changes: 4 additions & 4 deletions cliext/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/temporalio/cli/cliext

go 1.26.8
go 1.27.0

require (
github.com/BurntSushi/toml v1.4.0
github.com/mattn/go-isatty v0.0.23
github.com/spf13/pflag v1.0.10
github.com/stretchr/testify v1.11.1
go.temporal.io/sdk v1.47.0
go.temporal.io/sdk v1.49.0
go.temporal.io/sdk/contrib/envconfig v1.0.2
golang.org/x/oauth2 v0.36.0
google.golang.org/grpc v1.83.2
Expand All @@ -22,12 +22,12 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
github.com/nexus-rpc/nexus-proto-annotations v0.1.0 // indirect
github.com/nexus-rpc/sdk-go v0.6.0 // indirect
github.com/nexus-rpc/sdk-go v0.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/stretchr/objx v0.5.3 // indirect
go.temporal.io/api v1.63.5 // indirect
go.temporal.io/api v1.63.6 // indirect
golang.org/x/net v0.58.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions cliext/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ github.com/mattn/go-isatty v0.0.23 h1:cYwCQTQf3HB6xUC+BtyCLZNr7IzbOmoZbmssVNzSyi
github.com/mattn/go-isatty v0.0.23/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
github.com/nexus-rpc/nexus-proto-annotations v0.1.0 h1:2fELd+9sqUtNu6Fg//pw8YFsxOvp8vZ8hfP0nHhNI80=
github.com/nexus-rpc/nexus-proto-annotations v0.1.0/go.mod h1:n3UjF1bPCW8llR8tHvbxJ+27yPWrhpo8w/Yg1IOuY0Y=
github.com/nexus-rpc/sdk-go v0.6.0 h1:QRgnP2zTbxEbiyWG/aXH8uSC5LV/Mg1fqb19jb4DBlo=
github.com/nexus-rpc/sdk-go v0.6.0/go.mod h1:FHdPfVQwRuJFZFTF0Y2GOAxCrbIBNrcPna9slkGKPYk=
github.com/nexus-rpc/sdk-go v0.7.0 h1:38NrfY5rLnZAiMMs2ZfCKI/CSDzdfJG+27iAgfA8bUI=
github.com/nexus-rpc/sdk-go v0.7.0/go.mod h1:FHdPfVQwRuJFZFTF0Y2GOAxCrbIBNrcPna9slkGKPYk=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
Expand Down Expand Up @@ -63,10 +63,10 @@ go.opentelemetry.io/otel/sdk/metric v1.44.0 h1:3LlKgI+VjbVsjNRFZJZAJ30WjXC5VkNRk
go.opentelemetry.io/otel/sdk/metric v1.44.0/go.mod h1:5B5pMARnXxKhltooO4xUuCBorl65a4EpnTalObqOigA=
go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/6gtIk=
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.temporal.io/api v1.63.5 h1:c11+kPYHkXXL3UiShPdbMD+xtvqGsbTibUA9ypmiCa4=
go.temporal.io/api v1.63.5/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ=
go.temporal.io/sdk v1.47.0 h1:lZ39w1+uWSjHTL0F3mSc0t4XUnKX8CCcWxqSiLbaHnc=
go.temporal.io/sdk v1.47.0/go.mod h1:ilKs0twgP4JpP8pfhIgZumnOEyBiYn6ZO/ta//NnKMU=
go.temporal.io/api v1.63.6 h1:LoV2ubLM9M5uiGeBcYCSCTmHAPGQPy18dC8Vcw8TciQ=
go.temporal.io/api v1.63.6/go.mod h1:acM0I9WPuYg8W3Pd9jOZvEgi7mRUttUQ4+e7fowKVnM=
go.temporal.io/sdk v1.49.0 h1:CtGI0BUe/SCo3eoqTwuWWtXKueii9GBVus7KrKKH1Vo=
go.temporal.io/sdk v1.49.0/go.mod h1:xP0FulN5JJSfisESUP60LlWsrKz2tLSStGjVdk8r5cc=
go.temporal.io/sdk/contrib/envconfig v1.0.2 h1:MGHfsuPUtsf7X9M6WYn3zYJj/mWsuYHnA1uuiL0KEuE=
go.temporal.io/sdk/contrib/envconfig v1.0.2/go.mod h1:MuMiH7hksps2uXnmKuAWaP9P6WbkSDy62kl64t1VJVg=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/temporalio/cli

go 1.26.8
go 1.27.0

require (
github.com/BurntSushi/toml v1.4.0
Expand All @@ -17,10 +17,10 @@ require (
github.com/stretchr/testify v1.12.1
github.com/temporalio/cli/cliext v0.0.0
github.com/temporalio/ui-server/v2 v2.54.1
go.temporal.io/api v1.63.5
go.temporal.io/sdk v1.47.0
go.temporal.io/api v1.63.6
go.temporal.io/sdk v1.49.0
go.temporal.io/sdk/contrib/envconfig v1.0.2
go.temporal.io/server v1.32.0
go.temporal.io/server v1.33.0-164.0
golang.org/x/exp v0.0.0-20260611194520-c48552f49976
golang.org/x/mod v0.41.0
golang.org/x/term v0.45.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -481,16 +481,16 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/
go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE=
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
go.temporal.io/api v1.63.5 h1:c11+kPYHkXXL3UiShPdbMD+xtvqGsbTibUA9ypmiCa4=
go.temporal.io/api v1.63.5/go.mod h1:SrlW2JMwVlDP4nRWSNznUFqnSHd+YeMDS1BkYo63HCQ=
go.temporal.io/api v1.63.6 h1:LoV2ubLM9M5uiGeBcYCSCTmHAPGQPy18dC8Vcw8TciQ=
go.temporal.io/api v1.63.6/go.mod h1:acM0I9WPuYg8W3Pd9jOZvEgi7mRUttUQ4+e7fowKVnM=
go.temporal.io/auto-scaled-workers v0.2.0-1.32.0.158.0 h1:l+Rj0cIHMC2VB/DC+axrLLnZ2ISTgUpUw8TMiP4B9F8=
go.temporal.io/auto-scaled-workers v0.2.0-1.32.0.158.0/go.mod h1:ZGNY7kCU0EZpXx02D81/jGXHbUcFcVIzzguJ/f8pvUQ=
go.temporal.io/sdk v1.47.0 h1:lZ39w1+uWSjHTL0F3mSc0t4XUnKX8CCcWxqSiLbaHnc=
go.temporal.io/sdk v1.47.0/go.mod h1:ilKs0twgP4JpP8pfhIgZumnOEyBiYn6ZO/ta//NnKMU=
go.temporal.io/sdk v1.49.0 h1:CtGI0BUe/SCo3eoqTwuWWtXKueii9GBVus7KrKKH1Vo=
go.temporal.io/sdk v1.49.0/go.mod h1:xP0FulN5JJSfisESUP60LlWsrKz2tLSStGjVdk8r5cc=
go.temporal.io/sdk/contrib/envconfig v1.0.2 h1:MGHfsuPUtsf7X9M6WYn3zYJj/mWsuYHnA1uuiL0KEuE=
go.temporal.io/sdk/contrib/envconfig v1.0.2/go.mod h1:MuMiH7hksps2uXnmKuAWaP9P6WbkSDy62kl64t1VJVg=
go.temporal.io/server v1.32.0 h1:JQoqsVREaGc8vcuDNfuRlySiV3tVi81XUOVC9LeL/1Y=
go.temporal.io/server v1.32.0/go.mod h1:SuxEWp1bDjSB7kHtUjyaUJBh7Qjyv5wB8lCrS0VFSvw=
go.temporal.io/server v1.33.0-164.0 h1:Y9EAHSB/3fXWt7jZU0BzVP6AS8DtIGsmChTRaFVf9UE=
go.temporal.io/server v1.33.0-164.0/go.mod h1:SQ3A8YNzg42mMf8A4AkOA2eo1HwyJcogP+WEsNXx+6A=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
Expand Down
19 changes: 5 additions & 14 deletions internal/temporalcli/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,8 @@ import (
// so often used by callers after this call to know the currently configured
// namespace.
func dialClient(cctx *CommandContext, c *cliext.ClientOptions) (client.Client, error) {
cl, _, err := dialClientWithCodec(cctx, c)
return cl, err
}

// dialClientWithCodec is like [dialClient] but also returns the configured remote
// payload codec, or nil if no codec is configured. The codec is the same instance
// used by the gRPC interceptor; callers can use it to decode payloads nested inside
// opaque proto bytes (e.g. the request/response of a system Nexus operation).
func dialClientWithCodec(cctx *CommandContext, c *cliext.ClientOptions) (client.Client, converter.PayloadCodec, error) {
if cctx.RootCommand == nil {
return nil, nil, fmt.Errorf("root command unexpectedly missing when dialing client")
return nil, fmt.Errorf("root command unexpectedly missing when dialing client")
}

// Set default identity if not provided
Expand Down Expand Up @@ -61,12 +52,12 @@ func dialClientWithCodec(cctx *CommandContext, c *cliext.ClientOptions) (client.
// original setup error instead of attaching a guessed address or profile.
var pathErr *fs.PathError
if errors.As(err, &pathErr) {
return nil, nil, newConnectError(&connectDiagnosis{
return nil, newConnectError(&connectDiagnosis{
Cause: causeCertFileUnreadable,
Detail: pathErr.Path,
}, connectMeta{}, err)
}
return nil, nil, err
return nil, err
}

// We do not put codec on data converter here, it is applied via
Expand Down Expand Up @@ -97,14 +88,14 @@ func dialClientWithCodec(cctx *CommandContext, c *cliext.ClientOptions) (client.

cl, err := client.DialContext(dialCtx, clientOpts)
if err != nil {
return nil, nil, dialConnectError(cctx, dialCtx, clientOpts, err)
return nil, dialConnectError(cctx, dialCtx, clientOpts, err)
}

// Since this namespace value is used by many commands after this call,
// we are mutating it to be the derived one
c.Namespace = clientOpts.Namespace

return cl, builder.PayloadCodec, nil
return cl, nil
}

// dialConnectError enriches a client.DialContext failure with a staged
Expand Down
2 changes: 1 addition & 1 deletion internal/temporalcli/commands.activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func buildStartActivityOptions(opts *ActivityStartOptions) (client.StartActivity
HeartbeatTimeout: opts.HeartbeatTimeout.Duration(),
StartDelay: opts.StartDelay.Duration(),
Summary: opts.StaticSummary,
Details: opts.StaticDetails,
StaticDetails: opts.StaticDetails,
Priority: temporal.Priority{
PriorityKey: opts.PriorityKey,
FairnessKey: opts.FairnessKey,
Expand Down
54 changes: 0 additions & 54 deletions internal/temporalcli/commands.system_nexus.go

This file was deleted.

Loading
Loading