[ci] Only upload wheels to S3 once (#24072)

Currently all jobs that build wheels put them into the artifacts directory and upload them. This leads to the wheels being overwritten on S3 multiple times. This is not a huge problem as ingress is free, but in order to have a single point of reference, it might be beneficial to limit the wheels uploading to a single Buildkite job. Recently, this has led to interference with stale artifact directories.

The downside here is that if the "Wheels & Jars" build fails randomly, the wheels will not be available on S3 - previously they've been also uploaded by several other jobs.
This commit is contained in:
Kai Fricke 2022-04-25 21:19:11 +01:00 committed by GitHub
parent cc08c01ade
commit b86d420a3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View file

@ -38,6 +38,7 @@ steps:
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
- java -version
# Build wheels
- export UPLOAD_WHEELS_AS_ARTIFACTS=1
- export MAC_WHEELS=1
- export MAC_JARS=1
- export RAY_INSTALL_JAVA=1

View file

@ -6,7 +6,7 @@
]
commands:
# Build the wheels and jars
- LINUX_WHEELS=1 LINUX_JARS=1 ./ci/ci.sh build
- UPLOAD_WHEELS_AS_ARTIFACTS=1 LINUX_WHEELS=1 LINUX_JARS=1 ./ci/ci.sh build
- bash ./java/build-jar-multiplatform.sh linux
# Upload the wheels and jars
# We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.

View file

@ -430,8 +430,11 @@ build_wheels() {
# Sync the directory to buildkite artifacts
rm -rf /artifact-mount/.whl || true
cp -r .whl /artifact-mount/.whl
chmod -R 777 /artifact-mount/.whl
if [ "${UPLOAD_WHEELS_AS_ARTIFACTS-}" = "1" ]; then
cp -r .whl /artifact-mount/.whl
chmod -R 777 /artifact-mount/.whl
fi
validate_wheels_commit_str
fi
@ -441,8 +444,11 @@ build_wheels() {
"${WORKSPACE_DIR}"/python/build-wheel-macos.sh
mkdir -p /tmp/artifacts/.whl
rm -rf /tmp/artifacts/.whl || true
cp -r .whl /tmp/artifacts/.whl
chmod -R 777 /tmp/artifacts/.whl
if [ "${UPLOAD_WHEELS_AS_ARTIFACTS-}" = "1" ]; then
cp -r .whl /tmp/artifacts/.whl
chmod -R 777 /tmp/artifacts/.whl
fi
validate_wheels_commit_str
;;