Skip to content

fix: logging when proxyless method fails to start#36

Merged
WendelHime merged 5 commits into
mainfrom
fix/log-when-proxyless-fails
May 29, 2026
Merged

fix: logging when proxyless method fails to start#36
WendelHime merged 5 commits into
mainfrom
fix/log-when-proxyless-fails

Conversation

@WendelHime
Copy link
Copy Markdown
Contributor

@WendelHime WendelHime commented May 27, 2026

Previously, if any deferred option (notably WithProxyless's smart-dialer construction) failed to initialize, NewKindling would return an error and refuse to start — even when other transports were configured and working.

This changes NewKindling to:

  • Log each deferred initialization failure as a warning rather than aborting.
  • Continue starting Kindling as long as at least one transport remains configured.
  • Return an error only when deferred failures leave Kindling with zero usable transports (errors joined via errors.Join), so callers get a clear init-time failure instead of a confusing "no eligible transports for request" error later at request time.

The NewKindling doc comment is updated to describe this behavior.

Currently if any of the methods fail to start it won't initialize kindling correctly
Copilot AI review requested due to automatic review settings May 27, 2026 20:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts Kindling initialization so that a failure to start the proxyless (smart dialer) path doesn’t necessarily prevent Kindling from being created when other transports are available.

Changes:

  • Log a warning (instead of returning an error) when deferred proxyless initialization fails.
  • Minor formatting alignment in http.Transport literals.

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

Comment thread kindling.go
WendelHime and others added 4 commits May 27, 2026 17:46
Address PR review: previously NewKindling always swallowed deferred
option errors (WithProxyless smart-dialer construction), so it could
return success with zero transports and surface a confusing "no
eligible transports" error at request time. Now we log each deferred
failure as a warning but return an error if no transports are left.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cover the two branches of the new NewKindling logic: a failed proxyless
probe degrades to surviving transports, and a failed probe with no other
transport surfaces an error at construction time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@WendelHime WendelHime merged commit 21f8b14 into main May 29, 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