References printcolumn shows raw JSON instead of useful summary#5267
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5267 +/- ##
==========================================
+ Coverage 68.39% 68.40% +0.01%
==========================================
Files 619 620 +1
Lines 63318 63354 +36
==========================================
+ Hits 43305 43340 +35
+ Misses 16782 16776 -6
- Partials 3231 3238 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a07d2c2 to
22a8a5c
Compare
amirejaz
left a comment
There was a problem hiding this comment.
Thanks for the contribution! The overall approach is solid — storing a derived referenceCount integer on the status and pointing the printer column at it is exactly the right fix for the raw-JSON display problem. The code is well-structured, tests are thorough, and the CRD manifests and docs are all regenerated consistently.
I have a couple of observations worth discussing, mostly around the stale-count repair path that was added to the three updateOIDCConfigReferencingWorkloads functions.
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
2d150d2 to
b52eafd
Compare
Summary
kubectl getoutput for MCPExternalAuthConfig, MCPOIDCConfig, and MCPToolConfig renderedReferencesas raw JSON because the printer column pointed at.status.referencingWorkloads, which is an array of workload reference objects.status.referenceCountfield to those resources and updated theReferencesprinter column to show the integer count instead.referenceCountin sync wheneverreferencingWorkloadschanges.Fixes #4618
Type of change
Test plan
task test)task test-e2e)task lint-fix)API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.This adds an optional status field, referenceCount, and keeps the existing referencingWorkloads field unchanged.
Changes
Does this introduce a user-facing change?
Yes. kubectl get now shows the References column as a count instead of raw JSON for MCPExternalAuthConfig, MCPOIDCConfig, and MCPToolConfig.
Special notes for reviewers
The detailed workload references are still available in .status.referencingWorkloads; this only changes the default table output to use .status.referenceCount.