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
Fix __resource__ injection in resource_modules loader and add tests
salt.loader.resource_modules was missing "__resource__" from its pack,
so LazyLoader never created a NamedLoaderContext for it and modules like
sshresource_state raised NameError when accessing __resource__["id"].
Added the sentinel entry so the loader wires __resource__ to
resource_ctxvar — the per-thread contextvar set by _thread_return before
each resource job executes.
Added a regression test (test_resource_modules_packs_resource_dunder)
and a full suite of unit and integration tests covering T@ targeting,
wildcard augmentation, resource_ctxvar thread isolation, and the
_resolve_resource_targets dispatch path. Fixed lint issues across the new
test files (blacklisted unittest.mock imports, f-string without
interpolation, unused import, broad exception catch).
0 commit comments