Fixed VirtualMCPCompositeToolDefinition printer columns output#5380
Open
Sanskarzz wants to merge 1 commit into
Open
Fixed VirtualMCPCompositeToolDefinition printer columns output#5380Sanskarzz wants to merge 1 commit into
Sanskarzz wants to merge 1 commit into
Conversation
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5380 +/- ##
==========================================
- Coverage 68.81% 68.71% -0.10%
==========================================
Files 627 628 +1
Lines 63594 63662 +68
==========================================
- Hits 43762 43746 -16
- Misses 16583 16661 +78
- Partials 3249 3255 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StepsandRefsprinter columns forVirtualMCPCompositeToolDefinition, which previously used JSONPath wildcards with integer column types and could not display useful counts inkubectl getoutput.status.stepCountandstatus.refCountscalar fields and updates the v1alpha1 and v1beta1 printer columns to read those values.VirtualMCPCompositeToolDefinitionreconciler that maintains step counts, referencingVirtualMCPServernames, and reference counts, including cleanup when references are removed.Fixes #4619
Type of change
Test plan
go test ./cmd/thv-operator/api/v1alpha1 ./cmd/thv-operator/api/v1beta1 ./cmd/thv-operator/controllers ./cmd/thv-operator/app -run 'TestVirtualMCPCompositeToolDefinitionReconciler_Reconcile|^$' -count=1)go vet ./cmd/thv-operator/api/v1alpha1 ./cmd/thv-operator/api/v1beta1 ./cmd/thv-operator/controllers ./cmd/thv-operator/app)task operator-generate,task operator-manifests,task crdref-gen)git diff --check)API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Changes
cmd/thv-operator/api/v1beta1/virtualmcpcompositetooldefinition_types.gocmd/thv-operator/api/v1alpha1/types.gocmd/thv-operator/controllers/virtualmcpcompositetooldefinition_controller.gocmd/thv-operator/controllers/virtualmcpcompositetooldefinition_controller_test.gocmd/thv-operator/app/app.goDoes this introduce a user-facing change?
Yes.
kubectl get virtualmcpcompositetooldefinitionsnow shows integer values for theStepsandRefscolumns instead of empty or malformed output from array wildcards.Special notes for reviewers
In the current CRD,
RefsrepresentsVirtualMCPServerresources that reference a composite workflow throughspec.config.compositeToolRefs. The reconciler preserves and maintains the existingstatus.referencingVirtualServersfield while exposing its count throughstatus.refCount.