-
Notifications
You must be signed in to change notification settings - Fork 98
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
Move embedded API types to common/v1 #230
Conversation
Thanks @hasheddan! Do you think it's worth keeping the |
Also - a naming nit - should we consider |
@negz feels like the closest thing in upstream kubernetes would be |
That does seem close (i.e. its a versioned package of types that aren't in and of themselves first class API objects), but in this case our types are fairly all over the show - not really strictly related to metadata. That said, the precedent of the I'm tempted to bikeshed the package name a little bit here. We tend to import it as
I may not be following correctly, but if you're suggesting that keeping the v1alpha1 types here means we'd have to do the same elsewhere I don't think that's the case. That said I'm not bullish on duplicating rather than copying. Folks would still have to update their code eventually - the former option just gives them a little extra notice. |
I don't necessarily think the fact that they are versioned upstream means that they have to be versioned here. Our use case is a bit different in that the consumers of our embedded types are also typically consuming other packages in
I am not sure how useful it would be to just keep the |
I'm not sure whether Regarding versioning, I think keeping the version would help us to use the same names for the structs when we make a change since the new one and deprecated one wouldn't have to live in the same package. I feel kind of indifferent about whether that's worth to keep the version. I'm OK either way with slight preference of keeping the versions just because kubernetes does. |
@negz any follow-up thoughts here? I am good with either |
I agree that To me
I continue to mostly prefer Edit: In retrospect it could be fine to go with a mixed approach in which the package is |
Moves the core embedded API types out of the core/v1alpha1 directory and into common/v1. These types are used by many mature APIs and are now recognized as stable. This new package should be imported with alias xpv1 by convention. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates all core/v1alpha1 imports to the common/v1, which is the new home of these embedded API types. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
f871729
to
0b27607
Compare
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.
LGTM - thanks for updating this early @hasheddan.
Description of your changes
Moves the core embedded API types out of the core/v1alpha1 directory and
into common/v1. These types are used by many mature APIs and are now
recognized as stable. This new package should be imported with alias
xpv1 by convention.
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
make