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

Tolerate more api types.go files to generate code #119981

Closed
wants to merge 1 commit into from

Conversation

poneding
Copy link

@poneding poneding commented Aug 16, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:
Can not generator with kube_codegen.sh when i have *_types.go rather hen types.go in api project.

Which issue(s) this PR fixes:
Fixes #119930

@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. 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 Aug 16, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @poneding. Thanks for your PR.

I'm waiting for a kubernetes 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.

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 needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Aug 16, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: poneding
Once this PR has been reviewed and has the lgtm label, please assign sttts for approval. For more information see the Kubernetes Code Review Process.

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 area/code-generation sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 16, 2023
@jiahuif
Copy link
Member

jiahuif commented Aug 17, 2023

/assign @wojtek-t
Thank you.
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 17, 2023
@wojtek-t
Copy link
Member

/assign @sttts

Can you please take a look - given you already responded on the issue?

/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 Aug 21, 2023
@poneding
Copy link
Author

poneding commented Sep 4, 2023

/retest

@sttts
Copy link
Contributor

sttts commented Sep 4, 2023

Not super important, but the pattern is types.go or *_types.go. Can that be expressed there?

Copy link

@ary1992 ary1992 left a comment

Choose a reason for hiding this comment

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

code-gen is no longer generating client code for files with name as type_*.go.

@@ -538,7 +538,7 @@ function kube::codegen::gen_client() {
done < <(
( kube::codegen::internal::git_grep -l \
-e '+genclient' \
":(glob)${in_root}"/'**/types.go' \
":(glob)${in_root}"/'**/*types.go' \
Copy link

Choose a reason for hiding this comment

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

Can you also include files with names as types_* ?

Suggested change
":(glob)${in_root}"/'**/*types.go' \
":(glob)${in_root}"/'**/*types*.go' \

@thockin thockin self-assigned this Oct 20, 2023
@thockin
Copy link
Member

thockin commented Oct 20, 2023

I'll take this one, it's my mess :)

@thockin
Copy link
Member

thockin commented Oct 20, 2023

I think this can be *.go, but it needs other changes. I am working on a comprehensive PR. Thanks for finding this.

@thockin thockin closed this Oct 20, 2023
@thockin
Copy link
Member

thockin commented Oct 21, 2023

#121411

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tolerate more api types.go files to generate code in code-generator kube_codegen.sh
7 participants