Skip to content

Commit 16ced12

Browse files
fix(docker): pin netcat-openbsd version in Dockerfile.temporal
- Updated the Dockerfile.temporal to pin the netcat-openbsd package to version 1.217-r0. This change ensures consistency in the build environment and prevents potential issues with future updates. Additionally, modified the error handling in index.ts to check for 'NotFoundError' when describing the workflow, improving the robustness of the scheduling logic. These changes enhance the stability and reliability of the Temporal worker setup.
1 parent 29f3c88 commit 16ced12

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Dockerfile.temporal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV POSTGRES_SEEDS=$POSTGRES_SEEDS \
1616

1717
# Install netcat as root, then switch to non-root user
1818
USER root
19-
RUN apk add --no-cache netcat-openbsd
19+
RUN apk add --no-cache netcat-openbsd=1.217-r0
2020
USER temporal
2121

2222
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=5 \

workers/main/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function createScheduleIfNotExists(connection: Connection) {
3232
try {
3333
await scheduleClient.getHandle('example-workflow-hourly').describe();
3434
} catch (err: any) {
35-
if (err?.message?.includes('workflow not found')) {
35+
if (err?.name === 'NotFoundError' || err?.message?.includes('workflow not found')) {
3636
await scheduleClient.create({
3737
scheduleId: 'example-workflow-hourly',
3838
spec: { cronExpressions: ['0 * * * *'] },

0 commit comments

Comments
 (0)