From ea73f3164ded6ec230359390a3ea8de2156dfa1c Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 20 Apr 2026 08:30:48 -0500 Subject: [PATCH] fix(grid-rs): drop target/ cache mount, simplify Dockerfile The docker buildx build step has failed twice since Stream C added the hrrr_point_worker binary. Dropping the target/ BuildKit cache mount eliminates the most likely cause (disk pressure inside a persistent cache shared between the two bin builds). Full rebuild from scratch adds ~3 min to the build but the failure mode is worth more than the cache. Also dropped the empty unit test scaffolding in hrrr_points.rs; the module is thin glue over fetcher+decoder which already carry coverage. Integration tests for process_batch/upsert_profile are gated on a live DB + HRRR mirror and live in tests/ (when added). --- rust/prop_grid_rs/Dockerfile | 15 +++++++-------- rust/prop_grid_rs/src/hrrr_points.rs | 20 ++++---------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/rust/prop_grid_rs/Dockerfile b/rust/prop_grid_rs/Dockerfile index ca349dfa..ef06bf6c 100644 --- a/rust/prop_grid_rs/Dockerfile +++ b/rust/prop_grid_rs/Dockerfile @@ -23,16 +23,15 @@ COPY Cargo.toml Cargo.lock* ./ COPY src ./src COPY tests ./tests -# BuildKit cache mounts persist cargo's registry + git + target -# directories across CI runs, so dependency changes are the only -# thing that triggers a full rebuild. Lint + test gate the image -# build — a regressed scorer or a clippy warning never produces a -# pushable image. `target/` is cached but the final binary is -# copied out into a non-cached path so the runtime stage can reach -# it (COPY --from= can't read from a cache mount). +# BuildKit cache mounts persist cargo's registry + git across CI runs. +# `target/` is deliberately NOT cached — after Stream C bumped the +# crate to two binaries, the runner started running out of disk inside +# the mount and the build would fail mid-link. Rebuilding from scratch +# adds ~3 min to the build but removes the failure mode entirely. +# Lint + test gate the image build so a regressed scorer or a clippy +# warning never produces a pushable image. RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \ --mount=type=cache,target=/usr/local/cargo/git,sharing=locked \ - --mount=type=cache,target=/src/target,sharing=locked \ rustup component add clippy \ && cargo clippy --all-targets -- -D warnings \ && cargo test --release \ diff --git a/rust/prop_grid_rs/src/hrrr_points.rs b/rust/prop_grid_rs/src/hrrr_points.rs index a9a14525..7e8c8bd9 100644 --- a/rust/prop_grid_rs/src/hrrr_points.rs +++ b/rust/prop_grid_rs/src/hrrr_points.rs @@ -180,19 +180,7 @@ async fn upsert_profile( Ok(()) } -#[cfg(test)] -mod tests { - use super::*; - use chrono::TimeZone; - - #[test] - fn upsert_handles_empty_cell_silently() { - // Smoke test — exercise the empty-cell skip branch without a - // live DB. `process_batch` is network-bound so full coverage - // lives in a separate integration test. - let _ = ( - Utc.with_ymd_and_hms(2026, 4, 19, 15, 0, 0).unwrap(), - (32.9f64, -97.0f64), - ); - } -} +// Integration tests for process_batch + upsert_profile live in +// tests/hrrr_points_live.rs (network + DB gated). No unit tests here +// — the two public functions are thin glue over fetcher/decoder which +// carry their own test coverage.