-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HIVE-2558: Drop codegen k8s.io/code-generator #2342
Conversation
generate-groups.sh was deprecated in k8s.io/code-generator 1.29 and deleted in 1.30. Instead, the usage was replaced with: - kube_codegen.sh library's kube::codegen::gen_helpers The issue with the above is: - It doesn't allow to specify just running deepcopy and instead adds as well code conversion and defaulter code generation. - While deepcopy-gen and conversion-gen can deal well with the multiple input paths that we have, conversion-gen wants to work at the package level, which means it ends up wrongly processing the vendored k8s deepcopy directives. This in turn means that we are forced to use the kubernetes header files to respect their copyright, but ends up adding the kubernetes copyright to openshift generated code. - gen_helpers enforces usage of --output-base matching the import name, which means that we had to workaround with a symlink of ${REPO_ROOT}/github.com/openshift/ to "${REPO_ROOT}..". - vendored generated deepcopy got deleted and `make vendor` had to pick up the tab. Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com>
@celebdor: This pull request references HIVE-2558 which is a valid jira issue. In 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: celebdor 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 |
@celebdor: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
PR needs rebase. 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-sigs/prow repository. |
${SED_CMD} -i 's,^exec \(.*/generate-internal-groups.sh\),bash \1,g' ${CODEGEN_PKG}/generate-groups.sh | ||
# ...but we have to put it back, or `verify` will puke. | ||
trap "git checkout ${CODEGEN_PKG}/generate-groups.sh" EXIT | ||
GO111MODULE=on go install k8s.io/code-generator/cmd/deepcopy-gen@release-1.29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into the same failure with go install <web URI>
in #2481
Can we try:
- Make sure we have code-generator vendored at the appropriate version in go.mod, and naked-imported in pkg/dependencymagnet/go.doc
- Use
go install $(shell realpath vendor/k8s.io/code-generator/cmd/deepcopy-gen)
here to build the tool from the vendor dir
?
/remove-lifecycle stale @celebdor lmk if you want me to pick this up. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Looking at the current tip of |
generate-groups.sh was deprecated in k8s.io/code-generator 1.29 and deleted in 1.30. Instead, the usage was replaced with:
The issue with the above is:
make vendor
had to pick up the tab.