Skip to content
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

🌱 Enable integers lint of KAL #11887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sivchari
Copy link
Member

What this PR does / why we need it:

This PR is part of #11834 .
Enabled integers rule of KAL.

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 #

/kind api-change

Signed-off-by: sivchari <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Feb 21, 2025
@k8s-ci-robot
Copy link
Contributor

This PR is currently missing an area label, which is used to identify the modified component when generating release notes.

Area labels can be added by org members by writing /area ${COMPONENT} in a comment

Please see the labels list for possible areas.

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-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 21, 2025
@sivchari
Copy link
Member Author

/assign @JoelSpeed

@@ -1160,7 +1160,7 @@ func ipFamilyForCIDRStrings(cidrs []string) (ClusterIPFamily, error) {
}

// ClusterIPFamily defines the types of supported IP families.
type ClusterIPFamily int
type ClusterIPFamily int32
Copy link
Member

@sbueringer sbueringer Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't change the existing APIs. These are all breaking changes

In my opinion we have to exclude specifically the current occurences of that finding and then we can fix it in newer apiVersions

(@JoelSpeed please correct me if I'm wrong)

Exception: The change in cmd/clusterctl/api/v1alpha3/metadata_type.go should be fine as we only use this type to parse YAML files

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry. As you can said, this change affects compatibility.
Thanks.

@sbueringer
Question. Does package exp allow us to change the type ? (e.g. exp/ipam/api/(v1alpha1|v1beta1)/ipaddress_types.go)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO no we should not do it there either, it should be done there when going to a new api version instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see that this not only changes the go type (which can be fixed I guess?) but it also changes the schema which is generally a pretty good sign that we shouldn't make this change yet

Let's ignore these until we bump the API version

Copy link
Member

@sbueringer sbueringer Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO no we should not do it there either, it should be done there when going to a new api version instead.

Was that referring to cmd/clusterctl/api/v1alpha3/metadata_type.go?
That is only the type we use to parse metadata.yaml files.

EDIT: Ah that was referring to exp, right? :)

@k8s-ci-robot
Copy link
Contributor

@sivchari: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main 1cbd7a6 link false /test pull-cluster-api-apidiff-main

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants