[KYUUBI #6559] Various improvments for release scripts

# 🔍 Description

This PR contains various improvement for Kyuubi release scripts:

- update known_translations
- improve `pre_gen_release_notes.py` to generate the copy-paste contributor list
- update vote and announcement mail templates

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

Manually tested and self reviewed.

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6559 from pan3793/rel-scripts.

Closes #6559

78aad0500 [Cheng Pan] Various improvments for release scripts

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
Cheng Pan 2024-07-23 21:15:52 +08:00
parent 0f6d7643ae
commit 05cb5b4112
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D
6 changed files with 79 additions and 103 deletions

View File

@ -19,8 +19,10 @@
# The format expected on each line should be: <GitHub ID> - <Full Name>
AngersZhuuuu - Yi Zhu
ASiegeLion - Peiyue Liu
bkyryliuk - Bogdan Kyryliuk
bowenliang123 - Bowen Liang
BruceWong96 - Bruce Wong
camper42 - Fengyu Cao
CavemanIV - Liang Zhang
cxzl25 - Shaoyun Chen
davidyuan1223 - David Yuan
@ -42,16 +44,22 @@ lightning_L - Tianlin Liao
liunaijie - Naijie Liu
liuxiaocs7 - Xiao Liu
lsm1 - Senmiao Liu
jiaoqingbo - Qingbo Jiao
junjiem - Junjie Ma
mattshma - Ming Ma
merrily01 - Ruilei Ma
minyk - Drake Youngkun Min
packyan - Deng An
panbingkun - BingKun Pan
dupen01 - Perl Du
QianyongY - Yong Qian
SteNicholas - Nicholas Jiang
sudohainguyen - Harry
thomasg19930417 - Xu Guo
turboFei - Fei Wang
ulysses-you - Xiduo You
vinoyang - Vino Yang
Wang, Fei - Fei Wang
wangmiao1002 - Miao Wang
waywtdcc - Chao Chen
wForget - Zhen Wang
@ -59,8 +67,10 @@ Xieming LI - Xieming Li
XorSum - Baokun Han
yabola - Chenliang Lu
yanghua - Vino Yang
yikf - Kaifei Yi
Yikf - Kaifei Yi
ymZhao1001 - Yangming Zhao
Z1Wu - Ziyi Wu
zhaohehuhu - He Zhao
zhaomin1423 - Min Zhao
zhouyifan279 - Yifan Zhou

View File

@ -176,19 +176,9 @@ known_translations_file.close()
# Keep track of warnings to tell the user at the end
warnings = []
# Mapping from the invalid author name to its associated tickets
# E.g. pan3793 -> set("[KYUUBI #1234]", "[KYUUBI #1235]")
invalid_authors = {}
# Populate a map that groups issues and components by author
# It takes the form: Author Name -> set()
# For instance,
# {
# 'Cheng Pan' -> set('[KYUUBI #1234]', '[KYUUBI #1235]'),
# 'Fu Chen' -> set('[KYUUBI #2345]')
# }
#
author_info = {}
# The author name that needs to translate
invalid_authors = set()
authors = set()
print("\n=========================== Compiling contributor list ===========================")
for commit in effective_commits:
_hash = commit.get_hash()
@ -204,21 +194,8 @@ for commit in effective_commits:
# with all associated issues so we can translate it later
author = capitalize_author(author)
else:
if author not in invalid_authors:
invalid_authors[author] = set()
for issue in issues:
invalid_authors[author].add(issue)
# Populate or merge an issue into author_info[author]
def populate(issues):
if author not in author_info:
author_info[author] = set()
for issue in issues:
author_info[author].add(issue)
# Find issues associated with this commit
try:
populate(issues)
except Exception as e:
print("Unexpected error:", e)
invalid_authors.add(author)
authors.add(author)
print(" Processed commit %s authored by %s on %s" % (_hash, author, date))
print("==================================================================================\n")
@ -232,17 +209,14 @@ commits_file.close()
print("Commits list is successfully written to %s!" % commits_file_name)
# Write to contributors file ordered by author names
# Each line takes the format " * Author Name -- tickets"
# e.g. * Cheng Pan -- [KYUUBI #1234][KYUUBI #1235]
# e.g. * Fu Chen -- [KYUUBI #2345]
# Each line takes the format " * Author Name"
# e.g. * Cheng Pan
# e.g. * Fu Chen
contributors_file = open(os.path.join(release_dir, contributors_file_name), "w")
authors = list(author_info.keys())
authors.sort(key=lambda author: author.split(" ")[-1])
author_max_len = max(len(author) for author in authors)
sorted_authors = list(authors)
sorted_authors.sort(key=lambda author: author.split(" ")[-1])
for author in authors:
contribution = "".join(author_info[author])
line = ("* {:<%s}" % author_max_len).format(author) + " -- " + contribution
contributors_file.write(line + "\n")
contributors_file.write("* %s\n" % author)
contributors_file.close()
print("Contributors list is successfully written to %s!" % contributors_file_name)

View File

@ -24,53 +24,45 @@ RELEASE_DIR="$(cd "$(dirname "$0")"/..; pwd)"
######### Please modify the variables ##########
# release version, e.g. 1.7.0
release_version=${release_version:-""}
RELEASE_VERSION=${RELEASE_VERSION:-""}
################################################
if [[ -z $release_version ]]; then
echo "Please input release version"
if [[ -z $RELEASE_VERSION ]]; then
echo "Please input release version, e.g. 1.7.0"
exit 1
fi
echo "Release version: ${release_version}"
echo "Release version: ${RELEASE_VERSION}"
RELEASE_TEMP_DIR=${RELEASE_DIR}/tmp
mkdir -p ${RELEASE_TEMP_DIR}
ANNOUNCE=${RELEASE_TEMP_DIR}/${release_version}_announce.temp
ANNOUNCE=${RELEASE_TEMP_DIR}/v${RELEASE_VERSION}_announce.temp
cat >$ANNOUNCE<<EOF
Title: [ANNOUNCE] Apache Kyuubi released ${release_version}
Title: [ANNOUNCE] Apache Kyuubi v${RELEASE_VERSION} is available
Content:
Hi all,
The Apache Kyuubi community is pleased to announce that
Apache Kyuubi ${release_version} has been released!
Apache Kyuubi v${RELEASE_VERSION} has been released!
Apache Kyuubi is a distributed and multi-tenant gateway to provide
serverless SQL on data warehouses and lakehouses.
Apache Kyuubi is a distributed and multi-tenant gateway to provide
serverless SQL on Data Warehouses and Lakehouses.
Kyuubi provides a pure SQL gateway through Thrift JDBC/ODBC interface
for end-users to manipulate large-scale data with pre-programmed and
extensible Spark SQL engines.
We are aiming to make Kyuubi an "out-of-the-box" tool for data warehouses
and lakehouses.
This "out-of-the-box" model minimizes the barriers and costs for end-users
to use Spark at the client side.
At the server-side, Kyuubi server and engine's multi-tenant architecture
provides the administrators a way to achieve computing resource isolation,
data security, high availability, high client concurrency, etc.
Kyuubi builds distributed SQL query engines on top of various kinds of
modern computing frameworks, e.g., Apache Spark, Apache Flink, Apache
Doris, Apache Hive, Trino, and StarRocks, etc., to query massive datasets
distributed over fleets of machines from heterogeneous data sources.
The full release notes and download links are available at:
Release Notes: https://kyuubi.apache.org/release/${release_version}.html
Release Notes: https://kyuubi.apache.org/release/${RELEASE_VERSION}.html
To learn more about Apache Kyuubi, please see
https://kyuubi.apache.org/
Kyuubi Resources:
- Documentation: https://kyuubi.readthedocs.io/en/v${RELEASE_VERSION}/
- Issue: https://github.com/apache/kyuubi/issues
- Mailing list: dev@kyuubi.apache.org

View File

@ -23,89 +23,89 @@ set -e
RELEASE_DIR="$(cd "$(dirname "$0")"/..; pwd)"
######### Please modify the variables ##########
# release version, e.g. v1.7.0
release_version=${release_version:-""}
# release candidate number, e.g. rc2
release_rc_no=${release_rc_no:-""}
# previous release candidate number, e.g. rc1, could be empty if it is the first vote
prev_release_rc_no=${prev_release_rc_no:-""}
# previous release version, e.g. v1.7.0, this is used to generate change log
prev_release_version=${prev_release_version:-""}
# release version, e.g. 1.7.1
RELEASE_VERSION=${RELEASE_VERSION:-""}
# release candidate number, e.g. 2
RELEASE_RC_NO=${RELEASE_RC_NO:-""}
# previous release candidate number, e.g. 1, could be empty if it is the first vote
PREV_RELEASE_RC_NO=${PREV_RELEASE_RC_NO:-""}
# previous release version, e.g. 1.7.0, this is used to generate change log
PREV_RELEASE_VERSION=${PREV_RELEASE_VERSION:-""}
# staging repository number, check it under https://repository.apache.org/content/repositories
repo_no=${repo_no:-""}
REPO_NO=${REPO_NO:-""}
################################################
if [[ -z $release_version ]]; then
echo "Please input release version"
if [[ -z $RELEASE_VERSION ]]; then
echo "Please input RELEASE_VERSION, e.g. 1.7.1"
exit 1
fi
if [[ -z $release_rc_no ]]; then
echo "Please input release rc number"
if [[ -z $RELEASE_RC_NO ]]; then
echo "Please input RELEASE_RC_NO, e.g. 2"
exit 1
fi
if [[ -z $prev_release_version ]]; then
echo "Please input prev release version which is used to generate change log"
if [[ -z $PREV_RELEASE_VERSION ]]; then
echo "Please input PREV_RELEASE_VERSION which is used to generate change log, e.g. 1.7.0"
exit 1
fi
if [[ -z $repo_no ]]; then
if [[ -z $REPO_NO ]]; then
echo "Please input staging repository number, check it under https://repository.apache.org/content/repositories "
exit 1
fi
release_rc_tag=${release_version}-${release_rc_no}
git_commit_hash=$(git rev-list -n 1 $release_rc_tag)
RELEASE_RC_TAG=v${RELEASE_VERSION}-rc${RELEASE_RC_NO}
GIT_COMMIT_HASH=$(git rev-list -n 1 $RELEASE_RC_TAG)
echo "Release version: ${release_version}"
echo "Release candidate number: ${release_rc_no}"
echo "Previous release candidate number: ${prev_release_rc_no}"
echo "Staging repository number: ${repo_no}"
echo "Release candidate tag: ${release_rc_tag}"
echo "Release candidate tag commit hash: ${git_commit_hash}"
echo "Release version: v${RELEASE_VERSION}"
echo "Release candidate number: RC${RELEASE_RC_NO}"
echo "Previous release candidate number: RC${PREV_RELEASE_RC_NO}"
echo "Staging repository number: ${REPO_NO}"
echo "Release candidate tag: ${RELEASE_RC_TAG}"
echo "Release candidate tag commit hash: ${GIT_COMMIT_HASH}"
if [[ ! -z "$prev_release_rc_no" ]]; then
prev_release_rc_tag=${release_version}-${prev_release_rc_no}
change_from_pre_commit="
The commit list since the ${prev_release_rc_no}:
https://github.com/apache/kyuubi/compare/${prev_release_rc_tag}...${release_rc_tag}
if [[ ! -z "$PREV_RELEASE_RC_NO" ]]; then
PREV_RELEASE_RC_TAG=v${RELEASE_VERSION}-rc${PREV_RELEASE_RC_NO}
CHANGE_FROM_PRE_COMMIT="
The commit list since the previous RC:
https://github.com/apache/kyuubi/compare/${PREV_RELEASE_RC_TAG}...${RELEASE_RC_TAG}
"
fi
RELEASE_TEMP_DIR=${RELEASE_DIR}/tmp
mkdir -p ${RELEASE_TEMP_DIR}
DEV_VOTE=${RELEASE_TEMP_DIR}/${release_rc_tag}_dev_vote.temp
DEV_VOTE=${RELEASE_TEMP_DIR}/${RELEASE_RC_TAG}_dev_vote.temp
cat >${DEV_VOTE}<<EOF
Title: [VOTE] Release Apache Kyuubi ${release_version} ${release_rc_no}
Title: [VOTE] Release Apache Kyuubi v${RELEASE_VERSION} RC${RELEASE_RC_NO}
Content:
Hello Apache Kyuubi PMC and Community,
Please vote on releasing the following candidate as
Apache Kyuubi version ${release_version}.
Apache Kyuubi v${RELEASE_VERSION}.
The VOTE will remain open for at least 72 hours.
[ ] +1 Release this package as Apache Kyuubi ${release_version}
[ ] +1 Release this package as Apache Kyuubi v${RELEASE_VERSION}
[ ] +0
[ ] -1 Do not release this package because ...
To learn more about Apache Kyuubi, please see
https://kyuubi.apache.org/
The tag to be voted on is ${release_rc_tag} (commit ${git_commit_hash}):
https://github.com/apache/kyuubi/tree/${release_rc_tag}
The tag to be voted on is ${RELEASE_RC_TAG} (commit ${GIT_COMMIT_HASH}):
https://github.com/apache/kyuubi/tree/${RELEASE_RC_TAG}
The release files, including signatures, digests, etc. can be found at:
https://dist.apache.org/repos/dist/dev/kyuubi/${release_rc_tag}/
https://dist.apache.org/repos/dist/dev/kyuubi/${RELEASE_RC_TAG}/
Signatures used for Kyuubi RCs can be found in this file:
https://downloads.apache.org/kyuubi/KEYS
The staging repository for this release can be found at:
https://repository.apache.org/content/repositories/orgapachekyuubi-${repo_no}/
${change_from_pre_commit}
The release note is available in:
https://github.com/apache/kyuubi/compare/${prev_release_version}...${release_rc_tag}
https://repository.apache.org/content/repositories/orgapachekyuubi-${REPO_NO}/
${CHANGE_FROM_PRE_COMMIT}
The commit list since the latest released version:
https://github.com/apache/kyuubi/compare/v${PREV_RELEASE_VERSION}...${RELEASE_RC_TAG}
Thanks,
On behalf of Apache Kyuubi community

View File

@ -15,12 +15,12 @@
# limitations under the License.
#
Title: [CANCEL][VOTE] Release Apache Kyuubi {release_version} {release_rc_no}
Title: [CANCEL][VOTE] Release Apache Kyuubi {RELEASE_VERSION} {RELEASE_RC_NO}
Content:
Hello Apache Kyuubi PMC and Community,
We need to cancel the {release_rc_no} due to {issue_description}[1],
We need to cancel the {RELEASE_RC_NO} due to {issue_description}[1],
and thank everyone who helped vote.
[1] https://github.com/apache/kyuubi/issues/{issue_number}

View File

@ -15,7 +15,7 @@
# limitations under the License.
#
Title: [RESULT][VOTE] Release Apache Kyuubi {release_version} {release_rc_no}
Title: [RESULT][VOTE] Release Apache Kyuubi {RELEASE_VERSION} {RELEASE_RC_NO}
Content:
Hello Apache Kyuubi PMC and Community,