Fixes #21254: Fix release check failure when stale latest_release cache can't be unpickled #476

Closed
opened 2026-04-05 16:34:52 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 1/23/2026

Fixes: #21254

This PR prevents a 500 on the home page when reading the latest_release cache entry fails to unpickle after dependency upgrades (e.g. packaging>=26 with a value cached under <26).

Summary of changes

  • Wrap cache.get('latest_release') in a try/except during the superuser release check
  • On failure, log at debug level, delete the stale cache key, and continue as if no cached release is available

This keeps the UI working and allows the cache to be repopulated normally by housekeeping/release checks.

*Originally created by @pheus on 1/23/2026* ### Fixes: #21254 This PR prevents a 500 on the home page when reading the `latest_release` cache entry fails to unpickle after dependency upgrades (e.g. `packaging>=26` with a value cached under `<26`). **Summary of changes** - Wrap `cache.get('latest_release')` in a `try/except` during the superuser release check - On failure, log at debug level, delete the stale cache key, and continue as if no cached release is available This keeps the UI working and allows the cache to be repopulated normally by housekeeping/release checks.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#476