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

stacklok / toolhive / 18715236732
58%

Build:
DEFAULT BRANCH: main
Ran 22 Oct 2025 11:57AM UTC
Jobs 1
Files 292
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

22 Oct 2025 11:52AM UTC coverage: 46.595% (-1.2%) from 47.776%
18715236732

push

github

web-flow
Refactor: Extract common controller helpers to dedicated package (#2283)

Extract common helpers to dedicated package

Move ~900 lines of shared helper code from controllers/common_helpers.go
and controllers/config_helpers.go into a new dedicated package at
cmd/thv-operator/pkg/controllerutil/.

The new package organizes utilities by domain:
- platform.go: Platform detection (Kubernetes vs OpenShift)
- rbac.go: RBAC resource management helpers
- resources.go: Resource builders and metadata utilities
- authz.go: Cedar authorization configuration
- oidc.go: OIDC authentication configuration
- tokenexchange.go: OAuth2 token exchange middleware
- config.go: Configuration tracking and hashing

This refactoring:
- Improves code organization and reusability
- Sets foundation for Phase 2 of generic reconciler pattern
- Maintains 100% functional equivalence (no behavior changes)
- Updates all imports to use ctrlutil alias
- Exports previously private constants (defaultAuthzKey -> DefaultAuthzKey)
- Moves tests to new package location

All existing tests pass and linter reports 0 issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

49 of 614 new or added lines in 15 files covered. (7.98%)

3 existing lines in 2 files now uncovered.

18232 of 39129 relevant lines covered (46.59%)

15.67 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
0.0
0.0% cmd/thv-operator/main.go
3
90.7
0.0% cmd/thv-operator/controllers/mcpremoteproxy_deployment.go
7
63.29
-0.39% cmd/thv-operator/controllers/mcpremoteproxy_controller.go
23
54.66
-0.27% cmd/thv-operator/controllers/mcpserver_controller.go
24
0.0
cmd/thv-operator/pkg/controllerutil/oidc.go
28
0.0
cmd/thv-operator/pkg/controllerutil/rbac.go
32
0.0
cmd/thv-operator/pkg/controllerutil/platform.go
39
36.92
cmd/thv-operator/pkg/controllerutil/config.go
105
0.0
cmd/thv-operator/pkg/controllerutil/resources.go
118
0.0
cmd/thv-operator/pkg/controllerutil/tokenexchange.go
184
0.0
cmd/thv-operator/pkg/controllerutil/authz.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
63.29
-0.39% cmd/thv-operator/controllers/mcpremoteproxy_controller.go
2
54.66
-0.27% cmd/thv-operator/controllers/mcpserver_controller.go
Jobs
ID Job ID Ran Files Coverage
1 18715236732.1 22 Oct 2025 11:57AM UTC 292
46.59
GitHub Action Run
Source Files on build 18715236732
  • Tree
  • List 292
  • Changed 9
  • Source Changed 8
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18715236732
  • 9f5a7e75 on github
  • Prev Build on main (#18714390838)
  • Next Build on main (#18723528552)
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