-
Notifications
You must be signed in to change notification settings - Fork 115
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
fix: properly determine list objects in schemagen #3205
Conversation
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.
Deja vu :P
Does the PR have any schema changes?Looking good! No breaking changes found. |
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.
Is it feasible to test this?
Yes, I'll add to this PR next week! |
08cb054
to
cc6ef93
Compare
cc6ef93
to
d33c9ff
Compare
@@ -693,6 +705,14 @@ func createGroups(definitionsJSON map[string]any, allowHyphens bool) []GroupConf | |||
|
|||
return fmt.Sprintf("%s/%s", gStripped, v) | |||
} | |||
|
|||
// These resources are hard-coded as lists as they do not adhere to the normal conventions. |
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.
The list is nested under the resources
and groups
field instead of items
for these two kinds.
|
||
-- kinds -- | ||
- k8sversion.test.TestResource | ||
- k8sversion.test.TestResourceNotRealList |
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.
A custom resource that ends in List
, but is not a List kind.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3205 +/- ##
==========================================
+ Coverage 38.60% 40.84% +2.23%
==========================================
Files 84 84
Lines 9866 9876 +10
==========================================
+ Hits 3809 4034 +225
+ Misses 5695 5459 -236
- Partials 362 383 +21 ☔ View full report in Codecov by Sentry. |
CRDs can have types that end in
List
. These are not actually List resources, so we should not rely on name alone to determine this. Instead, we should follow the rules set out in the conventions guide to determine is a Kind is meant to be a List kind.