The kafka-sink Cargo feature existed but was not enabled in production builds, causing all Kafka CDC events to be silently dropped at runtime. Changes: - Add --features miroir-core/kafka-sink to cargo-build in miroir-ci.yaml - Update Dockerfile comments to reflect the expected build commands - Add kafka_sink_feature.rs integration test with #[cfg(feature = "kafka-sink")] The test verifies: - Feature is enabled (compile-time check) - CdcManager publish works with Kafka config - Kafka sink config parses correctly Fixes plan-gap: kafka-sink feature not enabled in CI build and Dockerfile
20 lines
1 KiB
Docker
20 lines
1 KiB
Docker
# ── Scratch image with static musl binary ───────────────────────────────────
|
|
# Plan §7: expects miroir-proxy-linux-amd64 to be built by CI and placed in build context
|
|
# Build step (plan §7 cargo-build template):
|
|
# apt-get install -qy musl-tools
|
|
# rustup target add x86_64-unknown-linux-musl
|
|
# cargo build --release --target x86_64-unknown-linux-musl --features miroir-core/kafka-sink -p miroir-proxy
|
|
# cargo build --release --target x86_64-unknown-linux-musl --features miroir-core/kafka-sink -p miroir-ctl
|
|
# sha256sum miroir-proxy-linux-amd64 > miroir-proxy-linux-amd64.sha256
|
|
FROM scratch
|
|
ARG VERSION=0.1.0
|
|
ARG REVISION=unknown
|
|
LABEL org.opencontainers.image.source=https://github.com/jedarden/miroir
|
|
LABEL org.opencontainers.image.version=${VERSION}
|
|
LABEL org.opencontainers.image.revision=${REVISION}
|
|
LABEL org.opencontainers.image.licenses=MIT
|
|
|
|
COPY miroir-proxy-linux-amd64 /miroir-proxy
|
|
EXPOSE 7700 9090
|
|
ENTRYPOINT ["/miroir-proxy"]
|
|
CMD ["--config", "/etc/miroir/config.yaml"]
|