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
{{ message }}
Repository navigation
--schema/NSC_SCHEMA override is cached as the profile's fresh schema and leaks into later runs #196
The override path in resolve_command_model (nsc/schema/source.py) runs _build_and_cache(loaded, paths, profile). That function saves the override's command model into the active profile's cache with record_fetch=True, which stamps a fresh fetched_at sidecar. Later runs without--schema then pick that model up as if it were the real NetBox schema:
TTL fast-path (default schema_refresh: daily, also weekly/manual): for the rest of the TTL window, the override schema is served with no fetch and no warning, even when NetBox is reachable.
Offline fallback (any policy):_find_any_cached picks the newest entry by mtime, so an unreachable NetBox serves the override schema ("using cached schema").
This matters more now that NSC_SCHEMA is honored as an override (#192), since an exported env var hits this on every run.
Repro (widgets.json = minimal schema with only /api/dcim/widgets/; NetBox unreachable at http://127.0.0.1:1):
Activity
thomaschristory commentedon Oct 24, 2026
Claiming: keep override models out of the profile's cache. Branch: fix/schema-override-cache-leak.
thomaschristory commentedon Oct 24, 2026
PR opened: #197
fix(schema): keep --schema/NSC_SCHEMA overrides out of the profile ca…
thomaschristory commentedon Oct 24, 2026
Fixed by #197 (merged). Shipping in v1.8.6.