## Summary - Replace guard-clause-based `should_skip_snmp/service/ping_check?` with a single `should_skip_check?` function using runtime `in` operator checks - Guard clauses with module attributes (`@service_check_types`) were not working in Dokku buildpack deployments despite code being correct locally - Also update `CheckWorker` (dead code safety net) to check `device_has_effective_agent?` - Use `Logger.info` for skip messages so they appear in staging logs ## Context PR #77 introduced `device_has_effective_agent?/1` and updated all workers, but the guard-clause-based skip functions in `CheckExecutorWorker` weren't matching at runtime on staging despite passing all tests locally. The DNS check kept producing NXDOMAIN errors from Erlang's `:inet_res` resolver. Root cause: The `when check_type in @service_check_types` guard clause compiled against module attributes appears to have stale evaluation in the Dokku Heroku buildpack release. Moving the check to a runtime function body fixes the issue. ## Test plan - [x] All 230 worker tests pass - [x] All 99 agents tests pass - [x] Verified on staging: "Skipping check eceb3d51... (dns)" appears in info logs - [x] No new NXDOMAIN results created after deploy Reviewed-on: graham/towerops-web#78 |
||
|---|---|---|
| .. | ||
| mix/tasks | ||
| snmpkit | ||
| towerops | ||
| towerops_web | ||
| snmp_lib.ex | ||
| snmp_mgr.ex | ||
| snmpkit.ex | ||
| towerops.ex | ||
| towerops_native.ex | ||
| towerops_web.ex | ||