Skip to content

Commit 08089df

Browse files
kouraulcd
andauthored
GH-45548: [Release][Dev][Packaging] Omit APT/Yum repositories check on local in the RC verification script (#45738)
### Rationale for this change They use Docker. So results of them must be same on both of local and GitHub Actions. ### What changes are included in this PR? Check the result on GitHub Actions on local. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #45548 Lead-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> Co-authored-by: Raúl Cumplido <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent a0261dd commit 08089df

File tree

1 file changed

+105
-77
lines changed

1 file changed

+105
-77
lines changed

dev/release/verify-release-candidate.sh

+105-77
Original file line numberDiff line numberDiff line change
@@ -181,95 +181,123 @@ test_binary() {
181181
verify_dir_artifact_signatures ${download_dir}
182182
}
183183

184+
check_verification_result_on_github() {
185+
pushd ${ARROW_TMPDIR}
186+
curl \
187+
--get \
188+
--data "branch=apache-arrow-${VERSION}-rc${RC_NUMBER}" \
189+
"https://api.github.com/repos/apache/arrow/actions/workflows/verify_rc.yml/runs" | \
190+
jq '.workflow_runs[0]' > latest_verify_rc.json
191+
conclusion="$(jq -r '.conclusion' latest_verify_rc.json)"
192+
if [ "${conclusion}" != "success" ]; then
193+
html_url="$(jq -r '.html_url' latest_verify_rc.json)"
194+
echo "Verification on GitHub wasn't successful: ${conclusion}: ${html_url}"
195+
exit 1
196+
fi
197+
popd
198+
}
199+
184200
test_apt() {
185201
show_header "Testing APT packages"
186202

187-
if [ "$(arch)" = "x86_64" ]; then
188-
for target in "debian:bookworm" \
189-
"debian:trixie" \
190-
"ubuntu:jammy" \
191-
"ubuntu:noble"; do \
192-
if ! docker run \
193-
--platform=linux/x86_64 \
194-
--rm \
195-
--security-opt="seccomp=unconfined" \
196-
--volume "${ARROW_DIR}":/arrow:delegated \
197-
"${target}" \
198-
/arrow/dev/release/verify-apt.sh \
199-
"${VERSION}" \
200-
"rc"; then
201-
echo "Failed to verify the APT repository for ${target} on x86_64"
202-
exit 1
203-
fi
204-
done
203+
if [ "${GITHUB_ACTIONS}" != "true" ]; then
204+
check_verification_result_on_github
205+
return 0
205206
fi
206207

207-
if [ "$(arch)" = "aarch64" -o -e /usr/bin/qemu-aarch64-static ]; then
208-
for target in "arm64v8/debian:bookworm" \
209-
"arm64v8/debian:trixie" \
210-
"arm64v8/ubuntu:jammy" \
211-
"arm64v8/ubuntu:noble"; do \
212-
if ! docker run \
213-
--platform=linux/arm64 \
214-
--rm \
215-
--security-opt="seccomp=unconfined" \
216-
--volume "${ARROW_DIR}":/arrow:delegated \
217-
"${target}" \
218-
/arrow/dev/release/verify-apt.sh \
219-
"${VERSION}" \
220-
"rc"; then
221-
echo "Failed to verify the APT repository for ${target} on arm64"
222-
exit 1
223-
fi
224-
done
225-
fi
208+
case "$(arch)" in
209+
"x86_64")
210+
for target in "debian:bookworm" \
211+
"debian:trixie" \
212+
"ubuntu:jammy" \
213+
"ubuntu:noble"; do \
214+
if ! docker run \
215+
--platform=linux/x86_64 \
216+
--rm \
217+
--security-opt="seccomp=unconfined" \
218+
--volume "${ARROW_DIR}":/arrow:delegated \
219+
"${target}" \
220+
/arrow/dev/release/verify-apt.sh \
221+
"${VERSION}" \
222+
"rc"; then
223+
echo "Failed to verify the APT repository for ${target} on x86_64"
224+
exit 1
225+
fi
226+
done
227+
;;
228+
"aarch64")
229+
for target in "arm64v8/debian:bookworm" \
230+
"arm64v8/debian:trixie" \
231+
"arm64v8/ubuntu:jammy" \
232+
"arm64v8/ubuntu:noble"; do \
233+
if ! docker run \
234+
--platform=linux/arm64 \
235+
--rm \
236+
--security-opt="seccomp=unconfined" \
237+
--volume "${ARROW_DIR}":/arrow:delegated \
238+
"${target}" \
239+
/arrow/dev/release/verify-apt.sh \
240+
"${VERSION}" \
241+
"rc"; then
242+
echo "Failed to verify the APT repository for ${target} on arm64"
243+
exit 1
244+
fi
245+
done
246+
;;
247+
esac
226248
}
227249

228250
test_yum() {
229251
show_header "Testing Yum packages"
230252

231-
if [ "$(arch)" = "x86_64" ]; then
232-
for target in "almalinux:9" \
233-
"almalinux:8" \
234-
"amazonlinux:2023" \
235-
"quay.io/centos/centos:stream9" \
236-
"quay.io/centos/centos:stream8" \
237-
"centos:7"; do
238-
if ! docker run \
239-
--platform linux/x86_64 \
240-
--rm \
241-
--security-opt="seccomp=unconfined" \
242-
--volume "${ARROW_DIR}":/arrow:delegated \
243-
"${target}" \
244-
/arrow/dev/release/verify-yum.sh \
245-
"${VERSION}" \
246-
"rc"; then
247-
echo "Failed to verify the Yum repository for ${target} on x86_64"
248-
exit 1
249-
fi
250-
done
253+
if [ "${GITHUB_ACTIONS}" != "true" ]; then
254+
check_verification_result_on_github
255+
return 0
251256
fi
252257

253-
if [ "$(arch)" = "aarch64" -o -e /usr/bin/qemu-aarch64-static ]; then
254-
for target in "arm64v8/almalinux:9" \
255-
"arm64v8/almalinux:8" \
256-
"arm64v8/amazonlinux:2023" \
257-
"quay.io/centos/centos:stream9" \
258-
"quay.io/centos/centos:stream8"; do
259-
if ! docker run \
260-
--platform linux/arm64 \
261-
--rm \
262-
--security-opt="seccomp=unconfined" \
263-
--volume "${ARROW_DIR}":/arrow:delegated \
264-
"${target}" \
265-
/arrow/dev/release/verify-yum.sh \
266-
"${VERSION}" \
267-
"rc"; then
268-
echo "Failed to verify the Yum repository for ${target} on arm64"
269-
exit 1
270-
fi
271-
done
272-
fi
258+
case "$(arch)" in
259+
"x86_64")
260+
for target in "almalinux:9" \
261+
"almalinux:8" \
262+
"amazonlinux:2023" \
263+
"quay.io/centos/centos:stream9" \
264+
"quay.io/centos/centos:stream8" \
265+
"centos:7"; do
266+
if ! docker run \
267+
--platform linux/x86_64 \
268+
--rm \
269+
--security-opt="seccomp=unconfined" \
270+
--volume "${ARROW_DIR}":/arrow:delegated \
271+
"${target}" \
272+
/arrow/dev/release/verify-yum.sh \
273+
"${VERSION}" \
274+
"rc"; then
275+
echo "Failed to verify the Yum repository for ${target} on x86_64"
276+
exit 1
277+
fi
278+
done
279+
;;
280+
"aarch64")
281+
for target in "arm64v8/almalinux:9" \
282+
"arm64v8/almalinux:8" \
283+
"arm64v8/amazonlinux:2023" \
284+
"quay.io/centos/centos:stream9" \
285+
"quay.io/centos/centos:stream8"; do
286+
if ! docker run \
287+
--platform linux/arm64 \
288+
--rm \
289+
--security-opt="seccomp=unconfined" \
290+
--volume "${ARROW_DIR}":/arrow:delegated \
291+
"${target}" \
292+
/arrow/dev/release/verify-yum.sh \
293+
"${VERSION}" \
294+
"rc"; then
295+
echo "Failed to verify the Yum repository for ${target} on arm64"
296+
exit 1
297+
fi
298+
done
299+
;;
300+
esac
273301
}
274302

275303
setup_tempdir() {

0 commit comments

Comments
 (0)