Skip to content

Log canceled challenge lookups at DEBUG#10

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

Log canceled challenge lookups at DEBUG#10
danillouz merged 1 commit into
masterfrom
fix/canceled-challenge-lookup

Conversation

@danillouz

Copy link
Copy Markdown
Member

Coffee hasn't kicked in yet, and I merged #9 into the wrong branch (it didn't auto update!?)

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.

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 13, 2026 09:11
@danillouz danillouz self-assigned this Jul 13, 2026

@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.

Still looking good.

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 WARN noise by treating expected cancellations as DEBUG, aligning operational logs with real-actionability in CertMagic’s ACME HTTP-01 handling.

Changes:

  • Downgrade “looking up info for HTTP challenge” logs to DEBUG when both the lookup error and the request context are context.Canceled.
  • Extend logging tests to cover request-canceled vs storage-canceled scenarios.
  • Improve error wrapping in distributed challenge token loading by using %w for proper unwrapping.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
httphandlers.go Logs canceled challenge lookups at DEBUG only when both lookup and request contexts are canceled.
httphandlers_test.go Adds test coverage to assert log levels for canceled-request vs canceled-storage cases.
config.go Wraps distributed token file open errors with %w to preserve cause for errors.Is/unwrapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@danillouz danillouz merged commit 9510322 into master Jul 13, 2026
8 checks 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