🌱 Standardize api import aliases#5830
Conversation
|
@sbueringer: 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. DetailsInstructions 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. |
|
nice one! |
64264bc to
d411869
Compare
d411869 to
e889246
Compare
|
/reopen |
|
@sbueringer: Failed to re-open PR: state cannot be changed. There are no new commits on the sbueringer:pr-standardize-api-import-aliases branch. DetailsIn response to this:
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. |
|
Something broke my rebase workflow. I'll open a new PR |
|
Okay I just revived that branch/PR instead /reopen |
|
@sbueringer: Reopened this PR. DetailsIn response to this:
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. |
Signed-off-by: Stefan Büringer buringerst@vmware.com
2e4c350 to
b0797b3
Compare
|
Rebased and self-reviewed the PR. Should be ready for review now. |
|
/assign @fabriziopandini @vincepri (cc @stmcginnis, might be also interesting for you) |
killianmuldoon
left a comment
There was a problem hiding this comment.
Thanks for doing this! It should help clarify things.
We should add this as a task for releasing a new API version somewhere too, but that can be outside of this PR.
/lgtm
| - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 | ||
| alias: bootstrapv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 | ||
| alias: bootstrapv1 |
There was a problem hiding this comment.
should we reserve v1 for real v1 and let the beta imports be consistent e.g bootstrapv1beta1?
There was a problem hiding this comment.
Hm good question. Up until know we used v1 everywhere (and with everywhere I also mean in a bunch of providers :))
There was a problem hiding this comment.
I think the main idea behind that is that when we upgrade the version only the import changes and not huge parts of the codebase
There was a problem hiding this comment.
yes. this is for avoiding churn in the codebase at each release and it kind of makes sense if you read it as the last version in the v1 series (or at least that was the original idea)
|
/lgtm |
|
/assign @vincepri |
| alias: clusterv1 | ||
| # CAPI exp | ||
| - pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha3 | ||
| alias: expv1alpha3 |
There was a problem hiding this comment.
Would be fine for me. I just used the currently most commonly used alias. But I'm not sure which one would be better (same would probably apply to addonsv1 => clusteraddonsv1, too)
On one side having the cluster prefix would be more consistent with infraexp on the other side it's ab it longer
@fabriziopandini WDYT?
There was a problem hiding this comment.
using cluster prefix seems kind of redundant to me, but no strong opinions
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR standardizes our import aliases (follow-up to: #5788 (comment))
Upsides of standardizing aliases:
Not sure how it works in other IDEs, but in Intellij you can just write
bootstrapv1.<struct-name>and it will automatically import the correct package because it tracks all known aliases. This works better if there is a clear alias=>package mapping.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #