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

stacklok / toolhive / 26125515811
66%

Build:
DEFAULT BRANCH: main
Ran 19 May 2026 09:15PM UTC
Jobs 1
Files 730
Run time 2min
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

19 May 2026 09:09PM UTC coverage: 65.474% (+0.007%) from 65.467%
26125515811

push

github

web-flow
fix(operator): inject THV_SESSION_REDIS_PASSWORD for MCPServer (#5286)

* fix(operator): inject THV_SESSION_REDIS_PASSWORD for MCPServer

MCPServer.spec.sessionStorage.passwordRef is accepted by the CRD
schema and the runner reads THV_SESSION_REDIS_PASSWORD from
pkg/transport/session/redis_config.go, but the operator never bridged
the two: populateScalingConfig in mcpserver_runconfig.go copies only
Address/DB/KeyPrefix into RunConfig, and no env var is added to the
proxy runner container. Result: any MCPServer that points its session
storage at a password-protected Redis fails on connect with
"NOAUTH Authentication required".

PR #4368 (which introduced the runconfig wiring) explicitly noted in
its summary that "the Redis password is intentionally excluded and
injected as a pod env var instead". The env-var injection landed for
VirtualMCPServer in #4215 / buildRedisPasswordEnvVar but the parallel
MCPServer change was never made.

This change closes that gap by mirroring the VirtualMCPServer pattern:

- Add buildMCPServerRedisPasswordEnvVar in mcpserver_controller.go
  which returns []corev1.EnvVar with a single SecretKeyRef-backed
  THV_SESSION_REDIS_PASSWORD entry when sessionStorage.provider ==
  "redis" and passwordRef is set; returns nil otherwise.
- Append the helper's output to the proxy container's env slice in
  the MCPServer reconciler, immediately before user-supplied
  resourceOverrides.proxyDeployment.env so user overrides can still
  win on name collisions.
- Add TestBuildMCPServerRedisPasswordEnvVar mirroring
  TestBuildRedisPasswordEnvVar for VirtualMCPServer (nil storage,
  memory provider, redis without passwordRef, redis with passwordRef).
- No CRD changes — the schema already supports passwordRef.

Tested:
- go build ./cmd/thv-operator/... succeeds
- go test ./cmd/thv-operator/controllers/ all green (3.7s)

* ci: retrigger after infrastructure-canceled run

The previous Tests / Test Go Code job (76080809592) was killed by
GitHub Act... (continued)

19 of 19 new or added lines in 1 file covered. (100.0%)

11 existing lines in 3 files now uncovered.

64621 of 98697 relevant lines covered (65.47%)

62.26 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
71.85
-1.11% pkg/ignore/processor.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 26125515811.1 19 May 2026 09:15PM UTC 730
65.47
GitHub Action Run
Source Files on build 26125515811
  • Tree
  • List 730
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26125515811
  • 6d81df82 on github
  • Prev Build on main (#26119203047)
  • Next Build on main (#26126536993)
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