You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by sh...@apache.org on 2019/07/13 09:05:07 UTC
[arrow] branch master updated: ARROW-5939: [Release] Add support
for generating vote email template separately
This is an automated email from the ASF dual-hosted git repository.
shiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 5c23e98 ARROW-5939: [Release] Add support for generating vote email template separately
5c23e98 is described below
commit 5c23e98f0e645e621cad9e86ed5c8888adf15366
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Jul 13 18:04:50 2019 +0900
ARROW-5939: [Release] Add support for generating vote email template separately
Author: Sutou Kouhei <ko...@clear-code.com>
Closes #4870 from kou/release-source-vote and squashes the following commits:
b98b7388d <Sutou Kouhei> Add support for generating vote email template separately
---
dev/release/02-source-test.rb | 58 +++++++++++++++++++++++++++++++++++++---
dev/release/02-source.sh | 62 +++++++++++++++++++++++--------------------
dev/release/test-helper.rb | 4 +++
3 files changed, 91 insertions(+), 33 deletions(-)
diff --git a/dev/release/02-source-test.rb b/dev/release/02-source-test.rb
index cf3c887..ac911cd 100644
--- a/dev/release/02-source-test.rb
+++ b/dev/release/02-source-test.rb
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-require "rexml/document"
-
class SourceTest < Test::Unit::TestCase
include GitRunnable
include VersionDetectable
@@ -42,13 +40,14 @@ class SourceTest < Test::Unit::TestCase
targets.each do |target|
env["SOURCE_#{target}"] = "1"
end
- sh(env, @script, @release_version, "0")
+ output = sh(env, @script, @release_version, "0")
sh("tar", "xf", "#{@tag_name}.tar.gz")
+ output
end
def test_symbolic_links
source
- Dir.chdir("#{@tag_name}") do
+ Dir.chdir(@tag_name) do
assert_equal([],
Find.find(".").find_all {|path| File.symlink?(path)})
end
@@ -98,4 +97,55 @@ class SourceTest < Test::Unit::TestCase
Dir.glob("dist/pyarrow-*.tar.gz"))
end
end
+
+ def test_vote
+ jira_url = "https://issues.apache.org/jira"
+ jql_conditions = [
+ "project = ARROW",
+ "status in (Resolved, Closed)",
+ "fixVersion = #{@release_version}",
+ ]
+ jql = jql_conditions.join(" AND ")
+ n_resolved_issues = nil
+ open("#{jira_url}/rest/api/2/search?jql=#{CGI.escape(jql)}") do |response|
+ n_resolved_issues = JSON.parse(response.read)["total"]
+ end
+ output = source("VOTE")
+ assert_equal(<<-VOTE.strip, output[/^-+$(.+?)^-+$/m, 1].strip)
+To: dev@arrow.apache.org
+Subject: [VOTE] Release Apache Arrow #{@release_version} - RC0
+
+Hi,
+
+I would like to propose the following release candidate (RC0) of Apache
+Arrow version #{@release_version}. This is a release consiting of #{n_resolved_issues}
+resolved JIRA issues[1].
+
+This release candidate is based on commit:
+#{@current_commit} [2]
+
+The source release rc0 is hosted at [3].
+The binary artifacts are hosted at [4][5][6][7].
+The changelog is located at [8].
+
+Please download, verify checksums and signatures, run the unit tests,
+and vote on the release. See [9] for how to validate a release candidate.
+
+The vote will be open for at least 72 hours.
+
+[ ] +1 Release this as Apache Arrow #{@release_version}
+[ ] +0
+[ ] -1 Do not release this as Apache Arrow #{@release_version} because...
+
+[1]: https://issues.apache.org/jira/issues/?jql=project%20%3D%20ARROW%20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20fixVersion%20%3D%20#{@release_version}
+[2]: https://github.com/apache/arrow/tree/#{@current_commit}
+[3]: https://dist.apache.org/repos/dist/dev/arrow/apache-arrow-#{@release_version}-rc0
+[4]: https://bintray.com/apache/arrow/centos-rc/#{@release_version}-rc0
+[5]: https://bintray.com/apache/arrow/debian-rc/#{@release_version}-rc0
+[6]: https://bintray.com/apache/arrow/python-rc/#{@release_version}-rc0
+[7]: https://bintray.com/apache/arrow/ubuntu-rc/#{@release_version}-rc0
+[8]: https://github.com/apache/arrow/blob/#{@current_commit}/CHANGELOG.md
+[9]: https://cwiki.apache.org/confluence/display/ARROW/How+to+Verify+Release+Candidates
+ VOTE
+ end
end
diff --git a/dev/release/02-source.sh b/dev/release/02-source.sh
index ca192a8..f70503a 100755
--- a/dev/release/02-source.sh
+++ b/dev/release/02-source.sh
@@ -21,9 +21,10 @@
set -e
: ${SOURCE_DEFAULT:=1}
-: ${SOURCE_UPLOAD:=${SOURCE_DEFAULT}}
: ${SOURCE_GLIB:=${SOURCE_DEFAULT}}
: ${SOURCE_RAT:=${SOURCE_DEFAULT}}
+: ${SOURCE_UPLOAD:=${SOURCE_DEFAULT}}
+: ${SOURCE_VOTE:=${SOURCE_DEFAULT}}
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOURCE_TOP_DIR="$(cd "${SOURCE_DIR}/../../" && pwd)"
@@ -38,6 +39,7 @@ rc=$2
tag=apache-arrow-${version}
tagrc=${tag}-rc${rc}
+rc_url="https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"
echo "Preparing source for tag ${tag}"
@@ -124,54 +126,56 @@ if [ ${SOURCE_UPLOAD} -gt 0 ]; then
# clean up
rm -rf tmp
- rc_url="https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"
echo "Success! The release candidate is available here:"
echo " ${rc_url}"
echo ""
echo "Commit SHA1: ${release_hash}"
echo ""
+fi
+
+if [ ${SOURCE_VOTE} -gt 0 ]; then
echo "The following draft email has been created to send to the"
echo "dev@arrow.apache.org mailing list"
echo ""
echo "---------------------------------------------------------"
- # jira_url="https://issues.apache.org/jira"
+ jira_url="https://issues.apache.org/jira"
jql="project%20%3D%20ARROW%20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20fixVersion%20%3D%20${version}"
n_resolved_issues=$(curl "${jira_url}/rest/api/2/search/?jql=${jql}" | jq ".total")
cat <<MAIL
- To: dev@arrow.apache.org
- Subject: [VOTE] Release Apache Arrow ${version} - RC${rc}
+To: dev@arrow.apache.org
+Subject: [VOTE] Release Apache Arrow ${version} - RC${rc}
- Hi,
+Hi,
- I would like to propose the following release candidate (RC${rc}) of Apache
- Arrow version ${version}. This is a release consiting of ${n_resolved_issues}
- resolved JIRA issues[1].
+I would like to propose the following release candidate (RC${rc}) of Apache
+Arrow version ${version}. This is a release consiting of ${n_resolved_issues}
+resolved JIRA issues[1].
- This release candidate is based on commit:
- ${release_hash} [2]
+This release candidate is based on commit:
+${release_hash} [2]
- The source release rc${rc} is hosted at [3].
- The binary artifacts are hosted at [4][5][6][7].
- The changelog is located at [8].
+The source release rc${rc} is hosted at [3].
+The binary artifacts are hosted at [4][5][6][7].
+The changelog is located at [8].
- Please download, verify checksums and signatures, run the unit tests,
- and vote on the release. See [9] for how to validate a release candidate.
+Please download, verify checksums and signatures, run the unit tests,
+and vote on the release. See [9] for how to validate a release candidate.
- The vote will be open for at least 72 hours.
+The vote will be open for at least 72 hours.
- [ ] +1 Release this as Apache Arrow ${version}
- [ ] +0
- [ ] -1 Do not release this as Apache Arrow ${version} because...
+[ ] +1 Release this as Apache Arrow ${version}
+[ ] +0
+[ ] -1 Do not release this as Apache Arrow ${version} because...
- [1]: ${jira_url}/issues/?jql=${jql}
- [2]: https://github.com/apache/arrow/tree/${release_hash}
- [3]: ${rc_url}
- [4]: https://bintray.com/apache/arrow/centos-rc/${version}-rc${rc}
- [5]: https://bintray.com/apache/arrow/debian-rc/${version}-rc${rc}
- [6]: https://bintray.com/apache/arrow/python-rc/${version}-rc${rc}
- [7]: https://bintray.com/apache/arrow/ubuntu-rc/${version}-rc${rc}
- [8]: https://github.com/apache/arrow/blob/${release_hash}/CHANGELOG.md
- [9]: https://cwiki.apache.org/confluence/display/ARROW/How+to+Verify+Release+Candidates
+[1]: ${jira_url}/issues/?jql=${jql}
+[2]: https://github.com/apache/arrow/tree/${release_hash}
+[3]: ${rc_url}
+[4]: https://bintray.com/apache/arrow/centos-rc/${version}-rc${rc}
+[5]: https://bintray.com/apache/arrow/debian-rc/${version}-rc${rc}
+[6]: https://bintray.com/apache/arrow/python-rc/${version}-rc${rc}
+[7]: https://bintray.com/apache/arrow/ubuntu-rc/${version}-rc${rc}
+[8]: https://github.com/apache/arrow/blob/${release_hash}/CHANGELOG.md
+[9]: https://cwiki.apache.org/confluence/display/ARROW/How+to+Verify+Release+Candidates
MAIL
echo "---------------------------------------------------------"
fi
diff --git a/dev/release/test-helper.rb b/dev/release/test-helper.rb
index 1dad543..5670944 100644
--- a/dev/release/test-helper.rb
+++ b/dev/release/test-helper.rb
@@ -16,7 +16,11 @@
# under the License.
require "English"
+require "cgi/util"
require "find"
+require "json"
+require "open-uri"
+require "rexml/document"
require "tempfile"
require "tmpdir"