Skip to content

🐛 Fix/generate go apis target#3500

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
LucaLanziani:fix/generate-go-apis-target
Jun 21, 2022
Merged

🐛 Fix/generate go apis target#3500
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
LucaLanziani:fix/generate-go-apis-target

Conversation

@LucaLanziani
Copy link
Copy Markdown
Contributor

/kind bug

What this PR does / why we need it:

This fixes the wrong behavior where running make generate after an api change wont regenerate the CRD definitions.

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 #3336

Special notes for your reviewer:

  1. make clean
  2. change the API definition
  3. make generate
  4. change the API definition again
  5. make generate

Checklist:

  • squashed commits
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Jun 5, 2022
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@LucaLanziani: This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

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-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 5, 2022
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @LucaLanziani. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 5, 2022
@k8s-ci-robot k8s-ci-robot requested review from dthorsen and pydctw June 5, 2022 20:31
@Ankitasw
Copy link
Copy Markdown
Member

Ankitasw commented Jun 6, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 6, 2022
@Ankitasw
Copy link
Copy Markdown
Member

Ankitasw commented Jun 6, 2022

Special notes for your reviewer:

  1. make clean
  2. change the API definition
  3. make generate
  4. change the API definition again
  5. make generate

@LucaLanziani Any reason why we have to run make generate twice?

@LucaLanziani
Copy link
Copy Markdown
Contributor Author

LucaLanziani commented Jun 6, 2022

@Ankitasw The problem presented itself on the second run, the first run the generate will work because the clean target.
So to reproduce the problem a first make generare is needed to bring the project to the "dirty" state.

As also explained here:

#3336 (comment)

@Ankitasw
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 21, 2022
@Ankitasw
Copy link
Copy Markdown
Member

cc @richardcase for review.

@richardcase
Copy link
Copy Markdown
Member

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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

The pull request process is described here

Details 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 Jun 21, 2022
@k8s-ci-robot k8s-ci-robot merged commit aa9c4b6 into kubernetes-sigs:main Jun 21, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.x milestone Jun 21, 2022
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make target generate-go-apis isn't running on an API change

4 participants