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

stacklok / toolhive / 26576164699
66%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 01:04PM UTC
Jobs 1
Files 739
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

28 May 2026 12:59PM UTC coverage: 65.985% (+0.1%) from 65.883%
26576164699

push

github

web-flow
Add StorageVersionMigrator controller (opt-in, default off) (#5362)

* Add StorageVersionMigrator controller (opt-in, default off)

Adds a StorageVersionMigrator controller to the operator behind a
default-off feature flag (ENABLE_STORAGE_VERSION_MIGRATOR). The
controller reconciles status.storedVersions on opted-in
toolhive.stacklok.dev CRDs by issuing a Get+Update against each CR,
which re-encodes etcd objects to the current storage version. This
is required before a future release can drop a deprecated apiVersion
(e.g. v1alpha1) from spec.versions without orphaning rows.

The flag defaults to false, so this PR has no functional impact for
any user until they explicitly opt in via operator.env. Helm chart
exposure (values.yaml flag entry and deployment env-var wiring) is
deferred to a follow-up PR to reduce accidental enablement during
the deprecation window.

RBAC for the controller's verbs ships in this PR so the flag can be
flipped on at any time without permission-denied errors. Opt-in
label markers on the 12 v1beta1 root types and the marker-coverage
CI test are deferred to a follow-up PR; the envtest suite creates
its own CRDs at runtime and is independent of those changes.

Part of #4969.

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

* Address PR review feedback

- F1: fix doc comment claiming "Enabled by default" — the controller is
  default-off in this release, opt-in via env var only; chart surface
  lands in a follow-up PR
- F2: fail loudly on unparsable env-var value instead of silently
  defaulting to disabled (per go-style "Fail Loudly")
- F6: document why patchStoredVersions cannot use the operator-wide
  MutateAndPatchStatus helper (CRD storedVersions is co-owned with
  kube-apiserver, optimistic lock is load-bearing)
- F7: demote disabled-state log from INFO to V(1) (silent success)
- F8: prefix env var with TOOLHIVE_ to match sibling operator env vars
  and avoid cross-operator collisions
- Codespell: unpa... (continued)

195 of 304 new or added lines in 2 files covered. (64.14%)

587 existing lines in 8 files now uncovered.

65709 of 99582 relevant lines covered (65.98%)

64.43 hits per line

Uncovered Changes

Lines Coverage ∆ File
88
67.41
cmd/thv-operator/controllers/storageversionmigrator_controller.go
21
6.81
6.81% cmd/thv-operator/app/app.go

Coverage Regressions

Lines Coverage ∆ File
314
68.56
0.71% cmd/thv-operator/controllers/mcpserver_controller.go
217
49.23
0.0% pkg/container/kubernetes/client.go
38
55.92
55.92% cmd/thv-proxyrunner/app/run.go
9
22.99
-0.57% pkg/client/manager.go
3
70.0
-3.33% pkg/state/local.go
2
93.94
-6.06% pkg/foreach/foreach.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
2
56.68
-0.18% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 26576164699.1 28 May 2026 01:04PM UTC 739
65.98
GitHub Action Run
Source Files on build 26576164699
  • Tree
  • List 739
  • Changed 12
  • Source Changed 4
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26576164699
  • 8932f938 on github
  • Prev Build on main (#26563713844)
  • Next Build on main (#26576157773)
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