Skip to content

fix(weather): fix stale daily forecast days and radar tile timeout (v2.2.3) - #111

Merged
ChuckBuilds merged 2 commits into
mainfrom
fix/weather-stale-data
Apr 29, 2026
Merged

fix(weather): fix stale daily forecast days and radar tile timeout (v2.2.3)#111
ChuckBuilds merged 2 commits into
mainfrom
fix/weather-stale-data

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Summary

  • Radar tile fetch caused executor timeout: refresh_data() fetched 12 tiles sequentially (worst case 120s), exceeding the plugin executor's 30s timeout. Reduced to 6 frames with a 20s wall-clock budget — fetch now completes safely in a few seconds under normal conditions
  • Daily forecast showed past days from stale data: _process_forecast_data used daily[1:4] relative to the API fetch time. With 3-day-old cached data, Tuesday would show Sun/Mon/Tue. Replaced with a date filter (matching the existing hourly filter pattern) so only future days are displayed regardless of data freshness

Context

Part of a two-repo fix for plugins silently showing stale data. The radar timeout in this plugin was the trigger for the PluginState.ERROR permanent-lockout bug fixed in LEDMatrix#316.

Test plan

  • Deployed to devpi alongside the LEDMatrix fix — weather updated to current data within seconds of service restart
  • Cache file updated: 2026-04-28 09:29:45 (was stuck at 2026-04-25 07:35)
  • Confirm 3-day forecast shows Wed/Thu/Fri on a Tuesday (not Sun/Mon/Tue from stale data)

🤖 Generated with Claude Code

…2.2.3)

Two bugs caused weather to show days-old data:

1. Radar tile fetch timed out the plugin executor: refresh_data() fetched
   12 tiles sequentially (worst case 120s), exceeding the 30s executor
   timeout. Reduced to 6 frames and added a 20s wall-clock budget so the
   fetch always completes within the executor window.

2. Daily forecast showed past days from stale cached data: _process_forecast_data
   used daily[1:4] relative to fetch time. Replaced with a date filter
   (same pattern as the existing hourly filter) so only future days appear
   regardless of when the data was fetched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@ChuckBuilds has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 41 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a7438417-5c46-4f7b-8fc1-d3d643148bb8

📥 Commits

Reviewing files that changed from the base of the PR and between 17a2bee and aadbc1f.

📒 Files selected for processing (4)
  • plugins.json
  • plugins/ledmatrix-weather/manager.py
  • plugins/ledmatrix-weather/manifest.json
  • plugins/ledmatrix-weather/radar.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/weather-stale-data

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 2 minutes and 41 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@ChuckBuilds

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ChuckBuilds
ChuckBuilds merged commit b9dd769 into main Apr 29, 2026
@ChuckBuilds
ChuckBuilds deleted the fix/weather-stale-data branch April 29, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant