You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "grundprinzip (via GitHub)" <gi...@apache.org> on 2023/05/31 10:49:19 UTC

[GitHub] [spark-connect-go] grundprinzip opened a new pull request, #3: [Spark 43895] Basic Repository Layout

grundprinzip opened a new pull request, #3:
URL: https://github.com/apache/spark-connect-go/pull/3

   ## Proposed Changes
   
   In order to prepare the implementation of the Go client. This patch prepares the repository layout.
   
   * Adds a script in `dev/sync-protos-from-spark.sh` that given a Spark checkout will copy the protos from Spark to this repository to make sure it's current.
   * Adds the Makefile and the necessary outline for the build system
   * Adds the `buf` generation logic for the protos.
   
   ## Testing
   
   `make clean && make check`
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] grundprinzip commented on pull request #3: [Spark 43895] Basic Repository Layout

Posted by "grundprinzip (via GitHub)" <gi...@apache.org>.
grundprinzip commented on PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#issuecomment-1571097971

   @zhengruifeng @HyukjinKwon this PR should be good now and the last PR before we can bring in the changes of Bo for the base client. The next step would be adding the workflow integration.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] HyukjinKwon commented on pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#issuecomment-1571127467

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] zhengruifeng commented on pull request #3: [Spark 43895] Basic Repository Layout

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#issuecomment-1569988466

   Is it possible to make `apache/spark` a submodule so that we don't need to copy the proto files? 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] HyukjinKwon commented on a diff in pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#discussion_r1212431632


##########
go.mod:
##########
@@ -0,0 +1,53 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+module github.com/apache/spark-connect-go/v_3_4
+
+go 1.19
+
+require (
+	github.com/apache/arrow/go/v12 v12.0.0
+	github.com/google/uuid v1.3.0
+	github.com/stretchr/testify v1.8.0
+	google.golang.org/grpc v1.54.0
+	google.golang.org/protobuf v1.30.0
+)
+
+require (
+	github.com/andybalholm/brotli v1.0.4 // indirect
+	github.com/apache/thrift v0.16.0 // indirect
+	github.com/davecgh/go-spew v1.1.1 // indirect
+	github.com/goccy/go-json v0.9.11 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/golang/snappy v0.0.4 // indirect
+	github.com/google/flatbuffers v2.0.8+incompatible // indirect
+	github.com/klauspost/asmfmt v1.3.2 // indirect
+	github.com/klauspost/compress v1.15.9 // indirect
+	github.com/klauspost/cpuid/v2 v2.0.9 // indirect
+	github.com/kr/text v0.2.0 // indirect
+	github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
+	github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
+	github.com/pierrec/lz4/v4 v4.1.15 // indirect
+	github.com/pmezard/go-difflib v1.0.0 // indirect
+	github.com/zeebo/xxh3 v1.0.2 // indirect
+	golang.org/x/mod v0.8.0 // indirect
+	golang.org/x/net v0.8.0 // indirect
+	golang.org/x/sys v0.6.0 // indirect
+	golang.org/x/text v0.8.0 // indirect
+	golang.org/x/tools v0.6.0 // indirect
+	golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
+	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
+)

Review Comment:
   ```suggestion
   )
   
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] grundprinzip commented on pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "grundprinzip (via GitHub)" <gi...@apache.org>.
grundprinzip commented on PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#issuecomment-1571327620

   Thanks for merging


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] grundprinzip commented on a diff in pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "grundprinzip (via GitHub)" <gi...@apache.org>.
grundprinzip commented on code in PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#discussion_r1212561827


##########
Makefile:
##########
@@ -0,0 +1,105 @@
+#

Review Comment:
   I wrote this.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] HyukjinKwon commented on a diff in pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#discussion_r1212430527


##########
Makefile:
##########
@@ -0,0 +1,105 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FIRST_GOPATH              := $(firstword $(subst :, ,$(GOPATH)))
+PKGS                      := $(shell go list ./... | grep -v /tests | grep -v /xcpb | grep -v /gpb)
+GOFILES_NOVENDOR          := $(shell find . -name vendor -prune -o -type f -name '*.go' -not -name '*.pb.go' -print)
+GOFILES_BUILD             := $(shell find . -type f -name '*.go' -not -name '*_test.go')
+PROTOFILES                := $(shell find . -name vendor -prune -o -type f -name '*.proto' -print)
+
+ALLGOFILES				  			:= $(shell find . -type f -name '*.go')
+DATE                      := $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" '+%FT%T%z' 2>/dev/null || date -u '+%FT%T%z')
+
+BUILDFLAGS_NOPIE		  :=
+#BUILDFLAGS_NOPIE          := -trimpath -ldflags="-s -w -X main.version=$(GOPASS_VERSION) -X main.commit=$(GOPASS_REVISION) -X main.date=$(DATE)" -gcflags="-trimpath=$(GOPATH)" -asmflags="-trimpath=$(GOPATH)"
+BUILDFLAGS                ?= $(BUILDFLAGS_NOPIE) -buildmode=pie
+TESTFLAGS                 ?=
+PWD                       := $(shell pwd)
+PREFIX                    ?= $(GOPATH)
+BINDIR                    ?= $(PREFIX)/bin
+GO                        := GO111MODULE=on go
+GOOS                      ?= $(shell go version | cut -d' ' -f4 | cut -d'/' -f1)
+GOARCH                    ?= $(shell go version | cut -d' ' -f4 | cut -d'/' -f2)
+TAGS                      ?= netgo
+SHELL = bash
+
+BINARIES				  :=
+
+# Define the location of SPARK_HOME because we need that to depend on the build paths
+MAKEFILE_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
+
+PROTO_SRC = $(shell find internal/generated -type f -name *.proto )
+
+
+OK := $(shell tput setaf 6; echo ' [OK]'; tput sgr0;)
+
+all: build
+
+build: $(BUILD_OUTPUT) $(BINARIES) internal/generated.out
+
+internal/generated.out:
+	@echo -n ">> BUILD, output = $@"
+	buf generate --debug -vvv
+	@touch internal/generated.out
+	@printf '%s\n' '$(OK)'
+
+gen: internal/generated.out
+
+$(GOFILES_BUILD): gen
+
+$(BUILD_OUTPUT): $(GOFILES_BUILD)
+	@echo -n ">> BUILD, output = $@"
+	@$(GO) build -o $@ $(BUILDFLAGS)
+	@printf '%s\n' '$(OK)'
+
+check: $(ALLGOFILES) | gen
+	@echo -n ">> BUILD, output = $@"
+	@$(GO) build $(BUILDFLAGS) $^
+	@printf '%s\n' '$(OK)'
+
+lint: $(BUILD_OUTPUT)
+	@golangci-lint run
+
+fmt:
+	@gofumpt -extra -w $(ALLGOFILES)
+
+test: $(BUILD_OUTPUT)
+	@echo ">> TEST, \"verbose\""
+	@$(foreach pkg, $(PKGS),\
+	    @echo -n "     ";\
+		$(GO) test -v -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) || exit 1)
+
+fulltest: $(BUILD_OUTPUT)
+	@echo ">> TEST, \"coverage\""
+	@echo "mode: atomic" > coverage-all.out
+	@$(foreach pkg, $(PKGS),\
+	    echo -n "     ";\
+		go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -coverprofile=coverage.out -covermode=atomic $(pkg) || exit 1;\
+		tail -n +2 coverage.out >> coverage-all.out;)
+	@$(GO) tool cover -html=coverage-all.out -o coverage-all.html
+
+
+clean:
+	@echo -n ">> CLEAN"
+	@$(GO) clean -i ./...
+	@rm -rf ./internal/generated
+	@rm  -f ./internal/generated.out
+	@rm -f ./coverage-all.html
+	@rm -f ./coverage-all.out
+	@rm -f ./coverage.out
+	@find . -type f -name "coverage.out" -delete
+	@printf '%s\n' '$(OK)'

Review Comment:
   ```suggestion
   	@printf '%s\n' '$(OK)'
   
   ```



##########
.gitignore:
##########
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# All generated files
+internal/generated
+internal/generated.out
+
+# Ignore Coverage Files
+coverage*

Review Comment:
   ```suggestion
   coverage*
   
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] HyukjinKwon commented on a diff in pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#discussion_r1212431887


##########
Makefile:
##########
@@ -0,0 +1,105 @@
+#

Review Comment:
   qq, did you write this Makefile? or get it from somewhere?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] HyukjinKwon closed pull request #3: [SPARK-43895] Basic Repository Layout

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #3: [SPARK-43895] Basic Repository Layout
URL: https://github.com/apache/spark-connect-go/pull/3


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark-connect-go] grundprinzip commented on pull request #3: [Spark 43895] Basic Repository Layout

Posted by "grundprinzip (via GitHub)" <gi...@apache.org>.
grundprinzip commented on PR #3:
URL: https://github.com/apache/spark-connect-go/pull/3#issuecomment-1570122460

   Actually, I was looking at the submodule and found it too clunky, tried again and it's working quite nice, will change.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org