Skip to content

Commit 2041ccf

Browse files
kirson-gitclaudeosu
authored
fix(setup.sh): set Temporal namespace retention on create (#2675)
## Problem `helm-prereqs/setup.sh` creates the Temporal namespaces (`cloud`, `site`, `flow`, `<site-uuid>`) with: ``` temporal operator namespace create -n <ns> --address ... 2>/dev/null || true ``` No `--retention` is passed, and `2>/dev/null || true` swallows any failure. Depending on the Temporal server's default-retention policy the create can be rejected/incomplete; the namespace then never exists and the nico-rest **cloud/site/flow workers CrashLoop** with `Namespace "<ns>" is not found`. The silent `|| true` makes this invisible during install. ## Fix Pass an explicit `--retention 72h` on each namespace create so it succeeds deterministically regardless of server defaults. (Reproduced on a clean v0.10.3 install; the same code is still present on `main`.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: kirson-git <ekirson@nvidia.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Hasan Khan <hasank@nvidia.com>
1 parent cc31499 commit 2041ccf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

helm-prereqs/setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,12 @@ _TEMPORAL_TLS="--tls-cert-path /var/secrets/temporal/certs/server-interservice/t
630630
--tls-ca-path /var/secrets/temporal/certs/server-interservice/ca.crt \
631631
--tls-server-name interservice.server.temporal.local"
632632
kubectl exec -n temporal deploy/temporal-admintools -- \
633-
sh -c "temporal operator namespace create -n cloud --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
633+
sh -c "temporal operator namespace create -n cloud --retention 72h --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
634634
kubectl exec -n temporal deploy/temporal-admintools -- \
635-
sh -c "temporal operator namespace create -n site --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
635+
sh -c "temporal operator namespace create -n site --retention 72h --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
636636
# flow Temporal namespace — required by NICo Flow workers; pod panics on startup if absent.
637637
kubectl exec -n temporal deploy/temporal-admintools -- \
638-
sh -c "temporal operator namespace create -n flow --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
638+
sh -c "temporal operator namespace create -n flow --retention 72h --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
639639
echo "Temporal namespaces ready"
640640

641641
_SETUP_PHASE="[7g/7] NICo REST helm chart"
@@ -763,7 +763,7 @@ _TEMPORAL_TLS="--tls-cert-path /var/secrets/temporal/certs/server-interservice/t
763763
--tls-ca-path /var/secrets/temporal/certs/server-interservice/ca.crt \
764764
--tls-server-name interservice.server.temporal.local"
765765
kubectl exec -n temporal deploy/temporal-admintools -- \
766-
sh -c "temporal operator namespace create -n '${NICO_SITE_UUID}' --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
766+
sh -c "temporal operator namespace create -n '${NICO_SITE_UUID}' --retention 72h --address ${_TEMPORAL_ADDR} ${_TEMPORAL_TLS}" 2>/dev/null || true
767767
echo "Temporal namespace ready"
768768

769769
# FLOW_GRPC_ENABLED toggles the site-agent's Flow gRPC client (see

0 commit comments

Comments
 (0)