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

codegen: don't nuke files if only verifying #123261

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

skitt
Copy link
Member

@skitt skitt commented Feb 13, 2024

What type of PR is this?

/kind bug
/kind regression

What this PR does / why we need it:

The code generation tools support verification only with the --verify-only option, but this now fails because the files are nuked ahead of time.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Restore --verify-only function in code generation wrappers.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


The code generation tools support verification only with the
--verify-only option, but this now fails because the files are nuked
ahead of time.

Signed-off-by: Stephen Kitt <[email protected]>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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-priority Indicates a PR lacks a `priority/foo` label and requires one. 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 Feb 13, 2024
@skitt
Copy link
Member Author

skitt commented Feb 13, 2024

/cc @thockin

This breaks external projects using generate-groups.sh for verification; fixing the regression would involve backporting to 1.28 and 1.29.

skitt added a commit to skitt/submariner-addon that referenced this pull request Feb 13, 2024
This reverts commit 6fb8a12.

kube_codegen.sh only defines functions, generate-groups.sh still needs
to be called to actually perform the generation.

generate-groups.sh relies on generate-internal-groups.sh which needs
to be made executable. The latter also nukes generated files even when
verifying; this is disabled here by modifying the vendored files. See
kubernetes/kubernetes#123261 for the proposed
upstream fix.

Signed-off-by: Stephen Kitt <[email protected]>
openshift-merge-bot bot pushed a commit to stolostron/submariner-addon that referenced this pull request Feb 13, 2024
This reverts commit 6fb8a12.

kube_codegen.sh only defines functions, generate-groups.sh still needs
to be called to actually perform the generation.

generate-groups.sh relies on generate-internal-groups.sh which needs
to be made executable. The latter also nukes generated files even when
verifying; this is disabled here by modifying the vendored files. See
kubernetes/kubernetes#123261 for the proposed
upstream fix.

Signed-off-by: Stephen Kitt <[email protected]>
@thockin
Copy link
Member

thockin commented Feb 17, 2024

generate-groups.sh is deprecated and will be nuked entirely when Go workspaces lands, as will the verify logic (I honestly didn't think anyone used it at all).

I could maybe see restoring the verify functionality post-workspaces, maybe.

@thockin
Copy link
Member

thockin commented Feb 17, 2024

I'll approve for the purpose of backporting, but if I get my way this is all removed in 30.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: skitt, thockin

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
Copy link
Contributor

LGTM label has been added.

Git tree hash: cbd89a28672fd01a967126ea092244963508fe1d

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 17, 2024
@k8s-ci-robot k8s-ci-robot merged commit 1dce896 into kubernetes:master Feb 17, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Feb 17, 2024
@skitt skitt deleted the allow-codegen-verification branch February 19, 2024 09:52
@alexzielenski
Copy link
Contributor

/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 Feb 20, 2024
k8s-ci-robot added a commit that referenced this pull request Mar 1, 2024
…1-origin-release-1.29

Automated cherry pick of #123261: codegen: don't nuke files if only verifying
k8s-ci-robot added a commit that referenced this pull request Mar 1, 2024
…1-origin-release-1.28

Automated cherry pick of #123261: codegen: don't nuke files if only verifying
skitt added a commit to skitt/open-cluster-management-api that referenced this pull request May 28, 2024
This file removal bug was fixed by
kubernetes/kubernetes#123261

Signed-off-by: Stephen Kitt <[email protected]>
skitt added a commit to skitt/open-cluster-management-api that referenced this pull request May 28, 2024
This file removal bug was fixed by
kubernetes/kubernetes#123261
so the workaround can be removed.

Signed-off-by: Stephen Kitt <[email protected]>
openshift-merge-bot bot pushed a commit to open-cluster-management-io/api that referenced this pull request May 29, 2024
This file removal bug was fixed by
kubernetes/kubernetes#123261
so the workaround can be removed.

Signed-off-by: Stephen Kitt <[email protected]>
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/code-generation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 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.

None yet

4 participants