Skip to content

Commit 27ac434

Browse files
authored
Update demo scripts (#145)
<!--- Note to EXTERNAL Contributors --> <!-- Thanks for opening a PR! If it is a significant code change, please **make sure there is an open issue** for this. We work best with you when we have accepted the idea first before you code. --> <!--- For ALL Contributors 👇 --> ## What was changed <!-- Describe what has changed in this PR --> - Creates a helm chart for the demo worker - Fixes the build for the demo worker - Updates go dependencies in the demo submodule - Configures kube context and temporal cloud namespace via `skaffold.env` (gitignored) - Adds CI check to ensure that demo worker builds successfully ## Why? <!-- Tell your future self why have you made these changes --> These changes make it possible to run the demo in a custom k8s context (not minikube) and against a configurable Temporal cloud namespace or self-hosted cluster _without_ modifying checked-in files. Also, the demo build was broken. 😅 ## Checklist <!--- add/delete as needed ---> 1. Closes #142 2. How was this tested: Manually ran each command in the demo readme 3. Any docs updates needed? <!--- update README if applicable or point out where to update docs.temporal.io --> Demo readme includes a few updates.
1 parent 6d80452 commit 27ac434

Some content is hidden

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

41 files changed

+1141
-960
lines changed

.github/workflows/test-integration.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,42 @@ on:
66
pull_request:
77

88
jobs:
9+
skaffold-build:
10+
name: Test Skaffold Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version-file: 'go.mod'
20+
check-latest: true
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Install Skaffold
26+
run: |
27+
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
28+
sudo install skaffold /usr/local/bin/
29+
skaffold config set --global collect-metrics false
30+
31+
- name: Build worker-controller image
32+
run: |
33+
skaffold build --profile worker-controller --push=false
34+
35+
- name: Build helloworld worker image
36+
run: |
37+
skaffold build --profile helloworld-worker --push=false
38+
39+
# Verify that the demo worker patch applies successfully and builds.
40+
- name: Build helloworld worker image patch
41+
run: |
42+
git apply internal/demo/helloworld/changes/no-version-gate.patch
43+
skaffold build --profile helloworld-worker --push=false
44+
945
test-integration:
1046
name: Run Integration Tests
1147
runs-on: ubuntu-latest
@@ -38,7 +74,7 @@ jobs:
3874

3975
- name: Install controller-gen
4076
run: |
41-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.2
77+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.19.0
4278
4379
- name: Install envtest
4480
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bin
44
dist
55

66
secret.env
7+
skaffold.env
78
certs
89

910
.DS_Store

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.24 AS builder
2+
FROM golang:1.25 AS builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TEMPORAL ?= temporal
3737

3838
## Tool Versions
3939
HELM_VERSION ?= v3.14.3
40-
CONTROLLER_TOOLS_VERSION ?= v0.16.2
40+
CONTROLLER_TOOLS_VERSION ?= v0.19.0
4141

4242
##### Tools #####
4343
print-go-version:
@@ -161,7 +161,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
161161
# source secret.env && make start-sample-workflow TEMPORAL_CLOUD_API_KEY=$TEMPORAL_CLOUD_API_KEY
162162
.PHONY: start-sample-workflow
163163
start-sample-workflow: ## Start a sample workflow.
164-
@$(TEMPORAL) workflow start --type "HelloWorld" --task-queue "hello_world" \
164+
@$(TEMPORAL) workflow start --type "HelloWorld" --task-queue "default/helloworld" \
165165
--tls-cert-path certs/client.pem \
166166
--tls-key-path certs/client.key \
167167
--address "worker-controller-test.a2dd6.tmprl.cloud:7233" \
@@ -171,7 +171,7 @@ start-sample-workflow: ## Start a sample workflow.
171171

172172
.PHONY: apply-load-sample-workflow
173173
apply-load-sample-workflow: ## Start a sample workflow every 15 seconds
174-
watch --interval 0.1 -- $(TEMPORAL) workflow start --type "HelloWorld" --task-queue "hello_world"
174+
watch --interval 0.1 -- $(TEMPORAL) workflow start --type "HelloWorld" --task-queue "default/helloworld"
175175

176176
.PHONY: list-workflow-build-ids
177177
list-workflow-build-ids: ## List workflow executions and their build IDs.

go.mod

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

3-
go 1.24.5
4-
5-
toolchain go1.24.6
3+
go 1.25.0
64

75
require (
86
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
@@ -130,6 +128,7 @@ require (
130128
github.com/sony/gobreaker v1.0.0 // indirect
131129
github.com/spf13/cast v1.7.0 // indirect
132130
github.com/spf13/pflag v1.0.6 // indirect
131+
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
133132
github.com/stretchr/objx v0.5.2 // indirect
134133
github.com/temporalio/ringpop-go v0.0.0-20250130211428-b97329e994f7 // indirect
135134
github.com/temporalio/sqlparser v0.0.0-20231115171017-f4060bcfa6cb // indirect
@@ -138,6 +137,7 @@ require (
138137
github.com/uber-common/bark v1.3.0 // indirect
139138
github.com/uber-go/tally/v4 v4.1.17 // indirect
140139
github.com/x448/float16 v0.8.4 // indirect
140+
github.com/zeebo/errs v1.4.0 // indirect
141141
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
142142
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect
143143
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
@@ -176,8 +176,8 @@ require (
176176
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
177177
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
178178
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
179-
google.golang.org/grpc v1.71.0 // indirect
180-
google.golang.org/protobuf v1.36.5 // indirect
179+
google.golang.org/grpc v1.72.2 // indirect
180+
google.golang.org/protobuf v1.36.6 // indirect
181181
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
182182
gopkg.in/inf.v0 v0.9.1 // indirect
183183
gopkg.in/validator.v2 v2.0.1 // indirect

go.sum

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
339339
github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
340340
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
341341
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
342+
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
343+
github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g=
342344
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
343345
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
344346
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
@@ -380,6 +382,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
380382
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
381383
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
382384
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
385+
github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM=
386+
github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4=
383387
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
384388
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
385389
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 h1:JRxssobiPg23otYU5SbWtQC//snGVIM3Tx6QRzlQBao=
@@ -600,10 +604,10 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
600604
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
601605
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
602606
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
603-
google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
604-
google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
605-
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
606-
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
607+
google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8=
608+
google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
609+
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
610+
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
607611
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
608612
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
609613
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

go.work

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
go 1.24.5
2-
3-
toolchain go1.24.6
1+
go 1.25.0
42

53
use (
64
.

0 commit comments

Comments
 (0)