Log canceled challenge lookups at DEBUG - #9
Conversation
Follow-up of: #8 A big chunk of the noisy "looking up info for HTTP challenge" logs are "context canceled": https://onenr.io/0VjY3rN1qw0 So also log these as DEBUG, but only do so when both the lookup error and HTTP request context are canceled.
There was a problem hiding this comment.
Pull request overview
Adjusts HTTP challenge lookup logging to reduce noise by treating expected cancellation scenarios as DEBUG when both the storage lookup error and the request context indicate cancellation, aligning with prior work to de-noise challenge lookup logs.
Changes:
- Downgrade “looking up info for HTTP challenge” logs to DEBUG when both the lookup error and request context are
context.Canceled. - Extend unit tests to cover canceled-request vs canceled-storage behaviors and validate resulting log levels.
- Wrap distributed challenge token file load errors with
%wsoerrors.Is(..., context.Canceled)works through wrapping.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
httphandlers.go |
Logs canceled HTTP challenge lookups at DEBUG when both the storage error and request context are canceled. |
httphandlers_test.go |
Adds test cases ensuring canceled requests log at DEBUG while storage-only cancellations remain WARN. |
config.go |
Switches to %w wrapping for distributed token file open errors to preserve underlying error identity for errors.Is. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Good one, I also flagged it here: https://framer-team.slack.com/archives/C06505JMQK0/p1783883343394879?thread_ts=1741345255.812599&cid=C06505JMQK0 Will deploy this first, then if Matt is okay with it, will upstream it |
|
As per: https://github.com/framer/FramerDomainsServer/#upgrading-certmagic This needs to become a "fork revision" after merging: And a corresponding FDS PR to use that |
Follow-up of: #8
A big chunk of the noisy "looking up info for HTTP challenge" logs are "context canceled": https://onenr.io/0VjY3rN1qw0
So also log these as DEBUG, but only do so when both the lookup error and HTTP request context are canceled.