wilfred-s commented on code in PR #96:
URL:
https://github.com/apache/yunikorn-scheduler-interface/pull/96#discussion_r1234739627
##########
lib/go/Makefile:
##########
@@ -70,29 +77,46 @@ $(PROTOC):
chmod 0755 $(PROTOC)
stat $@ > /dev/null 2>&1
+# Get and install the go plug-in for protoc.
+PROTOC_GEN_GO_TAR :=
protoc-gen-go.$(PROTOBUF_VERSION).$(PROTOGEN_OS).$(PROTOGEN_ARCH).tar.gz
+PROTOC_GEN_GO_URL :=
https://github.com/protocolbuffers/protobuf-go/releases/download/$(PROTOBUF_VERSION)/$(PROTOC_GEN_GO_TAR)
+PROTOC_GEN_GO := $(PROTOC_BIN_DIR)/protoc-gen-go
+$(PROTOC_GEN_GO):
+ mkdir -p $(PROTOC_TMP_DIR) && \
+ curl -L $(PROTOC_GEN_GO_URL) -o
$(PROTOC_TMP_DIR)/$(PROTOC_GEN_GO_TAR) && \
+ tar -C $(PROTOC_BIN_DIR) -xzvf
$(PROTOC_TMP_DIR)/$(PROTOC_GEN_GO_TAR) protoc-gen-go && \
+ chmod 0755 $(PROTOC_GEN_GO)
+ stat $@ > /dev/null 2>&1
+
+# Get and install the protoc-gen-go-grpc for protoc.
+PROTOC_GEN_GO_GRPC_TAR :=
protoc-gen-go-grpc.v$(PROTOC_GEN_GO_GRPC_VER).$(PROTOGEN_OS).$(PROTOGEN_ARCH).tar.gz
+PROTOC_GEN_GO_GRPC_URL :=
https://github.com/grpc/grpc-go/releases/download/cmd/protoc-gen-go-grpc/v$(PROTOC_GEN_GO_GRPC_VER)/$(PROTOC_GEN_GO_GRPC_TAR)
+PROTOC_GEN_GO_GRPC := $(PROTOC_BIN_DIR)/protoc-gen-go-grpc
+$(PROTOC_GEN_GO_GRPC):
+ mkdir -p $(PROTOC_TMP_DIR) && \
+ curl -L $(PROTOC_GEN_GO_GRPC_URL) -o
$(PROTOC_TMP_DIR)/$(PROTOC_GEN_GO_GRPC_TAR) && \
+ tar -C $(PROTOC_BIN_DIR) -xzvf
$(PROTOC_TMP_DIR)/$(PROTOC_GEN_GO_GRPC_TAR) protoc-gen-go-grpc && \
Review Comment:
This fails on linux as the file has a path specified in the tar file:
```
tar tfv protoc/protoc-gen-go-grpc.v1.3.0.linux.amd64.tar.gz
drwxr-xr-x 0 runner docker 0 2 Mar 10:51 ./
-rw-r--r-- 0 runner docker 4863 2 Mar 10:51 ./README.md
-rwxr-xr-x 0 runner docker 8344207 2 Mar 10:51 ./protoc-gen-go-grpc
-rw-r--r-- 0 runner docker 11358 2 Mar 10:51 ./LICENSE
```
That needs to be reflected in the tar command. Linux is not as forgiving as
MacOSX is when unpacking
##########
go.mod:
##########
@@ -22,24 +22,23 @@ module github.com/apache/yunikorn-scheduler-interface
go 1.20
require (
- github.com/golang/protobuf v1.2.0
- golang.org/x/net v0.8.0
- google.golang.org/grpc v1.23.1
- google.golang.org/protobuf v1.26.0-rc.1
+ google.golang.org/grpc v1.56.0
+ google.golang.org/protobuf v1.30.0
)
require (
- golang.org/x/sys v0.6.0 // indirect
- golang.org/x/text v0.8.0 // indirect
- google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 //
indirect
+ github.com/golang/protobuf v1.5.3 // indirect
+ golang.org/x/net v0.10.0 // indirect
+ golang.org/x/sys v0.8.0 // indirect
+ golang.org/x/text v0.9.0 // indirect
+ google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 //
indirect
)
replace (
- github.com/golang/protobuf => github.com/golang/protobuf v1.2.0
golang.org/x/crypto => golang.org/x/crypto v0.7.0
Review Comment:
One last one left crypto v0.10.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]