apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
1.78k stars 157 forks source link

[BUG] An error occurs when using make run #6602

Closed Shuimo03 closed 3 months ago

Shuimo03 commented 5 months ago

Describe the bug

➜  kubeblocks git:(main) ✗ make run
which: no golangci-lint in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no golangci-lint in (/root/go/bin)
which: no staticcheck in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no goimports in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no cue in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
go generate -x ./pkg/testutil/k8s/mocks/...
go run github.com/golang/mock/mockgen -copyright_file ../../../../hack/boilerplate.go.txt -package mocks -destination k8sclient_mocks.go sigs.k8s.io/controller-runtime/pkg/client Client,StatusWriter
go generate -x ./pkg/configuration/container/mocks/...
go run github.com/golang/mock/mockgen -copyright_file ../../../../hack/boilerplate.go.txt -package mocks -destination dockerclient_mocks.go github.com/docker/docker/client ContainerAPIClient
go run github.com/golang/mock/mockgen -copyright_file ../../../../hack/boilerplate.go.txt -package mocks -destination criclient_mocks.go k8s.io/cri-api/pkg/apis/runtime/v1 RuntimeServiceClient
go generate -x ./pkg/configuration/proto/mocks/...
go run github.com/golang/mock/mockgen -copyright_file ../../../../hack/boilerplate.go.txt -package mocks -destination reconfigure_client_mocks.go github.com/apecloud/kubeblocks/pkg/configuration/proto ReconfigureClient
/root/code/kubeblocks/bin/controller-gen rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./cmd/manager/...;./apis/...;./controllers/..." output:crd:artifacts:config=config/crd/bases
which: no golangci-lint in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no golangci-lint in (/root/go/bin)
which: no staticcheck in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no goimports in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no cue in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_backuppolicytemplates.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_clusterdefinitions.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_clusters.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_clusterversions.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_componentclassdefinitions.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_componentresourceconstraints.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_components.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_configconstraints.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_configurations.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_opsdefinitions.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_opsrequests.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/apps.kubeblocks.io_servicedescriptors.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_actionsets.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_backuppolicies.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_backuprepos.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_backupschedules.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_backups.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/dataprotection.kubeblocks.io_restores.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/extensions.kubeblocks.io_addons.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/storage.kubeblocks.io_storageproviders.yaml
applying app.kubernetes.io/name=kubeblocks label to config/crd/bases/workloads.kubeblocks.io_replicatedstatemachines.yaml
make client-sdk-gen
make[1]: Entering directory '/root/code/kubeblocks'
which: no golangci-lint in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no golangci-lint in (/root/go/bin)
which: no staticcheck in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no goimports in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
which: no cue in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
go mod tidy -compat=1.21
go mod verify
all modules verified
WARNING: generate-groups.sh is deprecated.
WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead.

WARNING: generate-internal-groups.sh is deprecated.
WARNING: Please use k8s.io/code-generator/kube_codegen.sh instead.

Generating clientset for apps:v1alpha1 dataprotection:v1alpha1 extensions:v1alpha1 workloads:v1alpha1 storage:v1alpha1 at github.com/apecloud/kubeblocks/pkg/client/clientset
Generating listers for apps:v1alpha1 dataprotection:v1alpha1 extensions:v1alpha1 workloads:v1alpha1 storage:v1alpha1 at github.com/apecloud/kubeblocks/pkg/client/listers
Generating informers for apps:v1alpha1 dataprotection:v1alpha1 extensions:v1alpha1 workloads:v1alpha1 storage:v1alpha1 at github.com/apecloud/kubeblocks/pkg/client/informers
make[1]: Leaving directory '/root/code/kubeblocks'
/root/code/kubeblocks/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./apis/...;./externalapis/..."
gofmt -l -w -s $(git ls-files --exclude-standard | grep "\.go$" | grep -v "pkg/client")
GOOS=linux go vet -mod=mod ./...
go run ./cmd/manager/main.go --zap-devel=false --zap-encoder=console --zap-time-encoding=iso8601
unknown flag: --zap-devel
Usage of /tmp/go-build264675544/b001/exe/main:
      --apps                               Enable the apps controller manager. (default true)
      --extensions                         Enable the extensions controller manager. (default true)
      --health-probe-bind-address string   The address the probe endpoint binds to. (default ":8081")
      --kube-contexts string               Kube contexts the manager will talk to.
      --kubeconfig string                  Paths to a kubeconfig. Only required if out-of-cluster.
      --leader-elect                       Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
      --leader-elect-id string             The leader election ID prefix for controller manager. This ID must be unique to controller manager. (default "001c317f")
      --metrics-bind-address string        The address the metric endpoint binds to. (default ":8080")
      --workloads                          Enable the workloads controller manager. (default true)
unknown flag: --zap-devel
exit status 2
make: *** [Makefile:293: run] Error 1

To Reproduce Steps to reproduce the behavior:

  1. make run
  2. occur error

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

fix bug:

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
ifeq ($(ENABLE_WEBHOOKS), true)
    $(MAKE) webhook-cert
endif
    $(GO) run ./cmd/manager/main.go --zap-devel=false --zap-encoder=console --zap-time-encoding=iso8601
.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
ifeq ($(ENABLE_WEBHOOKS), true)
    $(MAKE) webhook-cert
endif
    $(GO) run ./cmd/manager/main.go

image

nayutah commented 5 months ago

@drivebyer take a look, it is about zap log

drivebyer commented 4 months ago

I am unable to reproduce the issue using the main branch; I believe it has been resolved as https://github.com/apecloud/kubeblocks/pull/6448.