Skip to content

Conversation

@yrobla
Copy link
Contributor

@yrobla yrobla commented Nov 28, 2025

It is not currently used and adds complexity

@github-actions github-actions bot added the size/L Large PR: 600-999 lines changed label Nov 28, 2025
It is not currently used and adds complexity
@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.46%. Comparing base (c73c5ef) to head (7e77f38).
⚠️ Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yrobla yrobla force-pushed the fix/remove_token_cache_config branch from 517346a to 7e77f38 Compare November 28, 2025 16:33
@github-actions github-actions bot added size/L Large PR: 600-999 lines changed and removed size/L Large PR: 600-999 lines changed labels Nov 28, 2025
@yrobla yrobla requested review from JAORMX, Copilot and jhrozek November 28, 2025 16:35
Copilot finished reviewing on behalf of yrobla November 28, 2025 16:38
Copy link
Contributor

Copilot AI left a 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.

@yrobla yrobla merged commit 59e4399 into main Nov 28, 2025
42 checks passed
@yrobla yrobla deleted the fix/remove_token_cache_config branch November 28, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Large PR: 600-999 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants