From 02be104d3f73edf45f1b4f71fd36f9f84f1164f0 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Wed, 22 Jan 2025 23:05:02 +0000 Subject: [PATCH 1/7] [Python dist] Build aarch64 in different Kokoro job --- .../python_alpine_aarch64.current_version | 2 +- .../python_alpine_aarch64/Dockerfile | 3 ++- .../linux/grpc_distribtests_python.cfg | 5 ++++ .../linux/grpc_distribtests_python.sh | 25 ++++++++++++++----- .../pull_request/grpc_examples_tests_cpp.cfg | 10 ++++++++ .../release/grpc_distribtests_python.cfg | 5 ++++ tools/run_tests/artifacts/package_targets.py | 17 +++++++++++-- tools/run_tests/python_utils/jobset.py | 1 + tools/run_tests/task_runner.py | 11 ++++++++ 9 files changed, 69 insertions(+), 10 deletions(-) diff --git a/tools/dockerfile/distribtest/python_alpine_aarch64.current_version b/tools/dockerfile/distribtest/python_alpine_aarch64.current_version index a3efd8f5bcc0b..5b3080154e40a 100644 --- a/tools/dockerfile/distribtest/python_alpine_aarch64.current_version +++ b/tools/dockerfile/distribtest/python_alpine_aarch64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_aarch64:086c6b7ba4177b5c086a4e1e36019fdd1d86a061@sha256:da5d191e62811fd3470d593aa9a7c2bfc8ee7d3453db92db13d62edb2eb9f39e \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_aarch64:78b5c9d459ceaedfa8dc8fa6dc52ce11666dd581@sha256:bcdfc865daa8c61dc6f9b67ddab63d47fcacb109ed57de5b9a7673dff907e02c \ No newline at end of file diff --git a/tools/dockerfile/distribtest/python_alpine_aarch64/Dockerfile b/tools/dockerfile/distribtest/python_alpine_aarch64/Dockerfile index a7500e39aa557..27d25043fc704 100644 --- a/tools/dockerfile/distribtest/python_alpine_aarch64/Dockerfile +++ b/tools/dockerfile/distribtest/python_alpine_aarch64/Dockerfile @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:3.10-alpine3.14 +# this an aarch64 image +FROM arm64v8/python:3.10-alpine # Our test infrastructure demands bash RUN apk update && apk add bash diff --git a/tools/internal_ci/linux/grpc_distribtests_python.cfg b/tools/internal_ci/linux/grpc_distribtests_python.cfg index ee17d7a29202f..f7a6ea46a1f77 100644 --- a/tools/internal_ci/linux/grpc_distribtests_python.cfg +++ b/tools/internal_ci/linux/grpc_distribtests_python.cfg @@ -24,3 +24,8 @@ action { regex: "github/grpc/artifacts/**" } } + +env_vars { + key: "TASK_RUNNER_EXTRA_FILTERS" + value: "-e aarch64 musllinux_1_1" +} diff --git a/tools/internal_ci/linux/grpc_distribtests_python.sh b/tools/internal_ci/linux/grpc_distribtests_python.sh index dd5dba63dcf95..1b978af0f4b3a 100755 --- a/tools/internal_ci/linux/grpc_distribtests_python.sh +++ b/tools/internal_ci/linux/grpc_distribtests_python.sh @@ -23,10 +23,14 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc -# some distribtests use a pre-registered binfmt_misc hook -# to automatically execute foreign binaries (such as aarch64) -# under qemu emulator. -source tools/internal_ci/helper_scripts/prepare_qemu_rc +if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then + echo "Skipping prepare_qemu_rc'" +else + # some distribtests use a pre-registered binfmt_misc hook + # to automatically execute foreign binaries (such as aarch64) + # under qemu emulator. + source tools/internal_ci/helper_scripts/prepare_qemu_rc +fi # configure ccache source tools/internal_ci/helper_scripts/prepare_ccache_rc @@ -40,7 +44,11 @@ mkdir -p input_artifacts cp -r artifacts/* input_artifacts/ || true # This step simply collects python artifacts from subdirectories of input_artifacts/ and copies them to artifacts/ -tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" +if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then + tools/run_tests/task_runner.py -f package linux python ${TASK_RUNNER_EXTRA_FILTERS} -x build_packages/sponge_log.xml || FAILED="true" +else + tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" +fi # the next step expects to find the artifacts from the previous step in the "input_artifacts" folder. # in addition to that, preserve the contents of "artifacts" directory since we want kokoro @@ -52,7 +60,12 @@ cp -r artifacts/* input_artifacts/ || true # Run all python linux distribtests # We run the distribtests even if some of the artifacts have failed to build, since that gives # a better signal about which distribtest are affected by the currently broken artifact builds. -tools/run_tests/task_runner.py -f distribtest linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x distribtests/sponge_log.xml || FAILED="true" +if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then + # We're using alpine as tag in distribtest targets. + tools/run_tests/task_runner.py -f distribtest linux python aarch64 alpine -j 12 -x distribtests/sponge_log.xml || FAILED="true" +else + tools/run_tests/task_runner.py -f distribtest linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x distribtests/sponge_log.xml || FAILED="true" +fi # This step checks if any of the artifacts exceeds a per-file size limit. tools/internal_ci/helper_scripts/check_python_artifacts_size.sh diff --git a/tools/internal_ci/linux/pull_request/grpc_examples_tests_cpp.cfg b/tools/internal_ci/linux/pull_request/grpc_examples_tests_cpp.cfg index 5eef82d3e3a5e..0237477b6322f 100644 --- a/tools/internal_ci/linux/pull_request/grpc_examples_tests_cpp.cfg +++ b/tools/internal_ci/linux/pull_request/grpc_examples_tests_cpp.cfg @@ -23,3 +23,13 @@ action { regex: "github/grpc/reports/**" } } + +env_vars { + key: "TASK_RUNNER_EXTRA_FILTERS" + value: "aarch64 -e x64 x86 armv7" +} + +# env_vars { +# key: "TASK_RUNNER_EXCLUDE_FILTERS" +# value: "x64 x86 armv7" +# } diff --git a/tools/internal_ci/linux/release/grpc_distribtests_python.cfg b/tools/internal_ci/linux/release/grpc_distribtests_python.cfg index 6ed2e7d67f603..bd44c7cc862e8 100644 --- a/tools/internal_ci/linux/release/grpc_distribtests_python.cfg +++ b/tools/internal_ci/linux/release/grpc_distribtests_python.cfg @@ -24,3 +24,8 @@ action { regex: "github/grpc/artifacts/**" } } + +env_vars { + key: "TASK_RUNNER_EXTRA_FILTERS" + value: "-e aarch64 musllinux_1_1" +} diff --git a/tools/run_tests/artifacts/package_targets.py b/tools/run_tests/artifacts/package_targets.py index dabfb452880d9..ecbe4182a1e19 100644 --- a/tools/run_tests/artifacts/package_targets.py +++ b/tools/run_tests/artifacts/package_targets.py @@ -142,9 +142,18 @@ def build_jobspec(self, inner_jobs=None): class PythonPackage: """Collects python eggs and wheels created in the artifact phase""" - def __init__(self): + def __init__(self, platform="", arch=""): self.name = "python_package" self.labels = ["package", "python", "linux"] + self.platform = platform + self.arch = arch + if self.platform: + self.labels.append(platform) + self.name += "_" + platform + if self.arch: + self.labels.append(arch) + self.name += "_" + arch + def pre_build_jobspecs(self): return [] @@ -154,9 +163,12 @@ def build_jobspec(self, inner_jobs=None): # since the python package build does very little, we can use virtually # any image that has new-enough python, so reusing one of the images used # for artifact building seems natural. + dockerfile_dir = "tools/dockerfile/grpc_artifact_python_manylinux2014_x64" + if "musllinux_1_1" in self.platform and "aarch64" in self.arch: + dockerfile_dir = "tools/dockerfile/grpc_artifact_python_musllinux_1_1_aarch64" return create_docker_jobspec( self.name, - "tools/dockerfile/grpc_artifact_python_manylinux2014_x64", + dockerfile_dir, "tools/run_tests/artifacts/build_package_python.sh", environ={"PYTHON": "/opt/python/cp39-cp39/bin/python"}, ) @@ -189,5 +201,6 @@ def targets(): CSharpPackage("windows"), RubyPackage(), PythonPackage(), + PythonPackage("musllinux_1_1", "aarch64"), PHPPackage(), ] diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py index e475b5a82f307..630a8591bb4df 100755 --- a/tools/run_tests/python_utils/jobset.py +++ b/tools/run_tests/python_utils/jobset.py @@ -45,6 +45,7 @@ def strip_non_ascii_chars(s): def sanitized_environment(env): sanitized = {} for key, value in list(env.items()): + sys.stderr.write(f"strip_non_ascii_chars key: {key}, value: {value}\n"); sys.stderr.flush() sanitized[strip_non_ascii_chars(key)] = strip_non_ascii_chars(value) return sanitized diff --git a/tools/run_tests/task_runner.py b/tools/run_tests/task_runner.py index fb2502d2a282e..1ecaaa63a69c8 100755 --- a/tools/run_tests/task_runner.py +++ b/tools/run_tests/task_runner.py @@ -71,6 +71,14 @@ def _create_build_map(): default=[], help="Filter targets to build with AND semantics.", ) +argp.add_argument( + "-e", + "--exclude", + choices=sorted(_BUILD_MAP.keys()), + nargs="+", + default=[], + help="Target labels to exclude from building.", +) argp.add_argument("-j", "--jobs", default=multiprocessing.cpu_count(), type=int) argp.add_argument( "-x", @@ -106,6 +114,9 @@ def _create_build_map(): # Among targets selected by -b, filter out those that don't match the filter targets = [t for t in targets if all(f in t.labels for f in args.filter)] +# Exclude target if it has ALL of the specified exclude labels. +targets = [t for t in targets if not all(l in args.exclude for l in t.labels)] + print("Will build %d targets:" % len(targets)) for target in targets: print(" %s, labels %s" % (target.name, target.labels)) From 61abe36232a2f2f35c0ed60a0406c520bf6fae1f Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Mon, 27 Jan 2025 18:49:21 +0000 Subject: [PATCH 2/7] Changes needed after rebase to master --- .../internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg b/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg index ffc02e606df42..e3e4f6f52a667 100644 --- a/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg +++ b/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_python_arm64.sh" +build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_python.sh" timeout_mins: 240 action { define_artifacts { From 45319af2e75f8fd5ba7b40c25a0c363b43580be8 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Mon, 27 Jan 2025 19:19:04 +0000 Subject: [PATCH 3/7] Use actual script --- .../linux/pull_request/grpc_distribtests_python_arm64.cfg | 2 +- tools/run_tests/python_utils/jobset.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg b/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg index 80f51498c0795..089ba405c6b45 100644 --- a/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg +++ b/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_python_arm64.sh" +build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_python.sh" timeout_mins: 240 action { define_artifacts { diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py index 630a8591bb4df..e475b5a82f307 100755 --- a/tools/run_tests/python_utils/jobset.py +++ b/tools/run_tests/python_utils/jobset.py @@ -45,7 +45,6 @@ def strip_non_ascii_chars(s): def sanitized_environment(env): sanitized = {} for key, value in list(env.items()): - sys.stderr.write(f"strip_non_ascii_chars key: {key}, value: {value}\n"); sys.stderr.flush() sanitized[strip_non_ascii_chars(key)] = strip_non_ascii_chars(value) return sanitized From 2e237c7652a8f2b8299dfb1bb4cff9997c90a693 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Mon, 27 Jan 2025 19:20:10 +0000 Subject: [PATCH 4/7] exit in script --- tools/run_tests/artifacts/build_artifact_python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index b00ae1e372c42..2254c834f0561 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -304,6 +304,8 @@ then preprocess sdist bdist_wheel cp -r src/python/grpcio_status/dist/* "$ARTIFACT_DIR" + exit 1 + # Install xds-protos as a dependency of grpcio-csds "${PYTHON}" -m pip install xds-protos --no-index --find-links "file://$ARTIFACT_DIR/" From fc91b282fc086347d87c4d4731b3679780f89d41 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Mon, 27 Jan 2025 20:34:35 +0000 Subject: [PATCH 5/7] Try use AUDITWHEEL_PLAT --- .../linux/arm64/grpc_distribtests_python_arm64.cfg | 5 +++++ tools/internal_ci/linux/grpc_distribtests_python.sh | 13 +++++++++---- .../linux/pull_request/grpc_distribtests_python.cfg | 2 +- .../pull_request/grpc_distribtests_python_arm64.cfg | 2 +- tools/run_tests/artifacts/build_artifact_python.sh | 2 -- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg b/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg index e3e4f6f52a667..f166d92fd5f16 100644 --- a/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg +++ b/tools/internal_ci/linux/arm64/grpc_distribtests_python_arm64.cfg @@ -24,3 +24,8 @@ action { regex: "github/grpc/artifacts/**" } } + +env_vars { + key: "TASK_RUNNER_EXTRA_FILTERS" + value: "aarch64 musllinux_1_1" +} diff --git a/tools/internal_ci/linux/grpc_distribtests_python.sh b/tools/internal_ci/linux/grpc_distribtests_python.sh index 1b978af0f4b3a..0340c847c3b54 100755 --- a/tools/internal_ci/linux/grpc_distribtests_python.sh +++ b/tools/internal_ci/linux/grpc_distribtests_python.sh @@ -23,7 +23,7 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc -if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then +if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then echo "Skipping prepare_qemu_rc'" else # some distribtests use a pre-registered binfmt_misc hook @@ -36,7 +36,12 @@ fi source tools/internal_ci/helper_scripts/prepare_ccache_rc # Build all python linux artifacts (this step actually builds all the binary wheels and source archives) -tools/run_tests/task_runner.py -f artifact linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x build_artifacts/sponge_log.xml || FAILED="true" +if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then + tools/run_tests/task_runner.py -f artifact linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x build_artifacts/sponge_log.xml || FAILED="true" +else + tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" +fi + # the next step expects to find the artifacts from the previous step in the "input_artifacts" folder. rm -rf input_artifacts @@ -44,7 +49,7 @@ mkdir -p input_artifacts cp -r artifacts/* input_artifacts/ || true # This step simply collects python artifacts from subdirectories of input_artifacts/ and copies them to artifacts/ -if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then +if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then tools/run_tests/task_runner.py -f package linux python ${TASK_RUNNER_EXTRA_FILTERS} -x build_packages/sponge_log.xml || FAILED="true" else tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" @@ -60,7 +65,7 @@ cp -r artifacts/* input_artifacts/ || true # Run all python linux distribtests # We run the distribtests even if some of the artifacts have failed to build, since that gives # a better signal about which distribtest are affected by the currently broken artifact builds. -if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" ]]; then +if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then # We're using alpine as tag in distribtest targets. tools/run_tests/task_runner.py -f distribtest linux python aarch64 alpine -j 12 -x distribtests/sponge_log.xml || FAILED="true" else diff --git a/tools/internal_ci/linux/pull_request/grpc_distribtests_python.cfg b/tools/internal_ci/linux/pull_request/grpc_distribtests_python.cfg index ccc02bff0226d..7696736086d43 100644 --- a/tools/internal_ci/linux/pull_request/grpc_distribtests_python.cfg +++ b/tools/internal_ci/linux/pull_request/grpc_distribtests_python.cfg @@ -27,5 +27,5 @@ action { env_vars { key: "TASK_RUNNER_EXTRA_FILTERS" - value: "presubmit" + value: "presubmit -e aarch64 musllinux_1_1" } diff --git a/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg b/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg index 089ba405c6b45..0eb0a74388553 100644 --- a/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg +++ b/tools/internal_ci/linux/pull_request/grpc_distribtests_python_arm64.cfg @@ -27,5 +27,5 @@ action { env_vars { key: "TASK_RUNNER_EXTRA_FILTERS" - value: "presubmit" + value: "presubmit aarch64 musllinux_1_1" } diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index 2254c834f0561..b00ae1e372c42 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -304,8 +304,6 @@ then preprocess sdist bdist_wheel cp -r src/python/grpcio_status/dist/* "$ARTIFACT_DIR" - exit 1 - # Install xds-protos as a dependency of grpcio-csds "${PYTHON}" -m pip install xds-protos --no-index --find-links "file://$ARTIFACT_DIR/" From aaf6dac2bb5015ca79085db6240310cf969280e3 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Mon, 27 Jan 2025 20:59:14 +0000 Subject: [PATCH 6/7] Try use IS_AARCH64_MUSL --- .../linux/grpc_distribtests_python.sh | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/internal_ci/linux/grpc_distribtests_python.sh b/tools/internal_ci/linux/grpc_distribtests_python.sh index 0340c847c3b54..a8920e29a4c33 100755 --- a/tools/internal_ci/linux/grpc_distribtests_python.sh +++ b/tools/internal_ci/linux/grpc_distribtests_python.sh @@ -21,9 +21,12 @@ source $(dirname $0)/../../../tools/internal_ci/helper_scripts/move_src_tree_and # change to grpc repo root cd $(dirname $0)/../../.. -source tools/internal_ci/helper_scripts/prepare_build_linux_rc +IS_AARCH64_MUSL="" +if [[ "${TASK_RUNNER_EXTRA_FILTERS}" == "aarch64 musllinux_1_1" || "${TASK_RUNNER_EXTRA_FILTERS}" == "presubmit aarch64 musllinux_1_1" ]]; then + IS_AARCH64_MUSL="True" +fi -if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then +if [[ "${IS_AARCH64_MUSL}" == "True" ]]; then echo "Skipping prepare_qemu_rc'" else # some distribtests use a pre-registered binfmt_misc hook @@ -36,12 +39,7 @@ fi source tools/internal_ci/helper_scripts/prepare_ccache_rc # Build all python linux artifacts (this step actually builds all the binary wheels and source archives) -if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then - tools/run_tests/task_runner.py -f artifact linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x build_artifacts/sponge_log.xml || FAILED="true" -else - tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" -fi - +tools/run_tests/task_runner.py -f artifact linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x build_artifacts/sponge_log.xml || FAILED="true" # the next step expects to find the artifacts from the previous step in the "input_artifacts" folder. rm -rf input_artifacts @@ -49,8 +47,9 @@ mkdir -p input_artifacts cp -r artifacts/* input_artifacts/ || true # This step simply collects python artifacts from subdirectories of input_artifacts/ and copies them to artifacts/ -if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then - tools/run_tests/task_runner.py -f package linux python ${TASK_RUNNER_EXTRA_FILTERS} -x build_packages/sponge_log.xml || FAILED="true" +if [[ "${IS_AARCH64_MUSL}" == "True" ]]; then + # Not using TASK_RUNNER_EXTRA_FILTERS since we don't have a target with presubmit tag. + tools/run_tests/task_runner.py -f package linux python musllinux_1_1 aarch64 -x build_packages/sponge_log.xml || FAILED="true" else tools/run_tests/task_runner.py -f package linux python -x build_packages/sponge_log.xml || FAILED="true" fi @@ -65,7 +64,7 @@ cp -r artifacts/* input_artifacts/ || true # Run all python linux distribtests # We run the distribtests even if some of the artifacts have failed to build, since that gives # a better signal about which distribtest are affected by the currently broken artifact builds. -if [[ "${AUDITWHEEL_PLAT}" == "musllinux_1_1_aarch64" ]]; then +if [[ "${IS_AARCH64_MUSL}" == "True" ]]; then # We're using alpine as tag in distribtest targets. tools/run_tests/task_runner.py -f distribtest linux python aarch64 alpine -j 12 -x distribtests/sponge_log.xml || FAILED="true" else From 89f8cbfa42e86d655275460966cbccfbee57b253 Mon Sep 17 00:00:00 2001 From: XuanWang-Amos <24593237+XuanWang-Amos@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:03:12 +0000 Subject: [PATCH 7/7] Automated change: Fix sanity tests --- tools/run_tests/artifacts/package_targets.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/artifacts/package_targets.py b/tools/run_tests/artifacts/package_targets.py index ecbe4182a1e19..8cffe7b98106b 100644 --- a/tools/run_tests/artifacts/package_targets.py +++ b/tools/run_tests/artifacts/package_targets.py @@ -154,7 +154,6 @@ def __init__(self, platform="", arch=""): self.labels.append(arch) self.name += "_" + arch - def pre_build_jobspecs(self): return [] @@ -163,9 +162,13 @@ def build_jobspec(self, inner_jobs=None): # since the python package build does very little, we can use virtually # any image that has new-enough python, so reusing one of the images used # for artifact building seems natural. - dockerfile_dir = "tools/dockerfile/grpc_artifact_python_manylinux2014_x64" + dockerfile_dir = ( + "tools/dockerfile/grpc_artifact_python_manylinux2014_x64" + ) if "musllinux_1_1" in self.platform and "aarch64" in self.arch: - dockerfile_dir = "tools/dockerfile/grpc_artifact_python_musllinux_1_1_aarch64" + dockerfile_dir = ( + "tools/dockerfile/grpc_artifact_python_musllinux_1_1_aarch64" + ) return create_docker_jobspec( self.name, dockerfile_dir,