Skip to content

Log canceled challenge lookups at DEBUG - #9

Merged
danillouz merged 1 commit into
fix/acme-challenge-log-noisefrom
fix/canceled-challenge-lookup
Jul 13, 2026
Merged

Log canceled challenge lookups at DEBUG#9
danillouz merged 1 commit into
fix/acme-challenge-log-noisefrom
fix/canceled-challenge-lookup

Conversation

@danillouz

Copy link
Copy Markdown
Member

Follow-up of: #8

A big chunk of the noisy "looking up info for HTTP challenge" logs are "context canceled": https://onenr.io/0VjY3rN1qw0

image

So also log these as DEBUG, but only do so when both the lookup error and HTTP request context are canceled.

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.
Copilot AI review requested due to automatic review settings July 12, 2026 18:44
@danillouz danillouz self-assigned this Jul 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 %w so errors.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.

@ankon ankon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, same as with #8: This should be upstreamed (make a PR against caddy/certmagic), and then link these.

This will make future updates easier.

@danillouz

Copy link
Copy Markdown
Member Author

LGTM, same as with #8: This should be upstreamed (make a PR against caddy/certmagic), and then link these.

This will make future updates easier.

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

@danillouz

Copy link
Copy Markdown
Member Author

As per: https://github.com/framer/FramerDomainsServer/#upgrading-certmagic

This needs to become a "fork revision" after merging: v0.25.3-framer.2

And a corresponding FDS PR to use that

@danillouz
danillouz merged commit 328aff4 into fix/acme-challenge-log-noise Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants