-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
apimachinery: remove pre-apigroups import path logic #15727
Conversation
3d2ff84
to
e7adf08
Compare
pkg/api/meta/install.go
Outdated
@@ -0,0 +1,88 @@ | |||
package meta |
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.
pkg/api/legacy
?
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.
Sure, didn't know where to put it.
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.
fixed
pkg/api/meta/install.go
Outdated
if err := addToCore(scheme); err != nil { | ||
glog.Fatal(err) | ||
} | ||
if err := addToCoreV1(kapi.Scheme); err != nil { |
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.
Why is this scheme hardcoded?
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.
it shouldn't
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.
fixed
pkg/api/meta/install.go
Outdated
func InstallLegacy(group string, addToCore, addToCoreV1 func(*runtime.Scheme) error, groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { | ||
groupMetaFactory, found := groupFactoryRegistry[group] | ||
if !found { | ||
glog.Fatalf("Group %q not found", group) |
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.
we normally panic, right?
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.
do we? will change that.
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.
fixed
Minor comments. After they are fixed up, this lgtm |
/approve |
Most types now have valid rest mappings because NewDefaultRESTMapperFromScheme no longer ignores certain import paths. Thus we can no longer use the lack of a valid REST mapping as an indicator for when to use kindWhiteList. Thus kindWhiteList now serves as a whitelist for all kinds and not just those that formally had no mapping. This does mean that we could whitelist kinds due to a name conflict, but that is unlikely as names such as GetOptions are not appropriate for new objects.
e7adf08
to
e999fe4
Compare
At the same time we get rid of the need for Store.ImportPrefix to filter the RESTMapper for each legacy group. Before this commit we had overlapping RESTMapper, even inconsistent ones because the root kinds were wrong outside of each legacy group.
e999fe4
to
abee9c6
Compare
/lgtm |
/test all |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, sttts The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@sttts I happened to be near here again today. this is on my wishlist. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@sttts consistently failing test-cmd |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
I opened #15955 to fix the compile error and it hit a serialization change in |
/retest Please review the full test history for this PR and help us cut down flakes. |
14 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@sttts: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@sttts PR needs rebase |
Automatic merge from submit-queue import prefix adds a fix for TSB from #15727
No description provided.