You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "raulcd (via GitHub)" <gi...@apache.org> on 2024/09/10 08:07:35 UTC

[PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

raulcd opened a new pull request, #117:
URL: https://github.com/apache/arrow-go/pull/117

   Fix GH-9
   
   This part: https://github.com/apache/arrow/blob/58415d1fac50cb829b3dcf08526033d6db8c30db/.github/workflows/go.yml#L233-L270


-- 
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: github-unsubscribe@arrow.apache.org

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


Re: [PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #117:
URL: https://github.com/apache/arrow-go/pull/117#issuecomment-2340278376

   I had to add `-buildvcs=false` to have the docker compose run successful locally but it does not seem to be required for CI, see the last commit removing it: https://github.com/apache/arrow-go/pull/117/commits/116c724e762b66f92f969dd1284b5ff3ce66e0a8
   It seems we are adding it on the non-cgo build, do we want to add it? If that's the case I can just revert the last commit


-- 
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: github-unsubscribe@arrow.apache.org

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


Re: [PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #117:
URL: https://github.com/apache/arrow-go/pull/117#discussion_r1752945682


##########
.github/workflows/test.yml:
##########
@@ -129,6 +129,46 @@ jobs:
         continue-on-error: true
         run: |
           docker compose push debian-cgo
+  docker_cgo_python:

Review Comment:
   ```suggestion
     docker-cgo-python:
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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


Re: [PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #117:
URL: https://github.com/apache/arrow-go/pull/117#discussion_r1751774560


##########
ci/scripts/go_cgo_python_test.sh:
##########
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+#
+# 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.
+
+set -ex

Review Comment:
   Could you add `-u` to detect typo in variable name?
   
   ```suggestion
   set -eux
   ```



##########
compose.yaml:
##########
@@ -64,3 +64,21 @@ services:
     environment:
       ARROW_GO_TESTCGO: "1"
     command: *go-command
+  debian-cgo-python:
+    # Usage:
+    #   docker compose build debian-cgo-python

Review Comment:
   ```suggestion
       #   docker compose build debian
       #   docker compose build debian-cgo-python
   ```



##########
ci/docker/debian-12-cgo-python.dockerfile:
##########


Review Comment:
   Could you remove the `-12` part?
   This doesn't depend on Debian version.



##########
ci/scripts/go_cgo_python_test.sh:
##########


Review Comment:
   Could you remove `go_` because it's redundant in this repository?



##########
ci/scripts/go_cgo_python_test.sh:
##########
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+#
+# 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.
+
+set -ex
+
+source_dir=${1}
+
+if [ -n "${ARROW_PYTHON_VENV:-}" ]; then
+  # shellcheck disable=SC1091
+  . "${ARROW_PYTHON_VENV}/bin/activate"
+fi
+
+export GOFLAGS="${GOFLAGS} -gcflags=all=-d=checkptr"
+
+pushd "${source_dir}/arrow/cdata/test"
+
+case "$(uname)" in
+Linux)
+  testlib="cgotest.so"
+  ;;
+Darwin)
+  testlib="cgotest.so"
+  ;;
+MINGW*)
+  testlib="cgotest.dll"
+  ;;

Review Comment:
   How about the following? It aligns the Python implementation: https://github.com/apache/arrow-go/blob/3efb5f8480a73ee86e4948f2dfbf774e3c73a298/arrow/cdata/test/test_export_to_cgo.py#L30-L33
   
   ```suggestion
   MINGW*)
     testlib="cgotest.dll"
     ;;
   *)
     testlib="cgotest.so"
     ;;
   ```



-- 
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: github-unsubscribe@arrow.apache.org

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


Re: [PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou merged PR #117:
URL: https://github.com/apache/arrow-go/pull/117


-- 
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: github-unsubscribe@arrow.apache.org

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


Re: [PR] GH-9: Add test CI: Debian + CGO + Python [arrow-go]

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on PR #117:
URL: https://github.com/apache/arrow-go/pull/117#issuecomment-2340842603

   > Could you share the error message when you don't use `-buildvcs=false` on local?
   
   It seems it failed locally when I wasn't correctly setting:
   `git config --global --add safe.directory /arrow-go && ` but I was doing `git config --global --add safe.directory /arrow && `
   I was getting:
   ```
   + go build -tags cdata_test,assert -buildmode=c-shared -o cgotest.so .
   error obtaining VCS status: exit status 128
   	Use -buildvcs=false to disable VCS stamping.
   ```
   It is not reproducible at the moment with the correct folder, sorry, I got confused.


-- 
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: github-unsubscribe@arrow.apache.org

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