-
Notifications
You must be signed in to change notification settings - Fork 19
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
[th/make-generate-tidy] makefile: run go mod tidy
during make generate
#204
[th/make-generate-tidy] makefile: run go mod tidy
during make generate
#204
Conversation
Hi @thom311. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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-sigs/prow repository. |
/hold Doesn't this behave the same way if we didn't have a go.mod? |
This patch has only an effect, when I don't understand what k8s' |
I don't think we want to mix make generate with go mod tidy. I think go mod tidy should be run separately. |
There is a reproducer in the commit message that you can just run. How do you suggest to solve this differently? Especially seeing that |
403b03c
to
23e2c38
Compare
It think the right place is |
23e2c38
to
27588b8
Compare
e79c2f1
to
1a9a7a0
Compare
1a9a7a0
to
3a8b7b4
Compare
/unhold |
Note that the But I think the problem of that is that it's wrong that |
/test make-e2e-test |
9f6f831
to
f6fcd36
Compare
/test remaining-required |
f6fcd36
to
ba1959a
Compare
/test remaining-required |
/test make-e2e-test |
@thom311: The following test 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. |
`TMP_DIR := $(shell mktemp -d)` causes everytime we call `make` to leak a temporary directory "/tmp/tmp.*/". We could fix that by always using the same directory ("/tmp/something") or by concatenating all make steps with `TMPDIR=$(mktemp ...) && cd $TMPDIR && ...`. Instead, add and use a "scripts/check-gittree-for-diff.sh" script. That is useful, because the make targets "{generate,vendor}-check" are basically the same. We can implement them both by calling the script. And by having a stand-alone bash scripts, it's easier to review (as it's not a shell scripted escaped inside make). Also, `make vendor-check` now just calls `make vendor`. Previously, it reimplemnted how vendoring works.
ba1959a
to
79a3482
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bn222, thom311 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 |
/test remaining-required |
[ART PR BUILD NOTIFIER] Distgit: dpu-operator |
[ART PR BUILD NOTIFIER] Distgit: dpu-cni |
[ART PR BUILD NOTIFIER] Distgit: dpu-daemon |
We have multiple go.mod files, this does not seem to agree with operator-sdk. operator-sdk will generate files and call
make generate
. However, that will then fail because we didn't callgo mod tidy
for api/ directory.Note that compared to sriov-network-operator, in dpu-operator we have several go.mod files. That does not seem to agree with operator-sdk, or at least, something is not hooked up right.
Hack
make generate
to callgo mod tidy
first.Otherwise: