From afc409609c68357ef711bf2b058d35c1c04e19aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 19 Sep 2024 12:32:05 +0200 Subject: [PATCH 1/4] GH-43878: [Go][Release] Remove Go related codes from our release scripts --- dev/release/post-13-go.sh | 34 ------- .../{post-14-msys2.sh => post-13-msys2.sh} | 0 ...ost-15-homebrew.sh => post-14-homebrew.sh} | 0 .../{post-16-vcpkg.sh => post-15-vcpkg.sh} | 0 .../{post-17-conan.sh => post-16-conan.sh} | 0 dev/release/utils-prepare.sh | 15 --- dev/release/verify-release-candidate.sh | 97 +------------------ docs/source/developers/release.rst | 22 ++--- 8 files changed, 7 insertions(+), 161 deletions(-) delete mode 100755 dev/release/post-13-go.sh rename dev/release/{post-14-msys2.sh => post-13-msys2.sh} (100%) rename dev/release/{post-15-homebrew.sh => post-14-homebrew.sh} (100%) rename dev/release/{post-16-vcpkg.sh => post-15-vcpkg.sh} (100%) rename dev/release/{post-17-conan.sh => post-16-conan.sh} (100%) diff --git a/dev/release/post-13-go.sh b/dev/release/post-13-go.sh deleted file mode 100755 index 7c60348379564..0000000000000 --- a/dev/release/post-13-go.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/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 -ue - -SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " - exit -fi - -version=$1 -version_tag="apache-arrow-${version}" -go_arrow_tag="go/v${version}" - -git tag "${go_arrow_tag}" "${version_tag}" -git push apache "${go_arrow_tag}" diff --git a/dev/release/post-14-msys2.sh b/dev/release/post-13-msys2.sh similarity index 100% rename from dev/release/post-14-msys2.sh rename to dev/release/post-13-msys2.sh diff --git a/dev/release/post-15-homebrew.sh b/dev/release/post-14-homebrew.sh similarity index 100% rename from dev/release/post-15-homebrew.sh rename to dev/release/post-14-homebrew.sh diff --git a/dev/release/post-16-vcpkg.sh b/dev/release/post-15-vcpkg.sh similarity index 100% rename from dev/release/post-16-vcpkg.sh rename to dev/release/post-15-vcpkg.sh diff --git a/dev/release/post-17-conan.sh b/dev/release/post-16-conan.sh similarity index 100% rename from dev/release/post-17-conan.sh rename to dev/release/post-16-conan.sh diff --git a/dev/release/utils-prepare.sh b/dev/release/utils-prepare.sh index 6ba8b22a06e89..ecdd0a26dcb7a 100644 --- a/dev/release/utils-prepare.sh +++ b/dev/release/utils-prepare.sh @@ -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 \ diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh index 8aaffb591b0cf..54aa51f886aa1 100755 --- a/dev/release/verify-release-candidate.sh +++ b/dev/release/verify-release-candidate.sh @@ -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..." @@ -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 @@ -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" @@ -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 } @@ -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 @@ -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} diff --git a/docs/source/developers/release.rst b/docs/source/developers/release.rst index 0d9af1f543cac..55f3d5603ed05 100644 --- a/docs/source/developers/release.rst +++ b/docs/source/developers/release.rst @@ -429,8 +429,8 @@ Be sure to go through on the following checklist: git remote add git@github.com:/homebrew-core.git cd - - # dev/release/post-15-homebrew.sh 10.0.0 kou - dev/release/post-15-homebrew.sh X.Y.Z + # dev/release/post-14-homebrew.sh 10.0.0 kou + dev/release/post-14-homebrew.sh X.Y.Z 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. @@ -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 + # dev/release/post-13-msys2.sh 10.0.0 ../MINGW-packages + dev/release/post-13-msys2.sh X.Y.Z 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. @@ -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 + # dev/release/post-15-vcpkg.sh 10.0.0 ../vcpkg + dev/release/post-15-vcpkg.sh X.Y.Z 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. @@ -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 From 42dd7f3b2ed3e9ca78f4d2449929f0959e990abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 19 Sep 2024 12:52:46 +0200 Subject: [PATCH 2/4] Remove bump go versions from test bump scripts --- dev/release/01-prepare-test.rb | 14 ------ dev/release/post-12-bump-versions-test.rb | 57 ----------------------- 2 files changed, 71 deletions(-) diff --git a/dev/release/01-prepare-test.rb b/dev/release/01-prepare-test.rb index fec99ef058c5b..ca53b7f8fdee5 100644 --- a/dev/release/01-prepare-test.rb +++ b/dev/release/01-prepare-test.rb @@ -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: [ diff --git a/dev/release/post-12-bump-versions-test.rb b/dev/release/post-12-bump-versions-test.rb index f31e1a3122814..d3d2f9be8eebd 100644 --- a/dev/release/post-12-bump-versions-test.rb +++ b/dev/release/post-12-bump-versions-test.rb @@ -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 = "#{@snapshot_version}" lines = File.readlines(path, chomp: true) From c137858807ef955c37c946ae93b4a1c17ba47397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 23 Sep 2024 11:41:30 +0200 Subject: [PATCH 3/4] Change https://pkg.go.dev/github.com/apache/arrow/go/v18 to https://arrow.apache.org/go/ --- docs/source/index.rst | 2 +- r/_pkgdown.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 6f38ab668d883..3e678c78b6963 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -104,7 +104,7 @@ Implementations C/GLib C++ C# - Go + Go Java JavaScript Julia diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml index 10a233356b684..00bbafb55c5e3 100644 --- a/r/_pkgdown.yml +++ b/r/_pkgdown.yml @@ -76,7 +76,7 @@ home: [C GLib](https://arrow.apache.org/docs/c_glib)
[C++](https://arrow.apache.org/docs/cpp)
[C#](https://github.com/apache/arrow/blob/main/csharp/README.md)
- [Go](https://pkg.go.dev/github.com/apache/arrow/go/v18)
+ [Go](https://arrow.apache.org/go/)
[Java](https://arrow.apache.org/docs/java)
[JavaScript](https://arrow.apache.org/docs/js)
[Julia](https://github.com/apache/arrow-julia/blob/main/README.md)
From 7907870a854b21ec23b18429a10deaafe4469f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Thu, 3 Oct 2024 10:51:13 +0200 Subject: [PATCH 4/4] Remove unnecessary checks on go docs on bump version --- dev/release/post-12-bump-versions-test.rb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dev/release/post-12-bump-versions-test.rb b/dev/release/post-12-bump-versions-test.rb index d3d2f9be8eebd..9af334c496fe6 100644 --- a/dev/release/post-12-bump-versions-test.rb +++ b/dev/release/post-12-bump-versions-test.rb @@ -210,15 +210,6 @@ def test_version_post_tag ["+ (#{@next_major_version}, 0),"], ], }, - { - path: "docs/source/index.rst", - hunks: [ - [ - "- Go ", - "+ Go ", - ], - ], - }, { path: "r/pkgdown/assets/versions.json", hunks: [ @@ -234,15 +225,6 @@ def test_version_post_tag ], ], }, - { - path: "r/_pkgdown.yml", - hunks: [ - [ - "- [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@snapshot_major_version})
", - "+ [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@next_major_version})
", - ], - ], - }, ] else expected_changes += [