fix(connections): remove leaked projectctx debug log - #8539
Merged
Conversation
resolveConnectionContext logged the resolved endpoint and source on every `azd ai connection` invocation via `log.Printf`. Because the extension never silenced Go's default logger, this surfaced as user-facing noise. Endpoint resolution is owned by `projectctx.Resolve`; any such diagnostic belongs in that package, not in the consuming caller. Remove the log line and the now-unused `log` import.
hund030
requested review from
JeffreyCA,
glharper,
therealjohn,
trangevi and
trrwilson
as code owners
June 5, 2026 05:20
Contributor
There was a problem hiding this comment.
Pull request overview
Removes an unintended user-visible diagnostic log emitted during azd ai connection <command> execution by deleting a log.Printf in resolveConnectionContext, keeping endpoint-resolution diagnostics inside the projectctx package rather than the consuming caller.
Changes:
- Removed
log.Printf("projectctx: resolved endpoint=... source=...")fromresolveConnectionContext. - Removed the now-unused
logimport fromconnection_context.go.
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
therealjohn
approved these changes
Jun 5, 2026
trangevi
approved these changes
Jun 5, 2026
trangevi
enabled auto-merge (squash)
June 5, 2026 15:47
Member
|
/check-enforcer override |
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.
Summary
azd ai connection <command>printed an internal diagnostic (projectctx: resolved endpoint=... source=...) on every invocation. The extension never silenced Go's default logger, so thislog.Printfsurfaced as user-facing noise.Changes
connection_context.go: Remove thelog.PrintffromresolveConnectionContext(and the now-unusedlogimport). Endpoint resolution is owned byprojectctx.Resolve; any such diagnostic belongs in that package, not in the consuming caller.