Skip to content

Commit 5eaae54

Browse files
raulcdamol-
authored andcommitted
ARROW-16656: [CI][Release] Allow archery to support MINOR tickets and update release comments to contain MINOR
This is a minor fix to be consistent with our commit messages on the automated release comments and a minor fix to archery release to be able to process tickets that are `MINOR`. Closes #13229 from raulcd/update-release-messages Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Alessandro Molina <amol@turbogears.org>
1 parent 7fda23c commit 5eaae54

4 files changed

Lines changed: 26 additions & 7 deletions

File tree

dev/archery/archery/release.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,21 @@ def wrapper(*args, **kwargs):
137137

138138
_TITLE_REGEX = re.compile(
139139
r"(?P<issue>(?P<project>(ARROW|PARQUET))\-\d+)?\s*:?\s*"
140+
r"(?P<minor>(MINOR))?\s*:?\s*"
140141
r"(?P<components>\[.*\])?\s*(?P<summary>.*)"
141142
)
142143
_COMPONENT_REGEX = re.compile(r"\[([^\[\]]+)\]")
143144

144145

145146
class CommitTitle:
146147

147-
def __init__(self, summary, project=None, issue=None, components=None):
148+
def __init__(self, summary, project=None, issue=None, minor=None,
149+
components=None):
148150
self.project = project
149151
self.issue = issue
150152
self.components = components or []
151153
self.summary = summary
154+
self.minor = bool(minor)
152155

153156
def __str__(self):
154157
return self.to_string()
@@ -158,6 +161,7 @@ def __eq__(self, other):
158161
self.summary == other.summary and
159162
self.project == other.project and
160163
self.issue == other.issue and
164+
self.minor == other.minor and
161165
self.components == other.components
162166
)
163167

@@ -183,6 +187,7 @@ def parse(cls, headline):
183187
values['summary'],
184188
project=values.get('project'),
185189
issue=values.get('issue'),
190+
minor=values.get('minor'),
186191
components=components
187192
)
188193

dev/archery/archery/tests/test_release.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def test_commit_title():
149149
assert t.issue == "ARROW-9598"
150150
assert t.components == ["C++", "Parquet"]
151151
assert t.summary == "Fix writing nullable structs"
152+
assert t.minor is False
152153

153154
t = CommitTitle.parse(
154155
"ARROW-8002: [C++][Dataset][R] Support partitioned dataset writing"
@@ -157,6 +158,7 @@ def test_commit_title():
157158
assert t.issue == "ARROW-8002"
158159
assert t.components == ["C++", "Dataset", "R"]
159160
assert t.summary == "Support partitioned dataset writing"
161+
assert t.minor is False
160162

161163
t = CommitTitle.parse(
162164
"ARROW-9600: [Rust][Arrow] pin older version of proc-macro2 during "
@@ -166,18 +168,28 @@ def test_commit_title():
166168
assert t.issue == "ARROW-9600"
167169
assert t.components == ["Rust", "Arrow"]
168170
assert t.summary == "pin older version of proc-macro2 during build"
171+
assert t.minor is False
169172

170173
t = CommitTitle.parse("[Release] Update versions for 1.0.0")
171174
assert t.project is None
172175
assert t.issue is None
173176
assert t.components == ["Release"]
174177
assert t.summary == "Update versions for 1.0.0"
178+
assert t.minor is False
179+
180+
t = CommitTitle.parse("MINOR: [Release] Update versions for 1.0.0")
181+
assert t.project is None
182+
assert t.issue is None
183+
assert t.components == ["Release"]
184+
assert t.summary == "Update versions for 1.0.0"
185+
assert t.minor is True
175186

176187
t = CommitTitle.parse("[Python][Doc] Fix rst role dataset.rst (#7725)")
177188
assert t.project is None
178189
assert t.issue is None
179190
assert t.components == ["Python", "Doc"]
180191
assert t.summary == "Fix rst role dataset.rst (#7725)"
192+
assert t.minor is False
181193

182194
t = CommitTitle.parse(
183195
"PARQUET-1882: [C++] Buffered Reads should allow for 0 length"
@@ -186,6 +198,7 @@ def test_commit_title():
186198
assert t.issue == 'PARQUET-1882'
187199
assert t.components == ["C++"]
188200
assert t.summary == "Buffered Reads should allow for 0 length"
201+
assert t.minor is False
189202

190203
t = CommitTitle.parse(
191204
"ARROW-9340 [R] Use CRAN version of decor package "
@@ -196,6 +209,7 @@ def test_commit_title():
196209
assert t.issue == 'ARROW-9340'
197210
assert t.components == ["R"]
198211
assert t.summary == "Use CRAN version of decor package "
212+
assert t.minor is False
199213

200214

201215
def test_release_basics(fake_jira):

dev/release/01-prepare.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if [ ${PREPARE_CHANGELOG} -gt 0 ]; then
7575
# Update changelog
7676
archery release changelog add $version
7777
git add ${SOURCE_DIR}/../../CHANGELOG.md
78-
git commit -m "[Release] Update CHANGELOG.md for $version"
78+
git commit -m "MINOR: [Release] Update CHANGELOG.md for $version"
7979
fi
8080

8181
if [ ${PREPARE_LINUX_PACKAGES} -gt 0 ]; then
@@ -86,15 +86,15 @@ if [ ${PREPARE_LINUX_PACKAGES} -gt 0 ]; then
8686
ARROW_RELEASE_TIME="$(date +%Y-%m-%dT%H:%M:%S%z)" \
8787
ARROW_VERSION=${version}
8888
git add */debian*/changelog */yum/*.spec.in
89-
git commit -m "[Release] Update .deb/.rpm changelogs for $version"
89+
git commit -m "MINOR: [Release] Update .deb/.rpm changelogs for $version"
9090
cd -
9191
fi
9292

9393
if [ ${PREPARE_VERSION_PRE_TAG} -gt 0 ]; then
9494
echo "Prepare release ${version} on tag ${release_tag} then reset to version ${next_version_snapshot}"
9595

9696
update_versions "${version}" "${next_version}" "release"
97-
git commit -m "[Release] Update versions for ${version}"
97+
git commit -m "MINOR: [Release] Update versions for ${version}"
9898
fi
9999

100100
############################## Tag the Release ##############################

dev/release/post-12-bump-versions.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
if [ ${BUMP_VERSION_POST_TAG} -gt 0 ]; then
5252
echo "Updating versions for ${next_version_snapshot}"
5353
update_versions "${version}" "${next_version}" "snapshot"
54-
git commit -m "[Release] Update versions for ${next_version_snapshot}"
54+
git commit -m "MINOR: [Release] Update versions for ${next_version_snapshot}"
5555
fi
5656

5757
if [ ${BUMP_DEB_PACKAGE_NAMES} -gt 0 ]; then
@@ -85,7 +85,7 @@ if [ ${BUMP_DEB_PACKAGE_NAMES} -gt 0 ]; then
8585
sed -i.bak -E -e "${deb_lib_suffix_substitute_pattern}" rat_exclude_files.txt
8686
rm -f rat_exclude_files.txt.bak
8787
git add rat_exclude_files.txt
88-
git commit -m "[Release] Update .deb package names for $next_version"
88+
git commit -m "MINOR: [Release] Update .deb package names for $next_version"
8989
cd -
9090
fi
9191
fi
@@ -98,7 +98,7 @@ if [ ${BUMP_LINUX_PACKAGES} -gt 0 ]; then
9898
ARROW_RELEASE_TIME="$(git log -n1 --format=%aI apache-arrow-${version})" \
9999
ARROW_VERSION=${version}
100100
git add */debian*/changelog */yum/*.spec.in
101-
git commit -m "[Release] Update .deb/.rpm changelogs for $version"
101+
git commit -m "MINOR: [Release] Update .deb/.rpm changelogs for $version"
102102
cd -
103103
fi
104104

0 commit comments

Comments
 (0)