test: make Docker suites hermetic - #438
Closed
sbalabanov wants to merge 1 commit into
Closed
Conversation
|
|
sbalabanov
marked this pull request as ready for review
July 23, 2026 23:51
behinddwalls
approved these changes
Jul 23, 2026
sbalabanov
marked this pull request as draft
July 23, 2026 23:53
5 tasks
Contributor
Author
|
Closed in lieu of #439 , a separate PR will come to address fixes from here |
sbalabanov
pushed a commit
that referenced
this pull request
Jul 28, 2026
…ilegroups Summary: Follow-ups to #439, adopting the stronger ideas from the concurrent implementation in #438. Intent: - #439 seeds the compose image-tag prefix from TEST_TARGET, which is identical across worktrees: two worktrees at different revisions running the same target against one Docker daemon can interleave builds and start a container from the other worktree's image. Derive the tag from the declared input contents instead, so a collision is impossible by construction. - The cross-compiled service binaries and Dockerfiles were exported as public, non-testonly targets and enumerated file-by-file in every test's data list. Encapsulate them so they cannot leak into production targets. Changes: - Image-tag prefix is now a hash of the declared inputs (compose file + staged build-context files, hashed in deterministic order): identical inputs reuse the docker build cache, different revisions never collide on a tag. - Each service bundles its docker build-context inputs (Dockerfile, configs, cross-compiled linux binary) into a testonly docker_test_context filegroup visible only to //test/...; the go_cross_binary targets are now private and the per-file Dockerfile/queues.yaml exports are gone. - Build-context staging streams the copy and preserves the source file mode instead of loading whole binaries into memory and stamping everything 0755. Test Plan: - Ran //test/integration/submitqueue/gateway, //test/e2e/submitqueue, and //test/integration/extension/counter/mysql locally against a real Docker daemon (staged-context, multi-service, and no-build-context paths) and verified via `docker images` that image tags carry the content-hash prefix, with distinct prefixes per distinct input set. --- <sub>Generated by the 🪄 [pr-create](https://sg.uberinternal.com/code.uber.internal/uber-code/devexp-agent-marketplace/-/blob/claude-code/plugins/dev/uber-dev/skills/pr-create/SKILL.md) skill in devexp-agent-marketplace</sub> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MODULE.bazel/go.modmarker data dependenciesSandbox evaluation
The Docker suites already run under Bazel's sandboxed strategy (
processwrapper-sandboxlocally). I did not enable Bazel's experimental hermetic Linux sandbox globally: it omits the host root and would require nonportable mounts for the Docker CLI, plugin, socket, shared libraries, and certificate/config paths. The tests now get source inputs only through Bazel runfiles while retaining the host Docker boundary they inherently require.Validation
make buildmake testmake integration-testmake e2e-testmake lintmake check-tidymake check-gazelle