prop/rust/prop_grid_rs/Cargo.toml
Graham McIntire 4fefb81c24
feat(hrrr-point-rs): Rust binary for per-QSO HRRR enrichment
Phase 3 Stream C Rust side. Completes the HrrrFetchWorker port.

Pipeline:
- db::claim_next_hrrr_task — FOR UPDATE SKIP LOCKED on hrrr_fetch_tasks,
  newest valid_time first. Accepts the points JSONB directly.
- hrrr_points::process_batch — fetch surface + pressure GRIB2 once
  per task (tokio::try_join), decode via the existing wgrib2 plumbing,
  then for each requested point pull the cell and UPSERT INTO
  hrrr_profiles (conflict on lat/lon/valid_time).
- db::complete_hrrr_task / fail_hrrr_task — status transitions; Elixir
  backfill re-enqueues failed rows on next /30-min scan.

Shipping pieces:
- new bin src/bin/hrrr_point_worker.rs
- new module src/hrrr_points.rs (process_batch, upsert_profile)
- new Cargo [[bin]] entry; Dockerfile builds both binaries in one stage
  and ships them in the runtime image so a single CI pipeline covers
  the whole cluster
- k8s/deployment-hrrr-point-rs.yaml (1 replica, 1 Gi limit, anti-affinity
  against prop-grid-rs so chain + point work don't fight for wgrib2
  slots). Uses the same image; command: override picks the right binary.
- kustomization.yaml: include the new deployment so flux applies it
- deployment-grid-rs.yaml: bump readiness initialDelaySeconds 3→15 +
  failureThreshold 3→6 so a slow DB connect during startup can't race
  the first probe

119 Rust tests green.
2026-04-19 18:28:00 -05:00

47 lines
1.2 KiB
TOML

[package]
name = "prop_grid_rs"
version = "0.1.0"
edition = "2021"
publish = false
[lib]
name = "prop_grid_rs"
path = "src/lib.rs"
[[bin]]
name = "worker"
path = "src/bin/worker.rs"
[[bin]]
name = "hrrr_point_worker"
path = "src/bin/hrrr_point_worker.rs"
[dependencies]
tokio = { version = "1", features = ["full"] }
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "uuid", "chrono", "macros"] }
reqwest = { version = "0.12", features = ["rustls-tls", "stream"], default-features = false }
bytes = "1"
anyhow = "1"
thiserror = "2"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
bincode = "1.3"
num_cpus = "1"
byteorder = "1"
futures = "0.3"
rayon = "1.10"
axum = { version = "0.7", default-features = false, features = ["http1", "tokio"] }
prometheus = { version = "0.13", default-features = false }
png = "0.17"
rmp-serde = "1.3"
rmpv = { version = "1.3", features = ["with-serde"] }
flate2 = "1"
[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
pretty_assertions = "1"
tempfile = "3"