Skip to content

Commit

Permalink
apacheGH-43878: [Go][Release] Remove Go related codes from our releas…
Browse files Browse the repository at this point in the history
…e scripts
  • Loading branch information
raulcd committed Sep 19, 2024
1 parent a6f736c commit afc4096
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 161 deletions.
34 changes: 0 additions & 34 deletions dev/release/post-13-go.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,6 @@ update_versions() {
git add */*/*/version.rb
popd

pushd "${ARROW_DIR}/go"
find . "(" -name "*.go*" -o -name "go.mod" -o -name README.md ")" -exec sed -i.bak -E -e \
"s|(github\\.com/apache/arrow/go)/v[0-9]+|\1/v${major_version}|g" {} \;
# update parquet writer version
sed -i.bak -E -e \
"s/\"parquet-go version .+\"/\"parquet-go version ${version}\"/" \
parquet/writer_properties.go
sed -i.bak -E -e \
"s/const PkgVersion = \".*/const PkgVersion = \"${version}\"/" \
arrow/doc.go

find . -name "*.bak" -exec rm {} \;
git add .
popd

pushd "${ARROW_DIR}/docs/source"
# godoc link must reference current version, will reference v0.0.0 (2018) otherwise
sed -i.bak -E -e \
Expand Down
97 changes: 1 addition & 96 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,55 +389,6 @@ install_csharp() {
CSHARP_ALREADY_INSTALLED=1
}

install_go() {
# Install go
if [ "${GO_ALREADY_INSTALLED:-0}" -gt 0 ]; then
show_info "$(go version) already installed at $(which go)"
return 0
fi

if command -v go > /dev/null; then
show_info "Found $(go version) at $(command -v go)"
export GOPATH=${ARROW_TMPDIR}/gopath
mkdir -p $GOPATH
return 0
fi

local version=1.22.6
show_info "Installing go version ${version}..."

local arch="$(uname -m)"
if [ "$arch" == "x86_64" ]; then
arch=amd64
elif [ "$arch" == "aarch64" ]; then
arch=arm64
fi

if [ "$(uname)" == "Darwin" ]; then
local os=darwin
else
local os=linux
fi

local archive="go${version}.${os}-${arch}.tar.gz"
curl -sLO https://go.dev/dl/$archive

ls -l
local prefix=${ARROW_TMPDIR}/go
mkdir -p $prefix
tar -xzf $archive -C $prefix
rm -f $archive

export GOROOT=${prefix}/go
export GOPATH=${prefix}/gopath
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH

mkdir -p $GOPATH
show_info "$(go version) installed at $(which go)"

GO_ALREADY_INSTALLED=1
}

install_conda() {
# Setup short-lived miniconda for Python and integration tests
show_info "Ensuring that Conda is installed..."
Expand Down Expand Up @@ -586,13 +537,6 @@ maybe_setup_virtualenv() {
fi
}

maybe_setup_go() {
show_info "Ensuring that Go is installed..."
if [ "${USE_CONDA}" -eq 0 ]; then
install_go
fi
}

maybe_setup_nodejs() {
show_info "Ensuring that NodeJS is installed..."
if [ "${USE_CONDA}" -eq 0 ]; then
Expand Down Expand Up @@ -949,38 +893,6 @@ test_js() {
popd
}

test_go() {
show_header "Build and test Go libraries"

maybe_setup_go
maybe_setup_conda compilers go=1.22

pushd go
go get -v ./...
if [ ${TEST_GO} -gt 0 ]; then
go test ./...
fi
go install -buildvcs=false ./...
if [ ${TEST_INTEGRATION_GO} -gt 0 ]; then
pushd arrow/internal/cdata_integration
case "$(uname)" in
Linux)
go_lib="arrow_go_integration.so"
;;
Darwin)
go_lib="arrow_go_integration.dylib"
;;
MINGW*)
go_lib="arrow_go_integration.dll"
;;
esac
CGO_ENABLED=1 go build -buildvcs=false -tags cdata_integration,assert -buildmode=c-shared -o ${go_lib} .
popd
fi
go clean -modcache
popd
}

# Run integration tests
test_integration() {
show_header "Build and execute integration tests"
Expand Down Expand Up @@ -1009,7 +921,6 @@ test_integration() {
--with-cpp=${TEST_INTEGRATION_CPP} \
--with-java=${TEST_INTEGRATION_JAVA} \
--with-js=${TEST_INTEGRATION_JS} \
--with-go=${TEST_INTEGRATION_GO} \
$INTEGRATION_TEST_ARGS
}

Expand Down Expand Up @@ -1088,9 +999,6 @@ test_source_distribution() {

pushd $ARROW_SOURCE_DIR

if [ ${BUILD_GO} -gt 0 ]; then
test_go
fi
if [ ${TEST_CSHARP} -gt 0 ]; then
test_csharp
fi
Expand Down Expand Up @@ -1287,22 +1195,19 @@ test_jars() {
: ${TEST_RUBY:=${TEST_SOURCE}}
: ${TEST_PYTHON:=${TEST_SOURCE}}
: ${TEST_JS:=${TEST_SOURCE}}
: ${TEST_GO:=${TEST_SOURCE}}
: ${TEST_INTEGRATION:=${TEST_SOURCE}}

# For selective Integration testing, set TEST_DEFAULT=0 TEST_INTEGRATION_X=1 TEST_INTEGRATION_Y=1
: ${TEST_INTEGRATION_CPP:=${TEST_INTEGRATION}}
: ${TEST_INTEGRATION_JAVA:=${TEST_INTEGRATION}}
: ${TEST_INTEGRATION_JS:=${TEST_INTEGRATION}}
: ${TEST_INTEGRATION_GO:=${TEST_INTEGRATION}}

# Automatically build/test if its activated by a dependent
TEST_GLIB=$((${TEST_GLIB} + ${TEST_RUBY}))
BUILD_CPP=$((${TEST_CPP} + ${TEST_GLIB} + ${TEST_PYTHON} + ${TEST_INTEGRATION_CPP}))
BUILD_JAVA=$((${TEST_JAVA} + ${TEST_INTEGRATION_JAVA}))
BUILD_JS=$((${TEST_JS} + ${TEST_INTEGRATION_JS}))
BUILD_GO=$((${TEST_GO} + ${TEST_INTEGRATION_GO}))
TEST_INTEGRATION=$((${TEST_INTEGRATION} + ${TEST_INTEGRATION_CPP} + ${TEST_INTEGRATION_JAVA} + ${TEST_INTEGRATION_JS} + ${TEST_INTEGRATION_GO}))
TEST_INTEGRATION=$((${TEST_INTEGRATION} + ${TEST_INTEGRATION_CPP} + ${TEST_INTEGRATION_JAVA} + ${TEST_INTEGRATION_JS}))

# Execute tests in a conda environment
: ${USE_CONDA:=0}
Expand Down
22 changes: 6 additions & 16 deletions docs/source/developers/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ Be sure to go through on the following checklist:
git remote add <YOUR_GITHUB_ID> git@github.com:<YOUR_GITHUB_ID>/homebrew-core.git
cd -
# dev/release/post-15-homebrew.sh 10.0.0 kou
dev/release/post-15-homebrew.sh X.Y.Z <YOUR_GITHUB_ID>
# dev/release/post-14-homebrew.sh 10.0.0 kou
dev/release/post-14-homebrew.sh X.Y.Z <YOUR_GITHUB_ID>
This script pushes a ``apache-arrow-X.Y.Z`` branch to your ``Homebrew/homebrew-core`` fork. You need to create a pull request from the ``apache-arrow-X.Y.Z`` branch with ``apache-arrow, apache-arrow-glib: X.Y.Z`` title on your Web browser.

Expand All @@ -455,8 +455,8 @@ Be sure to go through on the following checklist:
git remote add upstream https://github.com/msys2/MINGW-packages.git
cd -
# dev/release/post-14-msys2.sh 10.0.0 ../MINGW-packages
dev/release/post-14-msys2.sh X.Y.Z <YOUR_MINGW_PACKAGES_FORK>
# dev/release/post-13-msys2.sh 10.0.0 ../MINGW-packages
dev/release/post-13-msys2.sh X.Y.Z <YOUR_MINGW_PACKAGES_FORK>
This script pushes a ``arrow-X.Y.Z`` branch to your ``msys2/MINGW-packages`` fork. You need to create a pull request from the ``arrow-X.Y.Z`` branch with ``arrow: Update to X.Y.Z`` title on your Web browser.

Expand Down Expand Up @@ -602,8 +602,8 @@ Be sure to go through on the following checklist:
git remote add upstream https://github.com/microsoft/vcpkg.git
cd -
# dev/release/post-16-vcpkg.sh 10.0.0 ../vcpkg
dev/release/post-16-vcpkg.sh X.Y.Z <YOUR_VCPKG_FORK>
# dev/release/post-15-vcpkg.sh 10.0.0 ../vcpkg
dev/release/post-15-vcpkg.sh X.Y.Z <YOUR_VCPKG_FORK>
This script pushes a ``arrow-X.Y.Z`` branch to your ``microsoft/vcpkg`` fork. You need to create a pull request from the ``arrow-X.Y.Z`` branch with ``[arrow] Update to X.Y.Z`` title on your Web browser.

Expand Down Expand Up @@ -646,16 +646,6 @@ Be sure to go through on the following checklist:
# dev/release/post-12-bump-versions.sh 10.0.0 11.0.0
dev/release/post-12-bump-versions.sh X.Y.Z NEXT_X.NEXT_Y.NEXT_Z
.. dropdown:: Update tags for Go modules
:animate: fade-in-slide-down
:class-title: sd-fs-5
:class-container: sd-shadow-md

.. code-block:: Bash
# dev/release/post-13-go.sh 10.0.0
dev/release/post-13-go.sh X.Y.Z
.. dropdown:: Update docs
:animate: fade-in-slide-down
:class-title: sd-fs-5
Expand Down

0 comments on commit afc4096

Please sign in to comment.