Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-43878: [Go][Release] Remove Go related codes from our release scripts #44172

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions dev/release/01-prepare-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,6 @@ def test_version_pre_tag
]
end
expected_changes += [
{
path: "go/arrow/doc.go",
hunks: [
["-const PkgVersion = \"#{@snapshot_version}\"",
"+const PkgVersion = \"#{@release_version}\""],
],
},
{
path: "go/parquet/writer_properties.go",
hunks: [
["-\tDefaultCreatedBy = \"parquet-go version #{@snapshot_version}\"",
"+\tDefaultCreatedBy = \"parquet-go version #{@release_version}\""],
],
},
{
path: "js/package.json",
hunks: [
Expand Down
57 changes: 0 additions & 57 deletions dev/release/post-12-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,63 +260,6 @@ def test_version_post_tag
]
end

Dir.glob("go/**/{go.mod,*.go,*.go.*,README.md}") do |path|
if path == "go/arrow/doc.go"
expected_changes << {
path: path,
hunks: [
[
"-const PkgVersion = \"#{@snapshot_version}\"",
"+const PkgVersion = \"#{@next_snapshot_version}\"",
],
]
}
next
end

import_path = "github.com/apache/arrow/go/v#{@snapshot_major_version}"
hunks = []
if next_release_type == :major
lines = File.readlines(path, chomp: true)
target_lines = lines.each_with_index.select do |line, i|
line.include?(import_path)
end
next if target_lines.empty?
n_context_lines = 3 # The default of Git's diff.context
target_hunks = [[target_lines.first[0]]]
previous_i = target_lines.first[1]
target_lines[1..-1].each do |line, i|
if i - previous_i < n_context_lines
target_hunks.last << line
else
target_hunks << [line]
end
previous_i = i
end
target_hunks.each do |lines|
hunk = []
lines.each do |line,|
hunk << "-#{line}"
end
lines.each do |line|
new_line = line.gsub("v#{@snapshot_major_version}") do
"v#{@next_major_version}"
end
hunk << "+#{new_line}"
end
hunks << hunk
end
end
if path == "go/parquet/writer_properties.go"
hunks << [
"-\tDefaultCreatedBy = \"parquet-go version #{@snapshot_version}\"",
"+\tDefaultCreatedBy = \"parquet-go version #{@next_snapshot_version}\"",
]
end
next if hunks.empty?
expected_changes << {hunks: hunks, path: path}
end

Dir.glob("java/**/pom.xml") do |path|
version = "<version>#{@snapshot_version}</version>"
lines = File.readlines(path, chomp: true)
Expand Down
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
Loading