feat(updates): PackageIndexMissing, for a host without a package index #120

Merged
christianmanivong merged 1 commits from feat/package-index-missing into main 2026-11-14 22:52:11 +00:00
Owner

OpenWrt keeps its package index in RAM and loses it on every reboot. get_available_updates() raises then, but only as a bare RuntimeError, so netOrk cannot tell it from a failed read and shows a device communication error.

  • PackageIndexMissing (a RuntimeError, so existing callers still catch it) in updates.py, exported from the package.
  • The contract of get_available_updates() names it; refresh_available_updates() cures it.

For NetOrk/netork#2527. napalm-openwrt raises it next; a 4.39.0 release follows.

OpenWrt keeps its package index in RAM and loses it on every reboot. `get_available_updates()` raises then, but only as a bare `RuntimeError`, so netOrk cannot tell it from a failed read and shows a device communication error. - `PackageIndexMissing` (a `RuntimeError`, so existing callers still catch it) in `updates.py`, exported from the package. - The contract of `get_available_updates()` names it; `refresh_available_updates()` cures it. For NetOrk/netork#2527. napalm-openwrt raises it next; a 4.39.0 release follows.
christianmanivong added 1 commit 2026-11-14 22:45:52 +00:00
feat(updates): PackageIndexMissing, for a host without a package index
driver / lint (pull_request) Successful in 15s
driver / standard (pull_request) Successful in 18s
driver / types (pull_request) Successful in 58s
driver / test (3.13) (pull_request) Successful in 1m2s
driver / test (3.12) (pull_request) Successful in 1m10s
driver / lowest (pull_request) Successful in 36s
driver / build (pull_request) Successful in 29s
driver / security (pull_request) Successful in 52s
CI / driver (pull_request) Successful in 2m12s
driver / publish (pull_request) Skipped
211d0c02eb
OpenWrt keeps its package index in RAM and loses it on every reboot.
get_available_updates() raises then, rightly, but only as a bare
RuntimeError, so a caller cannot tell it from a read that failed and
reports a communication error for a state a refresh cures.

PackageIndexMissing (a RuntimeError, so existing callers still catch it)
names that case; refresh_available_updates() is the way out.

Refs NetOrk/netork#2527
christianmanivong merged commit 3db6c6385c into main 2026-11-14 22:52:11 +00:00
christianmanivong deleted branch feat/package-index-missing 2026-11-14 22:52:11 +00:00
Sign in to join this conversation.