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).
This commit is contained in:
parent
ab653f37ef
commit
ea73f3164d
2 changed files with 11 additions and 24 deletions
|
|
@ -23,16 +23,15 @@ COPY Cargo.toml Cargo.lock* ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY tests ./tests
|
COPY tests ./tests
|
||||||
|
|
||||||
# BuildKit cache mounts persist cargo's registry + git + target
|
# BuildKit cache mounts persist cargo's registry + git across CI runs.
|
||||||
# directories across CI runs, so dependency changes are the only
|
# `target/` is deliberately NOT cached — after Stream C bumped the
|
||||||
# thing that triggers a full rebuild. Lint + test gate the image
|
# crate to two binaries, the runner started running out of disk inside
|
||||||
# build — a regressed scorer or a clippy warning never produces a
|
# the mount and the build would fail mid-link. Rebuilding from scratch
|
||||||
# pushable image. `target/` is cached but the final binary is
|
# adds ~3 min to the build but removes the failure mode entirely.
|
||||||
# copied out into a non-cached path so the runtime stage can reach
|
# Lint + test gate the image build so a regressed scorer or a clippy
|
||||||
# it (COPY --from= can't read from a cache mount).
|
# warning never produces a pushable image.
|
||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
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=/usr/local/cargo/git,sharing=locked \
|
||||||
--mount=type=cache,target=/src/target,sharing=locked \
|
|
||||||
rustup component add clippy \
|
rustup component add clippy \
|
||||||
&& cargo clippy --all-targets -- -D warnings \
|
&& cargo clippy --all-targets -- -D warnings \
|
||||||
&& cargo test --release \
|
&& cargo test --release \
|
||||||
|
|
|
||||||
|
|
@ -180,19 +180,7 @@ async fn upsert_profile(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
// Integration tests for process_batch + upsert_profile live in
|
||||||
mod tests {
|
// tests/hrrr_points_live.rs (network + DB gated). No unit tests here
|
||||||
use super::*;
|
// — the two public functions are thin glue over fetcher/decoder which
|
||||||
use chrono::TimeZone;
|
// carry their own test coverage.
|
||||||
|
|
||||||
#[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),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue