Implement warmup and fetch retry in the weatherapi adapter

This commit is contained in:
2026-07-02 11:33:16 -05:00
parent dc11e08e22
commit 27506168f8
4 changed files with 409 additions and 30 deletions

View File

@@ -74,7 +74,7 @@ Relevant docs: [CLI reference](cli.md).
Symptom: generation fails with `fetch /...`, an HTTP status, or request context.
Likely cause: the configured Weather API endpoint is unreachable, returned a
non-2xx response, or returned an invalid response envelope.
non-2xx response after retries, or returned an invalid response envelope.
Diagnostic:
@@ -83,8 +83,11 @@ weatherreporter generate daily --config ./config.yml --date 2026-05-29
```
Safe fix: verify `weather_api.base_url`, network access, and the Weather API
service response. The adapter fetches `/observations`, `/conditions/current`,
`/forecast/hourly`, `/forecast/narrative`, `/alerts/active`, and `/discussion`.
service response. The adapter first warms up `/conditions/current`, then fetches
`/observations`, `/conditions/current`, `/forecast/hourly`,
`/forecast/narrative`, `/alerts/active`, `/discussion`,
`/weatherstories/latest`, and `/outlooks/convective`. Transient VPN wake-up
failures and retryable upstream statuses are retried automatically.
Relevant docs: [Configuration reference](config.md).