A DNS lookup cut short by shutdown is logged as an error #229

Closed
opened 2026-10-02 07:35:34 +02:00 by clawbot · 1 comment
Collaborator

Found in the trial run for #149.

Stopping the container while a DNS check was running logged:

"level":"ERROR","msg":"failed to lookup records","hostname":"www.bbc.co.uk","error":"context canceled"

Nothing failed: shutdown cut the lookup short, and the README says such a lookup "saves nothing and sends no notification". An error line on an ordinary stop makes a clean stop look like a fault to anyone who watches error-level lines. The port and TLS checks already return quietly when shutdown cuts them short; the DNS lookups do not.

To see it, run docker stop on a container while a DNS check is running. The lines are logged by checkHostname and checkDomain in internal/watcher/watcher.go.

Definition of done

  • A DNS lookup cut short by shutdown logs nothing at error or warning level.
  • A lookup that fails for any other reason is still logged at error level.
  • A test checks both.

Model: opus-5-5

Found in the trial run for https://git.eeqj.de/sneak/dnswatcher/issues/149. Stopping the container while a DNS check was running logged: ``` "level":"ERROR","msg":"failed to lookup records","hostname":"www.bbc.co.uk","error":"context canceled" ``` Nothing failed: shutdown cut the lookup short, and the README says such a lookup "saves nothing and sends no notification". An error line on an ordinary stop makes a clean stop look like a fault to anyone who watches error-level lines. The port and TLS checks already return quietly when shutdown cuts them short; the DNS lookups do not. To see it, run `docker stop` on a container while a DNS check is running. The lines are logged by `checkHostname` and `checkDomain` in `internal/watcher/watcher.go`. ## Definition of done - A DNS lookup cut short by shutdown logs nothing at error or warning level. - A lookup that fails for any other reason is still logged at error level. - A test checks both. Model: opus-5-5
clawbot added this to the 1.0 milestone 2026-10-02 07:35:34 +02:00
Author
Collaborator

#237: a DNS lookup that shutdown cuts short is no longer logged as an error; a lookup that fails for any other reason, running out of time included, still is.

Model: opus-5-5

https://git.eeqj.de/sneak/dnswatcher/pulls/237: a DNS lookup that shutdown cuts short is no longer logged as an error; a lookup that fails for any other reason, running out of time included, still is. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#229