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

stacklok / toolhive / 22759908352
64%

Build:
DEFAULT BRANCH: main
Ran 06 Mar 2026 10:50AM UTC
Jobs 1
Files 537
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

06 Mar 2026 10:41AM UTC coverage: 63.867% (+0.001%) from 63.866%
22759908352

push

github

web-flow
Fix infinite reconciliation caused by PodTemplateSpec JSON comparison (#4012)

* Fix infinite reconciliation caused by PodTemplateSpec JSON comparison

When a VirtualMCPServer has a PodTemplateSpec, podTemplateSpecNeedsUpdate
compared the full JSON of the freshly-generated deployment template against
the cluster deployment template. These always differed because Kubernetes
API server adds defaulted fields (terminationGracePeriodSeconds, dnsPolicy,
restartPolicy, schedulerName, etc.) to the stored Deployment that are not
present in the controller-generated template. This caused every reconcile
to detect the deployment "needs update", update it, which triggered another
reconcile — an infinite loop.

Replace the JSON comparison with a SHA256 hash annotation approach:
- Store a hash of the raw PodTemplateSpec on the Deployment annotation
- Compare only the hash to detect actual user changes
- Handle edge cases: PodTemplateSpec added, removed, nil annotations

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

* Use deterministic JSON hashing for PodTemplateSpec annotation

Add HashRawJSON to the checksum package that unmarshals and re-marshals
JSON before hashing, ensuring consistent key ordering regardless of the
original serialization order. Replace direct sha256.Sum256 calls on raw
JSON bytes in the controller and deployment code with this new utility.

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

* Add log in failed to hash error

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

21 of 25 new or added lines in 3 files covered. (84.0%)

5 existing lines in 2 files now uncovered.

47064 of 73691 relevant lines covered (63.87%)

74.97 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
69.49
0.18% cmd/thv-operator/controllers/virtualmcpserver_controller.go
2
79.17
0.34% cmd/thv-operator/pkg/runconfig/configmap/checksum/checksum.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
82.83
-0.26% pkg/vmcp/composer/workflow_engine.go
3
59.05
-0.19% cmd/thv-operator/controllers/virtualmcpserver_deployment.go
Jobs
ID Job ID Ran Files Coverage
1 22759908352.1 06 Mar 2026 10:50AM UTC 537
63.87
GitHub Action Run
Source Files on build 22759908352
  • Tree
  • List 537
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22759908352
  • f0f55c15 on github
  • Prev Build on main (#22757984620)
  • Next Build on main (#22760380047)
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