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 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 \
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue