NO-ISSUE: Restore deepcopy generation - #3109
Conversation
kube_codegen.sh no longer does anything when invoked; it's intended to be sourced, and defines functions to call for various code generation features. This adjusts hack/update-codegen.sh to match: kube_codegen.sh is sourced, and kube::codegen::gen_helpers is used to generate deepcopy functions. This requires GOFLAGS=-mod=readonly because kube_codegen.sh expects "go install" to work, and the default -mod=vendor (because the vendor directory is present) doesn't work for that. Signed-off-by: Stephen Kitt <skitt@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@skitt: This pull request explicitly references no jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
Summary by CodeRabbit
WalkthroughThe code-generation script now sources Kubernetes code-generation helpers and calls ChangesCode generation update
Estimated code review effort: 1 (Trivial) | ~2 minutes Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 inconclusive)
✅ Passed checks (22 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: skitt The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@skitt: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
kube_codegen.sh no longer does anything when invoked; it's intended to be sourced, and defines functions to call for various code generation features.
This adjusts hack/update-codegen.sh to match: kube_codegen.sh is sourced, and kube::codegen::gen_helpers is used to generate deepcopy functions. This requires GOFLAGS=-mod=readonly because kube_codegen.sh expects "go install" to work, and the default -mod=vendor (because the vendor directory is present) doesn't work for that.
To verify this, delete
pkg/apis/network/v1/zz_generated.deepcopy.go; the currenthack/update-codegen.shwon’t regenerate it, whereas the updated version will.