watcher: a lookup cut short by shutdown is not logged as an error (closes #229)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Stopping dnswatcher during a DNS check logged every lookup the stop cut short as an error, "context canceled". The four places in the watcher that log a failed lookup now do it through logFailedLookup, which logs nothing when the watcher's context was cancelled; the port and TLS checks already return quietly. It asks the context, not the lookup's error, because the resolver reports a cancelled lookup with its own error, which does not wrap context.Canceled. A context whose deadline passed is not cancelled, so a lookup that ran out of time is still logged as an error. The tests run a check on a cancelled context and on one whose deadline passed; neither sends a query. Model: opus-5-5
This commit is contained in:
@@ -19,6 +19,8 @@ trial run of the finished image: https://git.eeqj.de/sneak/dnswatcher/issues/149
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-02: a DNS lookup that shutdown cuts short logs no error; one that
|
||||
fails otherwise, or runs out of time, still does (closes #229).
|
||||
- 2026-10-02: a resolver test that reads one record type from a nameserver's
|
||||
answer asks again when that type is missing from it (closes #218).
|
||||
- 2026-10-02: a plain `docker build .` of a clone stamps its tag or short
|
||||
|
||||
Reference in New Issue
Block a user