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

stacklok / toolhive / 24835773264

23 Apr 2026 12:40PM UTC coverage: 66.327% (+0.003%) from 66.324%
24835773264

push

github

web-flow
Gate proxyrunner StatefulSet apply by MCPServer generation (#5024)

Guard proxyrunner StatefulSet apply with a generation gate

During a proxy Deployment rolling update the old and new ReplicaSet
pods both run DeployWorkload, each calling server-side apply on the
backing StatefulSet with the same field manager and Force: true. The
stale pod's apply can land after the fresh pod's and clobber the
image, leaving the StatefulSet pinned to the old digest even after
MCPServer.spec.image has been bumped.

The operator now stamps MCPServer.metadata.generation into the
RunConfig as a monotonic version. Proxyrunner threads it through to
DeployWorkloadOptions. Before apply, the K8s runtime reads the
existing StatefulSet's mcpserver-generation annotation; if it is
strictly greater than ours, the apply is skipped. Otherwise our
generation is stamped on the pod template and apply proceeds.

Zero generation is the backward-compat signal and bypasses both the
gate and the stamp, preserving existing behavior for callers that
don't pass one.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Yolanda Robla Mota <yolanda@stacklok.com>

68 of 78 new or added lines in 5 files covered. (87.18%)

11 existing lines in 3 files now uncovered.

58895 of 88795 relevant lines covered (66.33%)

60.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.38
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

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