-
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/hack-scripts-cleanup] cleanup hack scripts #194
[th/hack-scripts-cleanup] cleanup hack scripts #194
Conversation
thom311
commented
Oct 25, 2024
- hack: make scripts executable and add shebang
- hack: use "set -e" to fail scripts on error
- Makefile: directly call scripts instead of using variables
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. |
/ok-to-test |
/test remaining-required |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SalDaniele, 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 |
cf4849e
to
0d65690
Compare
/retest |
/lgtm |
It's error prone when scripts don't check for the success of their commands. Don't do that, use `set -e`. If you find that a step in the scripts can fail for valid reasons and you don't want that to abort the script, then catch the exit code (for example with `|| true`).
These variables serve no purpose as they are only used once. Drop them, and call the scripts directly. This also fixes some of the unnecessary inconsistencies like PREPARE_SCRIPT = hack/prepare.sh MAKE_E2E_FAST = hack/deploy_fast.sh prepare-e2e-test: bash $(PREPARE_SCRIPT) fast_e2e_test: prepare-e2e-test bash $(MAKE_E2E_FAST) where the variable names, the script names and the Make targets have no obvious resemblance (with the change, the Make targets are still inconsistent with the underlying scripts). Also, the scripts are executable and have a shebang. They choose their interpreter themselves and the Makefile should not assume that this is always "bash".
0d65690
to
3f88263
Compare
/lgtm |
/test remaining-required |
@thom311: all tests passed! 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. |
[ART PR BUILD NOTIFIER] Distgit: dpu-cni |
[ART PR BUILD NOTIFIER] Distgit: dpu-operator |
[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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go 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 call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy
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 call `go mod tidy` for api/ directory. Hack `make generate` to call `go mod tidy` first. We will do this now, then run operator-sdk, and then revert this change again. It will be reverted, because we don't want this behavior usually. Usually, we want to separate "generate" from "vendor". Otherwise: $ git checkout -B C origin/main && \ git reset --hard HEAD && \ git clean -fdx && \ make operator-sdk && \ ./bin/operator-sdk create webhook --group config --version v1 --kind DpuOperatorConfig --defaulting --programmatic-validation branch 'C' set up to track 'origin/main'. Reset branch 'C' Your branch is up to date with 'origin/main'. HEAD is now at e58a9c9 Merge pull request openshift#194 from thom311/th/hack-scripts-cleanup INFO[0000] Writing kustomize manifests for you to edit... ERRO[0000] Unable to find the target #- path: manager_webhook_patch.yaml to uncomment in the file config/default/kustomization.yaml. INFO[0000] Writing scaffold for you to edit... INFO[0000] api/v1/dpuoperatorconfig_webhook.go INFO[0000] api/v1/dpuoperatorconfig_webhook_test.go INFO[0000] api/v1/webhook_suite_test.go INFO[0000] Update dependencies: $ go mod tidy INFO[0000] Running make: $ make generate test -s /data/src/dpu-operator/bin/controller-gen && /data/src/dpu-operator/bin/controller-gen --version | grep -q v0.15.0 || \ GOBIN=/data/src/dpu-operator/bin GOFLAGS='' go install sigs.k8s.io/controller-tools/cmd/[email protected] GOFLAGS='' /data/src/dpu-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..." Error: load packages in root "/data/src/dpu-operator/api": err: exit status 1: stderr: go: updates to go.mod needed; to update it: go mod tidy