Skip to content

Update/verify codegen by make rulew #24252

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

Merged
merged 2 commits into from
Nov 8, 2021

Conversation

chaodaiG
Copy link
Contributor

@chaodaiG chaodaiG commented Nov 4, 2021

To make code reviewers' lives easier, this PR contains two commits:

  • Copy/paste blindly update/verify-codegen scripts using bazel
  • Change to not use bazel

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 4, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/config Issues or PRs related to code in /config area/prow/bump Updates to the k8s prow cluster sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Nov 4, 2021
@chaodaiG
Copy link
Contributor Author

chaodaiG commented Nov 4, 2021

/cc @cjwagner @alvaroaleman

echo "Install codegen tools."
cd "hack/tools"
clientgen=${REPO_ROOT}/_bin/client-gen
go build -o "${REPO_ROOT}/_bin/client-gen" k8s.io/code-generator/cmd/client-gen
Copy link
Member

Choose a reason for hiding this comment

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

I think it would make more sense to define make targets for these and make them dependencies of the update-codegen target. That would also let us avoid rebuilding them when not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite sure that I'm getting the idea. If you mean create a new make target just for installing tools used by update-codegen, it would work but I'm not sure it's the best idea since this new target is used only by update-codegen, maybe not worth the effort of inflating root level Makefile?

For local development, this is pretty fast after the first time, mostly due to go cache I think

Copy link
Member

Choose a reason for hiding this comment

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

Ok, sounds good.

echo "Install codegen tools."
cd "hack/tools"
clientgen=${REPO_ROOT}/_bin/client-gen
go build -o "${REPO_ROOT}/_bin/client-gen" k8s.io/code-generator/cmd/client-gen
Copy link
Member

Choose a reason for hiding this comment

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

Ok, sounds good.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 8, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chaodaiG, cjwagner

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 merged commit e06d9fd into kubernetes:master Nov 8, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Nov 8, 2021
@chaodaiG chaodaiG deleted the codegen-makerule branch November 8, 2021 20:08
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. area/config Issues or PRs related to code in /config area/prow/bazel-deprecation area/prow/bump Updates to the k8s prow cluster 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

3 participants