refactor: replace (GVK, String) with KubeResourceId - #267
Merged
Conversation
drmorr0
force-pushed
the
drmorr/kube-resource-id
branch
from
August 17, 2026 16:44
9b67859 to
6280e4e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
+ Coverage 79.12% 79.33% +0.21%
==========================================
Files 61 61
Lines 3995 4002 +7
==========================================
+ Hits 3161 3175 +14
+ Misses 834 827 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
drmorr0
force-pushed
the
drmorr/kube-resource-id
branch
2 times, most recently
from
August 19, 2026 16:32
7f921b3 to
5938c61
Compare
drmorr0
force-pushed
the
drmorr/kube-resource-id
branch
from
August 20, 2026 17:07
5938c61 to
eb9cb4e
Compare
4 tasks
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.
Description and Rationale
(GVK, String)tuples with an actualKubeResourceIdstruct: in feat!: update to versioned exported trace format #157 we started tracking GVKs in addition to namespaced-names for all kubernetes resources. These were just getting passed around as tuple values, here we replace those tuples with an actual struct, and update our custom resource trait to allow us to easily get the resource_id for a particular object. This should hopefully clean up some of our code (of particular note, we no longer need theformat_gvk_namesince this is animpl Displayon theKubeResourceIdtype).How
SkResourceExttrait for allT: kubeResourcetypes in addition toDynamicObjects, which require looking up the GVK information at runtime instead of compile time. I had to do some ugly trait juggling inresource.rswith claude's help. Otherwise, it was just a lot of find/replacing.Test Steps
make testpasses; some of the mock test fixtures were missing type data that was previously specified directly in the tests, and now has to be computed from the fixture instead, so I fixed those.Other Notes
changes to
index.rsare more-or-less getting completely rewritten in the next PR in this stack, so i'm not that worried about performance or any other implications here.I added
GVK,KubeResourceId, andSkResourceExtto the sk-core prelude, since it seems like we're using these in alot of places.I'm hoping/expecting that things like
.spec()can get added toSkResourceExtso that we can get rid of thedyn_obj_spec/dyn_obj_spec_mutfunctions ink8s/util.rs.I certify that this PR does not contain any code that has been generated with GitHub Copilot or any other AI-based code generation tool, in accordance with this project's policies.