Log canceled challenge lookups at DEBUG#10
Merged
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 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
%wfor 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.