You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update image validation for MCPRegistry phase rename #4510
The image validation logic at cmd/thv-operator/pkg/validation/image_validation.go:201 checks whether an MCPRegistry is in the Ready phase before using it for image validation:
After #4269 lands, MCPRegistryPhaseReady no longer exists — it becomes MCPRegistryPhaseRunning to match the MCPServer pattern. This is production code that gates whether MCPServers with enforceServers: true can validate images against registries.
Implementation Notes
Files:
cmd/thv-operator/pkg/validation/image_validation.go — update phase check from MCPRegistryPhaseReady to MCPRegistryPhaseRunning
cmd/thv-operator/pkg/validation/image_validation_test.go — update all test cases that reference MCPRegistryPhaseReady (25+ cases)
The change is mechanical (find-and-replace the phase constant) but the test suite is large and should be verified carefully since this is a security-relevant code path (image validation enforcement).
Testing
All existing image_validation_test.go tests pass with the renamed phase constant
task test passes
Acceptance Criteria
MCPRegistryPhaseReady replaced with MCPRegistryPhaseRunning in image_validation.go
All test cases in image_validation_test.go updated
No references to MCPRegistryPhaseReady remain in pkg/validation/
Activity
Consolidate MCPRegistry status to match MCPServer pattern
Consolidate MCPRegistry status to match MCPServer pattern (stacklok#4643