-
Notifications
You must be signed in to change notification settings - Fork 149
fix: remove tokencache from vmcp #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It is not currently used and adds complexity
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2799 +/- ##
==========================================
- Coverage 56.48% 56.46% -0.02%
==========================================
Files 319 319
Lines 30943 30843 -100
==========================================
- Hits 17479 17417 -62
+ Misses 11960 11932 -28
+ Partials 1504 1494 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
517346a to
7e77f38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR removes unused token cache functionality from the Virtual MCP (vmcp) component to reduce complexity. The token cache feature, which supported both in-memory and Redis-based caching of exchanged authentication tokens, was not currently utilized in production and added unnecessary configuration overhead.
Key changes:
- Removed all token cache configuration types, constants, and logic from vmcp config package
- Removed token cache field from Kubernetes CRD VirtualMCPServerSpec
- Cleaned up all associated tests, validation, and conversion logic
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/vmcp/config/config.go | Removed TokenCacheConfig, MemoryCacheConfig, RedisCacheConfig types and CacheProvider constants |
| pkg/vmcp/config/yaml_loader.go | Removed rawTokenCache struct and transformTokenCache method |
| pkg/vmcp/config/yaml_loader_test.go | Removed test cases for token cache configuration parsing |
| pkg/vmcp/config/yaml_loader_transform_test.go | Removed TestYAMLLoader_transformTokenCache test |
| pkg/vmcp/config/validator.go | Removed validateTokenCache validation logic |
| pkg/vmcp/config/validator_test.go | Removed TestValidator_ValidateTokenCache test |
| cmd/vmcp/app/commands.go | Removed token cache display logic from config validation command |
| cmd/thv-operator/api/v1alpha1/virtualmcpserver_types.go | Removed TokenCache field and related types from CRD spec |
| cmd/thv-operator/api/v1alpha1/virtualmcpserver_webhook.go | Removed validateTokenCache webhook validation |
| cmd/thv-operator/api/v1alpha1/virtualmcpserver_webhook_test.go | Removed token cache validation test cases |
| cmd/thv-operator/api/v1alpha1/virtualmcpserver_types_test.go | Removed token cache default value assertions |
| cmd/thv-operator/api/v1alpha1/zz_generated.deepcopy.go | Removed generated DeepCopy methods for token cache types |
| cmd/thv-operator/pkg/vmcpconfig/converter.go | Removed convertTokenCache conversion logic |
| cmd/thv-operator/controllers/virtualmcpserver_deployment.go | Removed Redis password secret validation and updated comments |
| cmd/thv-operator/controllers/virtualmcpserver_controller_test.go | Removed Redis token cache test scenarios |
| deploy/charts/operator-crds/crds/toolhive.stacklok.dev_virtualmcpservers.yaml | Removed tokenCache field from CRD OpenAPI schema |
| deploy/charts/operator-crds/Chart.yaml | Bumped chart version from 0.0.69 to 0.0.70 |
| deploy/charts/operator-crds/README.md | Updated version badge to 0.0.70 |
| docs/operator/crd-api.md | Removed MemoryCacheConfig, RedisCacheConfig, and TokenCacheConfig documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
It is not currently used and adds complexity