* docs(testutil): document migration-0032 hang and container-leak caveats (refs be-r7j5x)
Adds a comment near DoltDockerImage documenting two known limitations
of the podman-rootless + testcontainers-go real-server test harness:
- Schema migration 0032 hangs indefinitely over the sql-server wire
protocol in this harness only; not reachable on real GitHub Actions
CI or a bare-host-process dolt sql-server (be-j3szz).
- Containers can leak because Ryuk is disabled for this harness, so
there is no reap safety net if a test process skips its cleanup
(be-5kkk6).
No production code changes.
* docs(testutil): fix Ryuk-disabled citation and causal claim (refs be-ohrc0)
Round-1 review (be-ohrc0) flagged that the container-leak bullet cited
be-hsa9t for the TESTCONTAINERS_RYUK_DISABLED=true rationale and claimed
it was a workaround for this host's broken dockerd/containerd. Neither
is accurate: be-hsa9t is an unrelated git-remote E2BIG fix that never
mentions Ryuk or dockerd/containerd.
Corrects the citation to be-w3n2m (open, undecided) and the causal claim
to match its actual finding: under rootless podman, Ryuk frequently
cannot start because it wants the runtime socket.
No production code changes.
* docs(testing): move the Dolt container caveats out of DoltDockerImage
Review #6001 asked for this to leave the source file, on three grounds
that all check out.
CONTRIBUTING_PR_GUIDELINES.md line 33 is explicit — "Minimize inline code
comments … let the commit message and PR description carry the why" — and
a 23-line comment-only diff is the shape it names. DoltDockerImage is also
the wrong hook: it is the image pin guarded by test/docsync/doltpin_test.go
and read by container_provider.go and testdoltserver.go, so harness
lifecycle lore attached to it reaches every caller including CI.
The Ryuk sentence was also wrong as written. It claimed Ryuk "is disabled
for this harness (TESTCONTAINERS_RYUK_DISABLED=true)". This repository sets
that variable nowhere — not in Go, scripts/, the Makefile, or
.github/workflows/; the only tracked occurrences are release-gates/*.md,
which are records of operators' local podman runs. CI therefore runs with
Ryuk enabled, and the original text described a local shell as if it were
the repo's harness. Reworded to say what is true: the podman-rootless flow
generally requires disabling Ryuk by hand, and doing so is what removes the
safety net.
Both caveats now live in engdocs/TESTING.md as a sibling of "Test
Environment and Readiness", the section that already covers
BEADS_TEST_SKIP=dolt and BEADS_TEST_ENV_RUN_DOLT. Content is otherwise
preserved, including the be-j3szz / be-w3n2m / be-5kkk6 evidence chain, plus
a stray-container check and a pointer to testMainInner in beads_test.go.
engdocs/TESTING.md is not in check-doc-freshness.sh's DOCS list, so this
needs no inventory or freshness marker.
internal/testutil/testdoltcommon.go is now byte-identical to main.
Addresses the doc half of #6171. Refs be-8n9ns.
* docs(testing): scope the Dolt caveats to podman-rootless and fix the repro
Maintainer review fixes for PR #6001 (adopt-pr review iterations 1 and 2).
All edits are phrase-level and confined to engdocs/TESTING.md.
- Scope the causal claim to the podman-rootless path. CI runs the same
containerized wire path green on every risk-tier PR -- pr-risk.yml's
test-server-storage* jobs pull the pinned image precisely to defeat the
self-skip and run with no BEADS_TEST_SKIP=dolt -- so "the container
port-forwarding path" as a general cause is refuted by the repo's own CI,
and as written invited a Docker developer to dismiss a real 0032/initSchema
hang as a known harness limitation. Softened "Neither is reachable ... on
GitHub Actions" to "Neither failure mode manifests ...", which is what is
actually true.
- State every way a suite reaches a real dolt sql-server. The entry condition
named one mechanism (testcontainers-go) and one fallback (self-skip), but
the uow package the section uses as its repro also has suites that call
testutil.RequireDoltBinary and start a server from the local dolt CLI
(proxy.BackendLocalServer) with no container involved, and lanes that set
BEADS_TEST_REQUIRE_DOLT_CONTAINER=1 fail rather than skip. The sentence now
covers all three and scopes the two limitations to the containerized path.
The testcontainers leg says "by default" so it stays true once main's
BEADS_TEST_DOLT_SERVER=local backend section merges above it, without
forward-referencing a section this branch does not have.
- Attribute the two failure shapes separately. The fenced banner could not be
produced by the repro printed beside it: the uow entry points pass
context.Background(), so context deadline exceeded has no producer there;
the only 60s in the uow package is bo.MaxElapsedTime, a backoff budget that
backoff.Retry consults only between attempts and which therefore cannot
bound a hang inside one. The banner's only producer is store.go's
"failed to initialize schema: %w" inside newServerMode, the server-mode
store open, which runs initSchema with the caller's context -- so the doc
names that path. (Iteration 1 labelled it the embedded-store open, which
contradicted the section's own statement that the embedded/CLI engine does
not hang.) Kept the uow "sits until the package timeout" sentence (the
accurate half), dropped the unverifiable ~60s figure, and dropped the
"failed to create embedded DoltStore: " prefix, which has zero occurrences
in the tree, so the quoted line is greppable.
- Make the stray-container check runnable under the flow the section is about.
A bare docker ps talks to the CLI's default endpoint and returns a false
all-clear on exactly the leaked-container incident the paragraph cites; it
now carries DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock, the
form all six in-repo records of this flow use.
- Close the image-pin duplication without touching the guard, and make the
read fail loudly. The command read the tag from a hand-copy outside
test/docsync/doltpin_test.go's reach; it now reads it from
internal/testutil/testdoltcommon.go, resolved from the repository root with
git rev-parse --show-toplevel so it works from any directory in the tree.
An empty read would reproduce the false all-clear (docker ps --filter
ancestor= exits 0 listing nothing), so the tag is expanded as
${dolt_image:?...}, which refuses to run docker without it. A trailing
"[ -n ... ] || { ...; return 1; }" guard does not do that when pasted at an
interactive prompt: a top-level return stops neither bash nor zsh, and the
next line still runs docker with an empty filter. Deliberately NOT added to
doltpin_test.go's scanned set: doltPinImageRE requires the assignment form
DoltDockerImage = "..." which cannot appear in prose, and find() t.Fatalf's
on a miss, so that would red a currently green test.
Validation: git diff --check clean; go test ./test/docsync/ 8 PASS / 0 FAIL /
0 SKIP with TestDoltVersionPinsAgree green; scripts/check-doc-freshness.sh
exit 0; the snippet extracted from the doc passes bash -n and zsh -n, resolves
dolthub/dolt-sql-server:2.2.0 from the repository root and from a
subdirectory in interactive bash and zsh, and outside a repository prints the
error without running docker (checked against a stub docker).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Gas City Adopt-PR <adopt-pr@gascity.local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>