[API] generate a typed client for AcceleratorClass - #688
Merged
Conversation
|
Please run the following locally and commit the fixes: pre-commit run --all-files
git add -u && git commitSee CONTRIBUTING.md for setup instructions. |
pallasathena92
force-pushed
the
yifeliu/fix-ac-client
branch
from
July 31, 2026 18:28
0300422 to
6f61833
Compare
beiguo218
approved these changes
Aug 3, 2026
slin1237
approved these changes
Aug 3, 2026
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.
What this PR does
AcceleratorClass was missing the +genclient marker, so client-gen never produced a typed client, lister, or informer for it — the only one of the eight root API types affected.
Why we need it
The consequence was visible in the generated tree — pkg/client/clientset/versioned/typed/ome/v1beta1/ had a file for all seven other types and none for AcceleratorClass. Consumers had to fall back to the dynamic client or controller-runtime.
What Changes
AcceleratorClass is
cluster-scoped, so+genclientalone would generate a namespaced client — it would compile fine and then fail at runtime against a cluster-scoped resource. so add+genclient:nonNamespacedas wellTwo incidental tidy-ups:
scope=Cluster→scope="Cluster"to match the other cluster-scoped types.Fixes #
How to test
Checklist
make testpasses locally