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

🐛 apis: fix missing categories marker for VShpereVM in v1alpha3 and v1alpha4 #1973

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

chrischdi
Copy link
Member

@chrischdi chrischdi commented Jul 6, 2023

What this PR does / why we need it:

Adds the missing categories=cluster-api marker to:

  • apis/v1alpha3/vspherevm_types.go
  • apis/v1alpha4/vspherevm_types.go

The missing markers result into inconsistent results for the generated CRD's.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Related to #1928

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Fix missing categories marker for VSphereVM in v1alpha3 and v1alpha4

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 6, 2023
@k8s-ci-robot k8s-ci-robot requested review from srm09 and vrabbi July 6, 2023 09:22
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 6, 2023
@chrischdi
Copy link
Member Author

Note: on main this is reproducible using the following script:

function test:generate() {
  rm -rf tmp tmp2
  mkdir -p tmp tmp2
  eval $CONTROLLER_GEN ${1}
  for i in {1..100}; do
    printf "> %02d\n" "$i";
    eval $CONTROLLER_GEN ${1}2
    diff tmp${2} tmp2${2} || break
  done
}

CONTROLLER_GEN="$(pwd)/hack/tools/bin/controller-gen"
GENARGS="paths=./apis/v1alpha3 \
    paths=./apis/v1alpha4 \
    paths=./apis/v1beta1 \
    crd:crdVersions=v1 \
    output:crd:dir=tmp"

test:generate ${GENARGS} "/infrastructure.cluster.x-k8s.io_vspherevms.yaml"

Example failure:

❯ test:generate ${GENARGS} "/infrastructure.cluster.x-k8s.io_vspherevms.yaml"
> 01
> 02
> 03
11,12d10
<     categories:
<     - cluster-api

Note: this script may still exit on the cases where x-kubernetes-map-type: atomic is added/removed or - apiGroup is added or removed from required.

@chrischdi chrischdi changed the title 🐛 apis: fix missing categories marker for vshperevm in v1alpha3 and v1alpha4 🐛 apis: fix missing categories marker for VShpereVM in v1alpha3 and v1alpha4 Jul 6, 2023
@sbueringer
Copy link
Member

Should be fine to fix it this way, given that there is only one categories field per CRD.

Would be good to have a controller-tools issue for it though (just to report it)

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 10, 2023
@randomvariable
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2023
@k8s-ci-robot k8s-ci-robot merged commit 341968f into kubernetes-sigs:main Jul 11, 2023
5 of 6 checks passed
@chrischdi chrischdi deleted the fix-categories branch July 11, 2023 10:16
@sbueringer
Copy link
Member

I would cherry-pick this to all supported branches

/cherry-pick release-1.7

@sbueringer
Copy link
Member

/cherry-pick release-1.6

@sbueringer
Copy link
Member

/cherry-pick release-1.5

@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #1990

In response to this:

I would cherry-pick this to all supported branches

/cherry-pick release-1.7

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.

@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #1991

In response to this:

/cherry-pick release-1.6

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.

@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #1992

In response to this:

/cherry-pick release-1.5

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants