Skip to content

Commit 7ad4ced

Browse files
authored
ARROW-18118: [Release][Dev] Fix problems in 02-source.sh/03-binary-submit.sh for 10.0.0-rc0 (apache#14468)
SOURCE_PR in dev/release/02-source.sh didn't work because it refers undefined variable (`rc_number` is referred not `rc`). This change includes the following changes including the fix of the undefined variable problem: - Fix wrong variable use. (Variable name is also changed to adjust other variable names: `release_candidate` -> `rc`) - The ARROW_GITHUB_API_TOKEN environment variable is used for GitHub Personal Access Token but the CROSSBOW_GITHUB_TOKEN environment variable is used in others. So this also uses CROSSBOW_GITHUB_TOKEN. (Documentation is also updated. This change also includes unrelated minor updates. Sorry.) dev/release/03-binary-submit.sh didn't work because: - It refers undefined variable (`release_candidate_branch`). - `archery crossbow report-pr` searches only `base=master` pull requests. (A verify pull request uses `base=maint-X.Y.Z`.) This change fixes them. This change also adds `--no-fetch` to `archery crossbow latest-prefix` like other command lines to reduce execution time. Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 978ae86 commit 7ad4ced

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

dev/release/02-source.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# under the License.
1919
#
2020

21-
set -e
21+
set -eu
2222

2323
: ${SOURCE_DEFAULT:=1}
2424
: ${SOURCE_RAT:=${SOURCE_DEFAULT}}
@@ -39,7 +39,7 @@ rc=$2
3939

4040
tag=apache-arrow-${version}
4141
maint_branch=maint-${version}
42-
release_candidate_branch="release-${version}-rc${rc_number}"
42+
rc_branch="release-${version}-rc${rc}"
4343
tagrc=${tag}-rc${rc}
4444
rc_url="https://dist.apache.org/repos/dist/dev/arrow/${tagrc}"
4545

@@ -129,13 +129,12 @@ fi
129129
# Create Pull Request and Crossbow comment to run verify source tasks
130130
if [ ${SOURCE_PR} -gt 0 ]; then
131131
archery crossbow \
132-
--github-token=${ARROW_GITHUB_API_TOKEN} \
133132
verify-release-candidate \
134133
--base-branch=${maint_branch} \
135134
--create-pr \
136-
--head-branch=${release_candidate_branch} \
135+
--head-branch=${rc_branch} \
137136
--pr-body="PR to verify Release Candidate" \
138-
--pr-title="WIP: [Release] Verify ${release_candidate_branch}" \
137+
--pr-title="WIP: [Release] Verify ${rc_branch}" \
139138
--remote=https://github.com/apache/arrow \
140139
--rc=${rc} \
141140
--verify-source \

dev/release/03-binary-submit.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
set -e
20+
set -eu
2121

2222
if [ "$#" -ne 2 ]; then
2323
echo "Usage: $0 <version> <rc-num>"
2424
exit
2525
fi
2626

2727
version=$1
28-
rc_number=$2
29-
version_with_rc="${version}-rc${rc_number}"
28+
rc=$2
29+
version_with_rc="${version}-rc${rc}"
3030
crossbow_job_prefix="release-${version_with_rc}"
3131
release_tag="apache-arrow-${version}"
32+
rc_branch="release-${version_with_rc}"
3233

3334
: ${ARROW_REPOSITORY:="apache/arrow"}
3435
: ${ARROW_BRANCH:=$release_tag}
@@ -46,9 +47,9 @@ archery crossbow submit \
4647

4748
# archery will add a comment to the automatically generated PR to track
4849
# the submitted jobs
49-
job_name=$(archery crossbow latest-prefix ${crossbow_job_prefix})
50+
job_name=$(archery crossbow latest-prefix --no-fetch ${crossbow_job_prefix})
5051
archery crossbow report-pr \
5152
--no-fetch \
5253
--arrow-remote "https://github.com/${ARROW_REPOSITORY}" \
5354
--job-name ${job_name} \
54-
--pr-title "WIP: [Release] Verify ${release_candidate_branch}"
55+
--pr-title "WIP: [Release] Verify ${rc_branch}"

docs/source/developers/release.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ generated properly.
6161
mvn clean install -Papache-release
6262
6363
- Have the build requirements for cpp and c_glib installed.
64-
- Set the JIRA_USERNAME and JIRA_PASSWORD environment variables
65-
- Set the ARROW_GITHUB_API_TOKEN environment variable to automatically create the verify release Pull Request.
64+
- Set the ``JIRA_USERNAME`` and ``JIRA_PASSWORD`` environment variables
65+
- Set the ``CROSSBOW_GITHUB_TOKEN`` environment variable to automatically create the verify release Pull Request.
6666
- Install ``en_US.UTF-8`` locale. You can confirm available locales by ``locale -a``.
6767
- Install Python 3 as python
6868
- Create dev/release/.env from dev/release/.env.example. See the comments in dev/release/.env.example how to set each variable.
69-
- Request to the Apache INFRA group to be aadded to `Bintray members <https://bintray.com/apache/>`_.
7069
- Setup :ref:`Crossbow<Crossbow>` as defined.
7170
- Have Docker and docker-compose installed.
7271

0 commit comments

Comments
 (0)