Skip to content

Commit d17ddcb

Browse files
Merge remote-tracking branch 'origin/main' into release/1.7.x-standalone-nexus-operations
# Conflicts: # go.mod # go.sum
2 parents 827d401 + 67af3a2 commit d17ddcb

42 files changed

Lines changed: 3775 additions & 250 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
cooldown:
8+
default-days: 14
9+
allow:
10+
- dependency-type: direct
11+
ignore:
12+
# Temporal dependencies are managed manually to ensure coordinated upgrades across all temporal packages
13+
- dependency-name: "go.temporal.io/*"
14+
15+
- package-ecosystem: github-actions
16+
directory: "/"
17+
schedule:
18+
interval: weekly
19+
cooldown:
20+
default-days: 14
21+
groups:
22+
github-actions:
23+
patterns:
24+
- "*"

.github/pull_request_template.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## Related issues
2+
3+
<!-- Closes #123 -->
4+
5+
## What changed?
6+
7+
<!-- Describe what this PR does at a high level. -->
8+
9+
## Checklist
10+
11+
<!-- Your PR should satisfy all these requirements. However, feel free to remove items that don't apply to the PR. Consider giving this checklist to an AI agent before opening your PR. -->
12+
13+
**Stability**
14+
- [ ] Breaking changes are marked with 💥 in the PR title and release notes
15+
- [ ] Changes to JSON output (`-o json` / `-o jsonl`) are treated as breaking changes
16+
17+
**Design**
18+
- [ ] This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server)
19+
- [ ] New commands follow `temporal <noun> <verb>` structure (e.g. `temporal workflow start`)
20+
- [ ] New flags are named after the API concept, not the implementation mechanism (good: `--search-attribute`, bad: `--index-field`)
21+
- [ ] New flags don't duplicate an existing flag that serves the same purpose
22+
- [ ] New flags do not have short aliases without strong justification
23+
- [ ] Experimental features are marked with `(Experimental)` in `commands.yaml`
24+
25+
**Help text** (see style guide at the top of `commands.yaml`)
26+
- [ ] All flags shown in help text and examples are implemented and functional
27+
- [ ] Summaries use sentence case and have no trailing period
28+
- [ ] Long descriptions end with a period and include at least one example invocation
29+
- [ ] Examples use long flags (`--namespace`, not `-n`), one flag per line
30+
- [ ] Placeholder values use `YourXxx` form (`YourWorkflowId`, `YourNamespace`)
31+
32+
**Behavior**
33+
- [ ] Results go to stdout; errors and warnings go to stderr
34+
- [ ] Error messages are lowercase with no trailing punctuation
35+
36+
**Tests**
37+
- [ ] Added functional test(s) (`SharedServerSuite`)
38+
- [ ] Added unit test(s) (`func TestXxx`) where applicable
39+
40+
## Manual tests
41+
42+
<!-- Edit the code samples below to provide setup and happy-path and error-path testing instructions. -->
43+
44+
**Setup**
45+
```
46+
temporal server start-dev --headless
47+
temporal workflow start \
48+
--type YourWorkflowType \
49+
--task-queue YourTaskQueue \
50+
--workflow-id YourWorkflowId
51+
```
52+
53+
**Happy path**
54+
```
55+
$ temporal <command> \
56+
--flag value
57+
<expected output>
58+
```
59+
60+
**Error case**
61+
```
62+
$ temporal <command> \
63+
--invalid-combination
64+
Error: <expected error message>
65+
$ echo $?
66+
1
67+
```
68+
69+
**Composition** <!-- How might a user combine this with existing commands? e.g. using the output of one command as input to another -->
70+
```
71+
$ temporal <command-one> ...
72+
$ temporal <command-two> --flag <value-from-above>
73+
<expected output>
74+
```

.github/workflows/build-and-publish-docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v6
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
persist-credentials: false
3333

@@ -36,7 +36,7 @@ jobs:
3636
env:
3737
INPUT_VERSION: ${{ inputs.version }}
3838
INPUT_TAG_LATEST: ${{ inputs.tag_latest }}
39-
uses: actions/github-script@v8
39+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
4040
with:
4141
script: |
4242
const inputVersion = process.env.INPUT_VERSION;
@@ -82,14 +82,14 @@ jobs:
8282
ls -lh dist/arm64/temporal
8383
8484
- name: Set up QEMU
85-
uses: docker/setup-qemu-action@v3
85+
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
8686

8787
- name: Set up Docker Buildx
88-
uses: docker/setup-buildx-action@v3
88+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
8989

9090
- name: Log in to Docker Hub
9191
if: inputs.publish
92-
uses: docker/login-action@v3
92+
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
9393
with:
9494
username: ${{ secrets.DOCKER_USERNAME }}
9595
password: ${{ secrets.DOCKER_PASSWORD }}

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020

2121
- name: Setup Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2323
with:
2424
go-version-file: go.mod
2525

@@ -53,12 +53,12 @@ jobs:
5353
HAS_SECRETS: ${{ secrets.TEMPORAL_CLIENT_CERT != '' && secrets.TEMPORAL_CLIENT_KEY != '' }}
5454
steps:
5555
- name: Checkout repository
56-
uses: actions/checkout@v4
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5757
with:
5858
submodules: recursive
5959

6060
- name: Setup Go
61-
uses: actions/setup-go@v5
61+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
6262
with:
6363
go-version-file: go.mod
6464

@@ -72,7 +72,7 @@ jobs:
7272
run: gotestsum --junitfile junit-xml/${{matrix.os}}.xml -- ./...
7373

7474
- name: Upload junit-xml artifacts
75-
uses: actions/upload-artifact@v4
75+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7676
if: always()
7777
with:
7878
name: junit-xml--${{github.run_id}}--${{github.run_attempt}}--${{matrix.os}}

.github/workflows/govulncheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
name: Govulncheck
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v6
15-
- uses: actions/setup-go@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
1616
with:
1717
go-version-file: go.mod
1818
- uses: temporalio/public-actions/golang/govulncheck@main

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v6
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Set up Go
23-
uses: actions/setup-go@v6
23+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2424
with:
2525
go-version-file: "go.mod"
2626
check-latest: true
@@ -47,7 +47,7 @@ jobs:
4747
run: echo "go=$(go version | cut -d ' ' -f 3)" >> "$GITHUB_OUTPUT"
4848

4949
- name: Run GoReleaser
50-
uses: goreleaser/goreleaser-action@v6
50+
uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 # v7.2.2
5151
with:
5252
version: v2.12.7
5353
args: release

.github/workflows/trigger-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
4040
- name: Generate token
4141
id: generate_token
42-
uses: actions/create-github-app-token@v2
42+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
4343
with:
4444
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
4545
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Validate Dependabot Config
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/dependabot.yml'
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- '.github/dependabot.yml'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
validate:
17+
name: Validate Dependabot Config
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
21+
22+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
23+
with:
24+
python-version: '3.12'
25+
26+
- name: Validate dependabot.yml
27+
run: |
28+
pip install check-jsonschema==0.37.2
29+
check-jsonschema --builtin-schema vendor.dependabot .github/dependabot.yml

cliext/client.go

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ type ClientOptionsBuilder struct {
2929
// Logger is the slog logger to use for the client. If set, it will be
3030
// wrapped with the SDK's structured logger adapter.
3131
Logger *slog.Logger
32+
33+
// PayloadCodec is populated by Build when a remote payload codec is
34+
// configured. Callers can use it to decode payloads outside the gRPC
35+
// interceptor chain (e.g. payloads nested inside opaque proto bytes).
36+
PayloadCodec converter.PayloadCodec
3237
}
3338

3439
type oauthCredentials struct {
@@ -248,13 +253,18 @@ func (b *ClientOptionsBuilder) Build(ctx context.Context) (client.Options, error
248253
if err != nil {
249254
return client.Options{}, fmt.Errorf("invalid codec headers: %w", err)
250255
}
251-
interceptor, err := newPayloadCodecInterceptor(
256+
payloadCodec := newRemotePayloadCodec(
252257
profile.Namespace, profile.Codec.Endpoint, profile.Codec.Auth, codecHeaders)
258+
interceptor, err := converter.NewPayloadCodecGRPCClientInterceptor(
259+
converter.PayloadCodecGRPCClientInterceptorOptions{
260+
Codecs: []converter.PayloadCodec{payloadCodec},
261+
})
253262
if err != nil {
254263
return client.Options{}, fmt.Errorf("failed creating payload codec interceptor: %w", err)
255264
}
256265
clientOpts.ConnectionOptions.DialOptions = append(
257266
clientOpts.ConnectionOptions.DialOptions, grpc.WithChainUnaryInterceptor(interceptor))
267+
b.PayloadCodec = payloadCodec
258268
}
259269

260270
// Set connect timeout for GetSystemInfo if provided.
@@ -278,16 +288,17 @@ func parseKeyValuePairs(pairs []string) (map[string]string, error) {
278288
return result, nil
279289
}
280290

281-
// newPayloadCodecInterceptor creates a gRPC interceptor for remote payload codec.
282-
func newPayloadCodecInterceptor(
291+
// newRemotePayloadCodec constructs a remote payload codec from the configured endpoint,
292+
// auth, and headers. The returned codec can be used both inside a gRPC interceptor and
293+
// to decode payloads nested inside opaque proto bytes (e.g. system Nexus operation inputs).
294+
func newRemotePayloadCodec(
283295
namespace string,
284296
codecEndpoint string,
285297
codecAuth string,
286298
codecHeaders map[string]string,
287-
) (grpc.UnaryClientInterceptor, error) {
299+
) converter.PayloadCodec {
288300
codecEndpoint = strings.ReplaceAll(codecEndpoint, "{namespace}", namespace)
289-
290-
payloadCodec := converter.NewRemotePayloadCodec(
301+
return converter.NewRemotePayloadCodec(
291302
converter.RemotePayloadCodecOptions{
292303
Endpoint: codecEndpoint,
293304
ModifyRequest: func(req *http.Request) error {
@@ -302,11 +313,6 @@ func newPayloadCodecInterceptor(
302313
},
303314
},
304315
)
305-
return converter.NewPayloadCodecGRPCClientInterceptor(
306-
converter.PayloadCodecGRPCClientInterceptorOptions{
307-
Codecs: []converter.PayloadCodec{payloadCodec},
308-
},
309-
)
310316
}
311317

312318
func (c *oauthCredentials) getToken(ctx context.Context) (string, error) {

go.mod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/temporalio/cli
22

3-
go 1.26.2
3+
go 1.26.3
44

55
require (
66
github.com/BurntSushi/toml v1.4.0
@@ -17,18 +17,18 @@ require (
1717
github.com/stretchr/testify v1.11.1
1818
github.com/temporalio/cli/cliext v0.0.0
1919
github.com/temporalio/ui-server/v2 v2.49.1
20-
go.temporal.io/api v1.62.11
21-
go.temporal.io/sdk v1.41.1
20+
go.temporal.io/api v1.62.13
21+
go.temporal.io/sdk v1.44.1
2222
go.temporal.io/sdk/contrib/envconfig v1.0.0
23-
go.temporal.io/server v1.32.0-155.0
23+
go.temporal.io/server v1.32.0-157.0
2424
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
2525
golang.org/x/mod v0.35.0
2626
golang.org/x/term v0.42.0
2727
golang.org/x/tools v0.44.0
2828
google.golang.org/grpc v1.80.0
2929
google.golang.org/protobuf v1.36.11
3030
gopkg.in/yaml.v3 v3.0.1
31-
modernc.org/sqlite v1.49.1
31+
modernc.org/sqlite v1.51.0
3232
)
3333

3434
replace github.com/temporalio/cli/cliext => ./cliext
@@ -52,7 +52,7 @@ require (
5252
github.com/Masterminds/goutils v1.1.1 // indirect
5353
github.com/Masterminds/semver/v3 v3.4.0 // indirect
5454
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
55-
github.com/apache/thrift v0.22.0 // indirect
55+
github.com/apache/thrift v0.23.0 // indirect
5656
github.com/aws/aws-sdk-go-v2 v1.41.6 // indirect
5757
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.9 // indirect
5858
github.com/aws/aws-sdk-go-v2/config v1.32.16 // indirect
@@ -148,6 +148,7 @@ require (
148148
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
149149
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
150150
github.com/ncruces/go-strftime v1.0.0 // indirect
151+
github.com/nexus-rpc/nexus-proto-annotations v0.1.0 // indirect
151152
github.com/olivere/elastic/v7 v7.0.32 // indirect
152153
github.com/opentracing/opentracing-go v1.2.0 // indirect
153154
github.com/pkg/errors v0.9.1 // indirect
@@ -220,7 +221,7 @@ require (
220221
k8s.io/klog/v2 v2.140.0 // indirect
221222
k8s.io/kube-openapi v0.0.0-20260414162039-ec9c827d403f // indirect
222223
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 // indirect
223-
modernc.org/libc v1.72.0 // indirect
224+
modernc.org/libc v1.72.3 // indirect
224225
modernc.org/mathutil v1.7.1 // indirect
225226
modernc.org/memory v1.11.0 // indirect
226227
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect

0 commit comments

Comments
 (0)