You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(octopus): flag Octopus rate URLs with no current/future rates
Fixes#2726.
download_octopus_rates_func() already handles connection errors, bad HTTP
status, JSON decode failures and a missing "results" key - covering "is
this URL valid and does it return JSON" for both rates_import/export_
octopus_url and the compare section (both already route through the same
shared download_octopus_rates()).
What was missing: a retired Octopus product's URL can still return a
genuine 200/valid-JSON response with historical-only results - exactly
the "Agile import rates all 0.0" (#2721) and "Compare chart never loads"
(#2690) symptoms gcoan pointed at. Added a check that the downloaded data
actually reaches self.minutes_now onward; if not, it's treated the same
as any other download failure (Warn log + record_status(had_errors=True),
falls back to stale cache if available, else raises) rather than silently
caching/using data with nothing current in it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
self.log("Warn: Octopus: Downloaded data from URL {} has no current or future rates - the product may have been retired, check the URL in apps.yaml".format(url))
2319
+
self.record_status("Warn: Octopus: URL has no current rates, check apps.yaml", debug=url, had_errors=True)
0 commit comments