Skip to content

fix: increase create-namespace retry attempts and make timeout configurable#142

Merged
chaptersix merged 1 commit intomainfrom
fix/issue-136-namespace-setup
Apr 10, 2026
Merged

fix: increase create-namespace retry attempts and make timeout configurable#142
chaptersix merged 1 commit intomainfrom
fix/issue-136-namespace-setup

Conversation

@chaptersix
Copy link
Copy Markdown
Contributor

@chaptersix chaptersix commented Apr 10, 2026

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 throughout

…urable

Hardcoded 3 health check attempts (~45s total) was not enough for the
Temporal server to fully initialize its membership ring, causing context
deadline exceeded errors in temporal-create-namespace.

Increases default to 30 attempts (2.5 min at 5s intervals) and exposes
TEMPORAL_HEALTH_CHECK_MAX_ATTEMPTS and TEMPORAL_HEALTH_CHECK_SLEEP_SECONDS
env vars for overriding. Also adds retry loops to the port wait and
namespace create steps which previously had no retry at all.

Fixes #136
@chaptersix chaptersix marked this pull request as ready for review April 10, 2026 13:09
@chaptersix chaptersix requested a review from a team as a code owner April 10, 2026 13:09
@chaptersix chaptersix merged commit 706a9bf into main Apr 10, 2026
13 checks passed
@chaptersix chaptersix deleted the fix/issue-136-namespace-setup branch April 10, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Default Postgres Docker Compose Namespace Setup Container Not Working

1 participant