You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, rather than using a shell variable that can be sourced by aliases, the Makefile uses hard coded "go"..
This makes it difficult to use for developers working with multiple versions of golang..
although go is supposed to be backward compatible, I run into test fails when using go1.23 (the code contribution docs say that go1.19+ should be fine)..
when using go1.22 (as in go.mod), the tests pass but I had to explicitly hard code the 1.22 in the makefile as it wasn't picking up my aliases
this is what happens with the default makefile test (line 42)
-*- mode: compilation; default-directory: "~/source/vcops/os-contribs/KusionStack/karpor/" -*-
Compilation started at Thu Jan 2 11:45:45
make test -j 16
ok github.com/KusionStack/karpor/pkg/core/entity (cached)
ok github.com/KusionStack/karpor/pkg/core/health (cached)
ok github.com/KusionStack/karpor/pkg/core/manager/ai (cached)
# github.com/KusionStack/karpor/pkg/util/certgenerator.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
# github.com/KusionStack/karpor/pkg/core/manager/cluster.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
FAIL github.com/KusionStack/karpor/pkg/core/manager/cluster [build failed]
# github.com/KusionStack/karpor/pkg/core/manager/insight.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
FAIL github.com/KusionStack/karpor/pkg/core/manager/insight [build failed]
? github.com/KusionStack/karpor/pkg/core/manager/search [no test files]
ok github.com/KusionStack/karpor/pkg/core/manager/resourcegroup (cached)
# github.com/KusionStack/karpor/pkg/core/route.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
FAIL github.com/KusionStack/karpor/pkg/core/route [build failed]
? github.com/KusionStack/karpor/pkg/infra/ai [no test files]
? github.com/KusionStack/karpor/pkg/infra/multicluster [no test files]
? github.com/KusionStack/karpor/pkg/infra/scanner [no test files]
? github.com/KusionStack/karpor/pkg/infra/scanner/kubeaudit [no test files]
? github.com/KusionStack/karpor/pkg/infra/search/storage [no test files]
? github.com/KusionStack/karpor/pkg/infra/topology [no test files]
? github.com/KusionStack/karpor/pkg/kubernetes/scheme [no test files]
# github.com/KusionStack/karpor/pkg/syncer.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
FAIL github.com/KusionStack/karpor/pkg/syncer [build failed]
? github.com/KusionStack/karpor/pkg/syncer/transform [no test files]
ok github.com/KusionStack/karpor/pkg/syncer/cache (cached)
ok github.com/KusionStack/karpor/pkg/syncer/jsonextracter (cached)
# github.com/KusionStack/karpor/pkg/syncer/utils.test
link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS
FAIL github.com/KusionStack/karpor/pkg/syncer/utils [build failed]
FAIL github.com/KusionStack/karpor/pkg/util/certgenerator [build failed]
ok github.com/KusionStack/karpor/pkg/util/cache (cached)
ok github.com/KusionStack/karpor/pkg/util/clusterinstall (cached)
ok github.com/KusionStack/karpor/pkg/util/ctxutil (cached)
ok github.com/KusionStack/karpor/pkg/util/jsonpath (cached)
ok github.com/KusionStack/karpor/pkg/util/proxy (cached)
ok github.com/KusionStack/karpor/pkg/util/safeutil (cached)
ok github.com/KusionStack/karpor/pkg/util/sql2es (cached)
ok github.com/KusionStack/karpor/pkg/util/topology (cached)
FAIL
make: *** [Makefile:42: test] Error 1
Compilation exited abnormally with code 2 at Thu Jan 2 11:45:47, duration 2.14 s
What did you expect to happen?
the tests should have passed..
hardcoded version of makefile:
.PHONY: test
test: ## Run the tests
@PKG_LIST=$${TARGET_PKG:-$(GOSOURCE_PATHS)}; \
go1.22.10 test -gcflags=all=-l -timeout=10m `go1.22.10 list -e $${PKG_LIST} | grep -vE "cmd|internal|internalimport|generated|handler|middleware|registry|openapi|apis|version|gitutil|server|elasticsearch"` ${TEST_FLAGS}
output:
-*- mode: compilation; default-directory: "~/source/vcops/os-contribs/KusionStack/karpor/" -*-
Compilation started at Thu Jan 2 11:42:32
make test -j 16
ok github.com/KusionStack/karpor/pkg/core/entity (cached)
ok github.com/KusionStack/karpor/pkg/core/health (cached)
ok github.com/KusionStack/karpor/pkg/core/manager/ai (cached)
ok github.com/KusionStack/karpor/pkg/core/manager/cluster (cached)
ok github.com/KusionStack/karpor/pkg/core/manager/insight (cached)
ok github.com/KusionStack/karpor/pkg/core/manager/resourcegroup (cached)
? github.com/KusionStack/karpor/pkg/core/manager/search [no test files]
? github.com/KusionStack/karpor/pkg/infra/ai [no test files]
? github.com/KusionStack/karpor/pkg/infra/multicluster [no test files]
? github.com/KusionStack/karpor/pkg/infra/scanner/kubeaudit [no test files]
ok github.com/KusionStack/karpor/pkg/core/route (cached)
? github.com/KusionStack/karpor/pkg/infra/search/storage [no test files]
? github.com/KusionStack/karpor/pkg/infra/scanner [no test files]
? github.com/KusionStack/karpor/pkg/infra/topology [no test files]
? github.com/KusionStack/karpor/pkg/kubernetes/scheme [no test files]
ok github.com/KusionStack/karpor/pkg/syncer (cached)
? github.com/KusionStack/karpor/pkg/syncer/transform [no test files]
ok github.com/KusionStack/karpor/pkg/syncer/cache (cached)
ok github.com/KusionStack/karpor/pkg/syncer/jsonextracter (cached)
ok github.com/KusionStack/karpor/pkg/syncer/utils (cached)
ok github.com/KusionStack/karpor/pkg/util/cache (cached)
ok github.com/KusionStack/karpor/pkg/util/certgenerator (cached)
ok github.com/KusionStack/karpor/pkg/util/clusterinstall (cached)
ok github.com/KusionStack/karpor/pkg/util/ctxutil (cached)
ok github.com/KusionStack/karpor/pkg/util/jsonpath (cached)
ok github.com/KusionStack/karpor/pkg/util/proxy (cached)
ok github.com/KusionStack/karpor/pkg/util/safeutil (cached)
ok github.com/KusionStack/karpor/pkg/util/sql2es (cached)
ok github.com/KusionStack/karpor/pkg/util/topology (cached)
Compilation finished at Thu Jan 2 11:42:33, duration 1.59 s
How can we reproduce it (as minimally and precisely as possible)?
install 1.23.1 go
~/s/v/o/KusionStack/karpor [main] λ go version
go version go1.23.1 linux/amd64
@rajp152k Sorry, the go version that Karpor relies on has been upgraded from 1.19 to 1.22 after #646 . I will add this explanation in the documentation, which is my oversight.
The issue with Makefile is that I am using it locally g I managed the Go version, so I didn't encounter the problem you mentioned. But I will optimize the Makefile to make it compatible with methods that use go aliases. Please review it later.
Also, let me take another look at the errors encountered when using 1.23 ...
What happened?
currently, rather than using a shell variable that can be sourced by aliases, the Makefile uses hard coded "go"..
This makes it difficult to use for developers working with multiple versions of golang..
although go is supposed to be backward compatible, I run into test fails when using go1.23 (the code contribution docs say that go1.19+ should be fine)..
when using go1.22 (as in go.mod), the tests pass but I had to explicitly hard code the 1.22 in the makefile as it wasn't picking up my aliases
this is what happens with the default makefile test (line 42)
What did you expect to happen?
the tests should have passed..
hardcoded version of makefile:
output:
How can we reproduce it (as minimally and precisely as possible)?
make test
Anything else we need to know?
https://superuser.com/questions/936342/how-to-get-make-to-recognize-alias-command
Karpor version
v0.1.0
OS version
Install tools
The text was updated successfully, but these errors were encountered: