[Mac] Add support for butler.py to generate Mac ARM64 deployment zip - #5442
[Mac] Add support for butler.py to generate Mac ARM64 deployment zip#5442JuanMBriones wants to merge 4 commits into
Conversation
|
Looks like All-Tests and Run basic tests are failing. Can you fix those? |
g-ortuno
left a comment
There was a problem hiding this comment.
Please add a description to the PR! It should summarize all the changes we are making and why.
9a3f9b8 to
873518f
Compare
Thanks for the review:D I just modified the commit message. Sorry I forgot about this! |
873518f to
3e406ac
Compare
I already fixed failing tests. I saw an error on https://github.com/google/clusterfuzz/pull/5442/checks?check_run_id=99666204114 but it seems theres no correlation with the changes |
g-ortuno
left a comment
There was a problem hiding this comment.
Just had a few small comments. Still need to take a look at the tests; I'll do those tomorrow morning.
### Problem ClusterFuzz lacked support for generating macOS ARM64 deployment zip packages and running bots on Apple Silicon. Additionally, packaging failed due to mismatched macOS wheel SDK tags in pip download, and is_supported_cpu_arch_for_job incorrectly parsed string CPU_ARCH values. ### Changes * butler.py & constants.py: Add macos_arm64 platform target, fallback SDK tags, and Python 3.7–3.11 ABIs. * common.py: Download platform pip requirements individually to resolve differing wheel tags, and support ARM64 ChromeDriver. * platform_requirements.txt: Add native C-extension packages (bcrypt, cffi, cryptography, google-crc32c, PyYAML, wrapt). * environment.py: Add get_cpu_arch() and support arch-specific tool paths in get_default_tool_path(). * update_task.py: Map macOS ARM64 bots to macos_arm64 deployment packages. * commands.py: Fix CPU_ARCH parsing in is_supported_cpu_arch_for_job(). * Tests: Add unit tests for environment arch detection, tool path resolution, deployment URLs, and job arch validation. Signed-off-by: Manuel Briones <manuelbriones@google.com>
- Rename PLATFORMS to DEPLOYMENT_TARGETS with backward-compatible alias. - Add macOS version tag comment in constants.py. - Use tempfile.TemporaryDirectory and add explanatory comments in common.py. - Remove default platform argument in butler.py package command. - Add documentation headers to Pipfile and platform_requirements.txt. - Use platform.machine() for host architecture detection in update_task.py. - Update CPU_ARCH format comment in commands.py. - Simplify get_default_tool_path and remove BOT_CPU_ARCH in environment.py. - Update and add unit tests in environment_test.py and update_task_test.py. ### Tests Executed * environment_test: 40/40 passed (GetCpuArchTest, GetDefaultToolPathTest, etc.) * update_task_test: 18/18 passed (GetSourceUrlTest, GetNewerSourceRevisionTest, etc.) * commands_test: 10/10 passed (IsSupportedCpuArchForJobTest, SetTaskPayloadTest, UpdateEnvironmentForJobTest) * testcase_manager_test: 5/5 passed (UploadTestcaseOutputTest) * Linters: pylint passed with 0 errors, yapf passed with 0 diffs.
e539a94 to
06e6337
Compare
…h test - update_task.py: Rename platform_name to deployment_target and platform_mappings to deployment_target_mappings in get_source_url(). - utils.py: Rename get_platform_deployment_filename() to get_deployment_target_filename() and update parameter from platform to deployment_target (retaining backward-compatible alias). - package.py: Update call sites to use get_deployment_target_filename(). - environment_test.py: Add unit test verifying get_cpu_arch() delegation for Android devices. Tested: - core/system/environment_test.py (45/45 passed) - core/bot/tasks/update_task_test.py (18/18 passed) - core/local/butler/package_test.py (5/5 passed) - core/local/butler/deploy_test.py (13/13 passed) - butler.py lint (clean) Signed-off-by: Manuel Briones <manuelbriones@google.com>
06e6337 to
2f126e5
Compare
[Mac] Add support for macOS ARM64 deployment packages and bot execution
Problem
ClusterFuzz lacked support for generating macOS ARM64 deployment zip
packages and running bots on Apple Silicon. Additionally, packaging
failed due to mismatched macOS wheel SDK tags in pip download, and
is_supported_cpu_arch_for_job incorrectly parsed string CPU_ARCH values.
Changes
SDK tags, and Python 3.7–3.11 ABIs.
differing wheel tags, and support ARM64 ChromeDriver.
cffi, cryptography, google-crc32c, PyYAML, wrapt).
in get_default_tool_path().
deployment URLs, and job arch validation.