kuberay
kuberay copied to clipboard
[Feature] Support go1.18+
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
Currently, KubeRay only supports go1.16 and go1.17. When I try to build KubeRay with go1.19, it cannot download the binary of controller-gen
successfully.
> make build
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/[email protected]
.
.
....../kuberay/ray-operator/bin/controller-gen: No such file or directory
make: *** [generate] Error 127
The root cause is that go get
is deprecated (Link) starting in go1.17, go install
may be used instead. An workaround solution is to update go get
to go install
in the Makefile. However, the Makefile seems to be generated by operator-sdk, and thus I am not sure whether updating it manually is a good idea or not.
define go-get-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
This issue is used to track the progress of https://github.com/ray-project/kuberay/pull/241.
Use case
No response
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
cc @DmitriGekhtman
Thanks for helping us track this, @kevin85421 ! cc @Jeffwan @akanso as well
I'm finding this pretty annoying -- I have to maintain multiple go installations to develop KubeRay.
I recently started a new operator via the sdk -- it generated a makefile with the following:
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
I think we should be able to make updates as needed.
Follow up after #1283:
- Update the CI to use a newer Go version for building the KubeRay operator.
- Update the Go version specified in DEVELOPMENT.md.
Closed by #1325