Skip to content

fix: remove redundant transport middleware in Graphite client#778

Merged
sd2k merged 1 commit intomainfrom
fix/graphite-redundant-transport-middleware
Apr 23, 2026
Merged

fix: remove redundant transport middleware in Graphite client#778
sd2k merged 1 commit intomainfrom
fix/graphite-redundant-transport-middleware

Conversation

@sd2k
Copy link
Copy Markdown
Collaborator

@sd2k sd2k commented Apr 23, 2026

Summary

Test plan

  • go build ./... passes
  • go vet ./... passes

🤖 Generated with Claude Code


Note

Medium Risk
Touches outbound HTTP transport construction for Graphite queries; if mcpgrafana.BuildTransport doesn’t apply the same auth/org/user-agent behavior in all deployments, requests could fail or change routing, but the change is small and intended to fix a build break.

Overview
Removes redundant HTTP transport wrappers in the Graphite client (NewAuthRoundTripper, NewOrgIDRoundTripper, and NewUserAgentTransport) and relies solely on mcpgrafana.BuildTransport for those concerns.

Keeps the existing datasource fallback behavior by wrapping the built transport only with newDatasourceFallbackTransport, fixing compilation after the upstream transport refactor.

Reviewed by Cursor Bugbot for commit 6714878. Bugbot is set up for automated code reviews on this repo. Configure here.

The Graphite tools PR (#741) was based on code before the transport
refactor (#771) which consolidated middleware into BuildTransport().
This caused a compilation error due to the removed NewAuthRoundTripper
function, and also redundantly applied OrgID and UserAgent middleware
that BuildTransport() already handles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sd2k sd2k requested a review from a team as a code owner April 23, 2026 09:24
@github-actions github-actions Bot added the cla: yes Contributor License Agreement is signed label Apr 23, 2026
@github-actions
Copy link
Copy Markdown

MCP Token Analysis

Passed

Metric Value
Baseline 16572 tokens
Current 16572 tokens
Change +0 (+0.0%)

@sd2k sd2k merged commit 9c43d13 into main Apr 23, 2026
21 of 23 checks passed
@sd2k sd2k deleted the fix/graphite-redundant-transport-middleware branch April 23, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Contributor License Agreement is signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants