prop/test/microwaveprop
Graham McIntire a24ce027f4 Fix /weather 500 on cold cache, untrack k8s secret
The /weather LiveView was timing out on pod restart because
latest_weather_grid/1 ran load_weather_grid_from_db/1 synchronously on
cache miss — that query reads 176k hrrr_profiles rows with two huge
JSONB columns (profile array + duct_characteristics), and JSONB
decoding blocked the LiveView process past the 15-second pool
ownership timeout.

On cache miss latest_weather_grid/1 now returns empty immediately and
kicks off a deduped background fill through GridCache.claim_fill/1 (a
per-valid_time ETS lock so N concurrent mounts after restart don't each
fire the slow query). When the fill completes it broadcasts
weather:updated, and the handle_info in WeatherMapLive hits the warm
cache and pushes rows over the socket.

Added load_weather_grid/1 as a synchronous sibling for tests and any
caller that genuinely needs inline data. Tests updated to use it and
to clear GridCache in setup so ETS state doesn't leak between cases.

Also untrack k8s/secret.yaml and add both it and k8s/*-secret.yaml to
.gitignore — those manifests hold plaintext SMTP and database
credentials that should not live in the repo. Secrets already in git
history should be rotated separately.
2026-04-12 13:56:59 -05:00
..
backtest Fix wgrib2 -lola binary parsing and add native_surface_refractivity 2026-04-10 08:13:33 -05:00
beacons Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
commercial Add commercial link monitoring via SNMP polling 2026-03-30 13:02:59 -05:00
propagation Add more caching to make the map feel instant 2026-04-12 12:26:25 -05:00
radio Normalize ADIF MODE/SUBMODE and document the mapping 2026-04-12 13:15:31 -05:00
terrain Remove unused CaptureLog import in elevation client test 2026-04-12 09:32:47 -05:00
weather Cache /weather grid, defer contact show mount, cache stats 2026-04-12 12:55:50 -05:00
workers Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
accounts_test.exs Add is_admin flag, auto-grant to graham@mcintire.me 2026-04-08 11:43:52 -05:00
backtest_test.exs Phase 9.1: Consolidated backtest report and contest log import 2026-04-10 11:57:15 -05:00
beacon_monitors_test.exs Add beacon monitor registration and fix prod SMTP 2026-04-08 11:30:28 -05:00
beacons_test.exs Add beacon bearing, beamwidth, and weak-signal keyings 2026-04-09 08:59:16 -05:00
cache_test.exs Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
commercial_test.exs Add commercial link monitoring via SNMP polling 2026-03-30 13:02:59 -05:00
markdown_test.exs Add Tier 1 test coverage: EnrichmentStatus, Markdown, health, RemoteIp, Maidenhead 2026-04-06 10:15:38 -05:00
propagation_test.exs Add more caching to make the map feel instant 2026-04-12 12:26:25 -05:00
radio_test.exs Replace boolean enrichment flags with enum status fields 2026-04-02 12:07:51 -05:00
terrain_test.exs Rename qsos table to contacts, qso_id to contact_id 2026-04-02 15:52:19 -05:00
weather_grid_test.exs Fix /weather 500 on cold cache, untrack k8s secret 2026-04-12 13:56:59 -05:00
weather_test.exs Reduce dead tuples by using conditional upserts and skip-on-conflict 2026-04-04 17:32:57 -05:00