Repository navigation
build(container): add production-ready wrapper image - #11
Merged
korayakpinar merged 11 commits intoAug 5, 2026
Merged
korayakpinar merged 11 commits into
korayakpinar merged 11 commits into
Conversation
yusufozmis
approved these changes
Aug 5, 2026
korayakpinar
force-pushed
the
feat/flexible-deployment-phase-3
branch
from
August 5, 2026 16:05
f8fcc1b to
d722623
Compare
korayakpinar
force-pushed
the
feat/flexible-deployment-phase-3
branch
from
August 5, 2026 16:42
d722623 to
50f8c75
Compare
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
This PR turns the idempotent runtime introduced in #10 into a production-oriented container artifact.
It adds a native query-readiness healthcheck, deterministic build metadata, a pinned multi-stage non-root image, reproducibility checks, and container-level lifecycle and isolation tests.
This is the top PR in the flexible archive-wrapper deployment stack.
Native Healthcheck
The binary now provides:
The healthcheck calls the standard gRPC health service for
query.Query. OnlySERVINGexits with status0;NOT_SERVING,UNKNOWN, connection failure, timeout, and invalid configuration exit non-zero.Address resolution follows:
An explicit address does not require a config file. Wildcard bind addresses are converted to loopback dial targets inside the container:
The default timeout is three seconds. Healthcheck and version commands are dispatched before runtime logger initialization, so short-lived probes do not create log files.
Build Metadata
The binary now exposes stable version information:
Version, commit SHA, and build date are injected with linker flags. Runtime startup logs carry the same fields.
Build dates derive from the source commit timestamp rather than wall-clock time, supporting reproducible artifacts.
Container Image
The new root-level
Dockerfileuses pinned builder and runtime images and supports:The runtime image:
65532:65532archive-wrapper runSIGTERMas the stop signal.env, LevelDB state, or log fileThe expected runtime mounts are:
/etc/archive-wrapper/config.yaml/var/lib/pulsar/var/lib/archive-wrapper/run/archive-wrapperThe image pre-creates its data directory with non-root ownership so newly created named volumes work without an init container. Operators using bind mounts must provide matching host ownership.
Reproducible Builds
The build uses:
CGO_ENABLED=0puregobuild tag-trimpath-buildvcs=falseMake targets verify both binary and OCI image reproducibility.
Container Lifecycle Contract
The same image and
runcommand are used for fresh boot and restart.The image supports:
PostgreSQL connectivity alone does not produce readiness. The query service becomes
SERVINGonly after successful reconciliation has produced or recovered a usable cursor.Container Test Harness
The deterministic Compose fixture verifies:
SIGTERMshutdown behaviorEach test uses a unique Compose project and removes only its own containers and volumes.
CI
The new container workflow:
Documentation
docs/container.mddocuments the complete image contract, including mounts, ownership, startup, shutdown, health behavior, transport limitations, image pinning, and local validation commands.Pulsar topology generation and full Pulsar-wrapper E2E orchestration are intentionally handled in the subsequent Pulsar integration phase rather than this wrapper artifact PR.
Validation
The current stack has been validated with:
The container lifecycle, concurrent-client, and wrapper-isolation smoke tests pass.
Stack
feat/flexible-deployment-phase-2