• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 22991328127
64%

Build:
DEFAULT BRANCH: main
Ran 12 Mar 2026 07:36AM UTC
Jobs 1
Files 552
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Mar 2026 07:33AM UTC coverage: 64.269% (+0.1%) from 64.127%
22991328127

push

github

web-flow
Add ClusterIP service with SessionAffinity for MCP server backend (#3992)

* Add ClusterIP service with SessionAffinity for MCP server backend

The proxy-runner connects to MCP server pods through a headless service
which bypasses kube-proxy and provides no load balancing or session
affinity. If the StatefulSet scales beyond 1 replica, sessions break
because requests may hit different pods.

Add a new regular ClusterIP service (mcp-<name>) with SessionAffinity:
ClientIP alongside the existing headless service. The proxy-runner now
uses this new service as its target host, getting proper load balancing
with session stickiness. The headless service is retained for DNS
discovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Address review feedback for MCP service session affinity

- Extract shared applyService helper to reduce duplication between
  createHeadlessService and createMCPService
- Add explicit SessionAffinityConfig.ClientIP.TimeoutSeconds (1800s)
  instead of relying on Kubernetes 3h default
- Rename SSEHeadlessServiceName to MCPServiceName across types, setup,
  and client packages
- Rename transportTypeRequiresHeadlessService to
  transportTypeRequiresBackendServices
- Extract deleteIfExists helper in operator finalizer, removing
  nolint:gocyclo
- Fix headless+NodePort conflict: skip NodePort type promotion for
  headless services (Kubernetes rejects clusterIP=None + type=NodePort)
- Use slog.Debug instead of slog.Info for service creation success paths
- Add spec.type and sessionAffinityConfig assertions to e2e tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add owner references on backend services and unit tests

Set the StatefulSet as owner of both the headless and MCP ClusterIP
services so Kubernetes garbage-collects them when the StatefulSet is
deleted. This closes the resource leak gap flagged in review.

Add table-driven unit test covering both SSE and streamable-http
transports, verifyi... (continued)

70 of 101 new or added lines in 3 files covered. (69.31%)

17 existing lines in 8 files now uncovered.

48382 of 75281 relevant lines covered (64.27%)

72.23 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
7.79
0.0% pkg/runtime/setup.go
10
45.48
12.78% pkg/container/kubernetes/client.go
18
55.83
0.53% cmd/thv-operator/controllers/mcpserver_controller.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
45.48
12.78% pkg/container/kubernetes/client.go
1
7.79
0.0% pkg/runtime/setup.go
2
79.79
-0.52% pkg/transport/proxy/httpsse/http_proxy.go
2
57.89
-3.51% pkg/transport/session/sse_session.go
2
82.83
-0.26% pkg/vmcp/composer/workflow_engine.go
2
71.43
-1.68% pkg/vmcp/k8s/manager.go
3
55.83
0.53% cmd/thv-operator/controllers/mcpserver_controller.go
4
80.53
-0.88% pkg/transport/proxy/transparent/transparent_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 22991328127.1 12 Mar 2026 07:36AM UTC 552
64.27
GitHub Action Run
Source Files on build 22991328127
  • Tree
  • List 552
  • Changed 12
  • Source Changed 4
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22991328127
  • cf8b6fa8 on github
  • Prev Build on main (#22991010155)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc