{"record":{"id":"cb71bf3adbf13695","repo":"apache/beam","slug":"pusewheeldistribution-is-set-for-the-task-but-the-host","errorCode":null,"errorMessage":"-PuseWheelDistribution is set for the task but the host system platform is not compatible with Dataflow worker container image.","messagePattern":"-PuseWheelDistribution is set for the task but the host system platform is not compatible with Dataflow worker container image\\.","errorType":"console","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"sdks/python/test-suites/dataflow/common.gradle","lineNumber":44,"sourceCode":"        : ''\n\n// Basic test options for ITs running on Jenkins.\ndef basicTestOpts = [\n    \"--capture=no\",  // print stdout instantly\n    \"--numprocesses=8\",  // run tests in parallel\n    \"--timeout=4500\", // timeout of whole command execution\n    \"--color=yes\", // console color\n    \"--log-cli-level=INFO\" //log level info\n]\n\ndependencies {\n  distTarBall project(path: \":sdks:python\", configuration: \"distTarBall\")\n}\n\ntask initializeForDataflowJob{\n  def wheelCompatible = \"amd64\".equalsIgnoreCase(System.getProperty(\"os.arch\"))\n  if (!wheelCompatible && project.hasProperty('useWheelDistribution')) {\n      throw new GradleException('-PuseWheelDistribution is set for the task but the ' +\n      'host system platform is not compatible with Dataflow worker container image.')\n  }\n  dependsOn 'installGcpTest'\n\n  if (project.hasProperty('useWheelDistribution')) {\n    dependsOn \":sdks:python:bdistPy${pythonVersionNumber}linux\"\n\n    doLast {\n      def cibwArchs = project.rootProject.findProperty('cibwArchs')\n      def wheelInclude = cibwArchs == 'aarch64' ?\n          \"**/apache_beam-*cp${pythonVersionNumber}*aarch64*.whl\" :\n          \"**/apache_beam-*cp${pythonVersionNumber}*manylinux*.whl\"\n      def collection = project.fileTree(project.project(':sdks:python').buildDir){\n          include wheelInclude\n      }\n      // sdkLocation ext is set at execution time\n      String packageFilename = collection.singleFile.toString()\n      project.ext.sdkLocation = packageFilename","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/test-suites/dataflow/common.gradle#L26-L62","documentation":"Beam's Dataflow Python test-suite Gradle config validates that the host CPU architecture is amd64 when -PuseWheelDistribution is requested. The prebuilt Linux wheel matches the Dataflow worker container (amd64); running on other architectures (e.g. arm64 Apple Silicon) would produce a wheel/image mismatch, so the build fails fast.","triggerScenarios":"Running any Dataflow Python test task with -PuseWheelDistribution on a machine whose os.arch is not amd64 (e.g. aarch64/arm64 Macs or ARM CI runners).","commonSituations":"Developers on Apple Silicon or ARM Graviton CI nodes building Dataflow test jobs that rely on the prebuilt wheel distribution.","solutions":["Run the build on an x86_64/amd64 host or an amd64 container (e.g. docker run --platform linux/amd64).","Drop -PuseWheelDistribution so the task installs from the sdist instead of the prebuilt wheel.","Use Rosetta/AMD64 emulation for local development on Apple Silicon."],"exampleFix":"// before\n./gradlew :sdks:python:test-suites:dataflow:pyxxx:installGcpTest -PuseWheelDistribution\n// after (arm64 host)\n./gradlew :sdks:python:test-suites:dataflow:pyxxx:installGcpTest  # no wheel flag","handlingStrategy":"validation","validationCode":"import platform\nif platform.machine() not in ('x86_64', 'amd64'):\n    raise SystemExit('Drop -PuseWheelDistribution or run on amd64')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `uname -m` before adding -PuseWheelDistribution.","Use linux/amd64 containers on ARM hosts for Dataflow test builds."],"tags":["gradle","python","dataflow","platform","arm64"],"backgroundTag":"unsupported-platform","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}