Skip to content

fix: stabilize test container startup - #5931

Merged
disintegrator merged 2 commits into
mainfrom
demo-seed-safety-flake
Sep 1, 2026
Merged

fix: stabilize test container startup#5931
disintegrator merged 2 commits into
mainfrom
demo-seed-safety-flake

Conversation

@disintegrator

@disintegrator disintegrator commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wait for the Docker daemon with bounded retries before starting PostgreSQL, Redis, or ClickHouse test containers.
  • Coalesce concurrent Docker readiness calls and cache successful readiness for the test process.
  • Require the ClickHouse container's final network listener before reporting readiness while retaining client-side ping retries.

Motivation

Blacksmith runners can begin a test while Docker's API is temporarily unresponsive. Testcontainers caches its first Docker host discovery result, so a transient docker info timeout otherwise prevents every container from starting in that test process. A singleflight preflight makes concurrent container constructors share one bounded readiness attempt and error; later calls can retry a failure, while success remains cached.

The ClickHouse image also starts a loopback-only bootstrap server while applying initialization scripts. Waiting through the container hostname prevents that temporary server from satisfying readiness while preserving the existing host-side retry protection.

@disintegrator
disintegrator requested a review from a team as a code owner September 1, 2026 14:09
@disintegrator disintegrator added the bug Something isn't working label Sep 1, 2026
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a3e50fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@disintegrator disintegrator added the review:bypass Merge without human review approval. Required status checks still apply. label Sep 1, 2026

@gram-bot gram-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: review:bypass label applied by @disintegrator. Required status checks still gate this merge.

@disintegrator disintegrator changed the title fix: wait for final ClickHouse test listener fix: stabilize test container startup Sep 1, 2026
@disintegrator
disintegrator added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 0a0cc27 Sep 1, 2026
44 checks passed
@disintegrator
disintegrator deleted the demo-seed-safety-flake branch September 1, 2026 14:48
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working review:bypass Merge without human review approval. Required status checks still apply.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants