Commit 706a9bf
authored
fix: increase create-namespace retry attempts and make timeout configurable (#142)
Fixes #136
## Problem
`temporal-create-namespace` was hardcoded to 3 health check attempts
(~45 seconds total). On slower machines or fresh setups, the Temporal
server takes longer to fully initialize its membership ring — so the
script exhausts its retries and exits before the server is ready.
The existing `temporal` container healthcheck uses `nc -z localhost
7233`, which only checks TCP connectivity. The port opens before the
membership ring stabilizes, so `service_healthy` fires too early and
`temporal-create-namespace` starts against a server that isn't truly
ready.
## Fix
- Increase default health check attempts from 3 to 30 (2.5 minutes at 5s
intervals)
- Add `TEMPORAL_HEALTH_CHECK_MAX_ATTEMPTS` and
`TEMPORAL_HEALTH_CHECK_SLEEP_SECONDS` env vars for overriding
- Add retry loop to the port wait step (previously a single `nc` call
with no retry)
- Add retry loop to the namespace create/describe step (previously no
retry)
- Fix unquoted variable references throughout1 parent efb48a1 commit 706a9bf
1 file changed
Lines changed: 49 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
9 | 23 | | |
10 | 24 | | |
11 | 25 | | |
12 | | - | |
13 | | - | |
| 26 | + | |
14 | 27 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | | - | |
22 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
23 | 41 | | |
24 | 42 | | |
25 | 43 | | |
26 | | - | |
27 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments