From e94959852e58041140d6ddd44d5b126102823f2d Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Mon, 23 Sep 2024 12:27:54 -0400 Subject: [PATCH] Remove Linux orchestrator builds that only kick off one other build and wait (flutter/engine#55186) "Orchestrator" builders are top-level builds that can perform some caching, kick off "drone" sub-builds, and then do things with those build artifacts like run tests, or "generators" that do work on those artifacts. See more details in https://flutter.dev/go/engine-build-definition-language. Some orchestrators in [`ci/builders`](https://github.com/flutter/engine/tree/a2faed00c75663db3911843cff858cd66f7d228d/ci/builders) _only_ kick off one sub-build. This is suboptimal because: 1. The orchestrator uses a bot that does nothing except essentially idle. 2. The orchestrator has some overhead, so the orchestrator + single drone sub-build takes longer than just the sub-build run alone. 3. The "drone" sub-build often has a generic name like "Linux Engine Drone" which makes it difficult to keep track of which build is which. This PR: 1. Hoists a few of these Linux builds into [`ci/builders/standalone`](https://github.com/flutter/engine/tree/a2faed00c75663db3911843cff858cd66f7d228d/ci/builders/standalone) which are run as individual builds, and removes the orchestrator. 2. Swaps the recipe from `engine_v2/engine_v2` (orchestrator) to `engine_v2/builder` (standalone). 3. Moves the `drone_dimensions` from the orchestrator build json into .ci.yaml. | Builder | Before | After | | -------- | ------- | ------- | | `Linux clangd` | [9m & 2 Linux bots](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20clangd/6272/overview) ([drone build](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Engine%20Drone/2689993/overview)) | [6m & 1 Linux bot](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20clangd/6292/overview) | | `Linux linux_android_emulator_skia_tests_34` | [29m & 2 Linux bots](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20linux_android_emulator_skia_tests_34/663/overview) ([drone build](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20Engine%20Drone/2690008/overview)) | [25m & 1 Linux bot](https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20linux_android_emulator_skia_tests_34/678/overview) | Part of https://github.com/flutter/flutter/issues/155041 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- engine/src/flutter/.ci.yaml | 8 +- .../builders/linux_android_emulator_skia.json | 91 ------------------- .../linux_android_emulator_skia_34.json | 91 ------------------- .../ci/builders/linux_unopt_debug_no_rbe.json | 43 --------- .../linux_android_emulator_skia.json | 81 +++++++++++++++++ .../linux_android_emulator_skia_34.json | 81 +++++++++++++++++ .../standalone/linux_unopt_debug_no_rbe.json | 38 ++++++++ 7 files changed, 205 insertions(+), 228 deletions(-) delete mode 100644 engine/src/flutter/ci/builders/linux_android_emulator_skia.json delete mode 100644 engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json delete mode 100644 engine/src/flutter/ci/builders/linux_unopt_debug_no_rbe.json create mode 100644 engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia.json create mode 100644 engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia_34.json create mode 100644 engine/src/flutter/ci/builders/standalone/linux_unopt_debug_no_rbe.json diff --git a/engine/src/flutter/.ci.yaml b/engine/src/flutter/.ci.yaml index bc79a74b34..1f970459af 100644 --- a/engine/src/flutter/.ci.yaml +++ b/engine/src/flutter/.ci.yaml @@ -98,9 +98,10 @@ targets: bringup: true enabled_branches: - main - recipe: engine_v2/engine_v2 + recipe: engine_v2/builder properties: config_name: linux_android_emulator_skia + kvm: "1" dependencies: >- [ {"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"} @@ -118,9 +119,10 @@ targets: - name: Linux linux_android_emulator_skia_tests_34 enabled_branches: - main - recipe: engine_v2/engine_v2 + recipe: engine_v2/builder properties: config_name: linux_android_emulator_skia_34 + kvm: "1" dependencies: >- [ {"dependency": "goldctl", "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd"} @@ -382,7 +384,7 @@ targets: - flutter_frontend_server/** - name: Linux clangd - recipe: engine_v2/engine_v2 + recipe: engine_v2/builder properties: config_name: linux_unopt_debug_no_rbe diff --git a/engine/src/flutter/ci/builders/linux_android_emulator_skia.json b/engine/src/flutter/ci/builders/linux_android_emulator_skia.json deleted file mode 100644 index a3d3a63eb6..0000000000 --- a/engine/src/flutter/ci/builders/linux_android_emulator_skia.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "builds": [ - { - "drone_dimensions": [ - "device_type=none", - "os=Linux", - "kvm=1", - "cores=8" - ], - "gclient_variables": { - "use_rbe": true - }, - "gn": [ - "--android", - "--android-cpu=x64", - "--no-lto", - "--rbe", - "--no-goma", - "--target-dir", - "ci/android_emulator_skia_debug_x64" - ], - "dependencies": [ - { - "dependency": "goldctl", - "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" - } - ], - "name": "ci/android_emulator_skia_debug_x64", - "description": "Build for debug mode x64 Android Skia scenario app tests.", - "ninja": { - "config": "ci/android_emulator_skia_debug_x64", - "targets": [ - "flutter/impeller/toolkit/android:unittests", - "flutter/shell/platform/android:flutter_shell_native_unittests", - "flutter/testing/scenario_app" - ] - }, - "tests": [ - { - "language": "dart", - "name": "Android Scenario App Integration Tests (Skia)", - "test_timeout_secs": 900, - "max_attempts": 2, - "test_dependencies": [ - { - "dependency": "android_virtual_device", - "version": "android_35_google_apis_x64.textpb" - }, - { - "dependency": "avd_cipd_version", - "version": "build_id:8740267484269553649" - } - ], - "contexts": [ - "android_virtual_device" - ], - "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", - "parameters": [ - "--out-dir=../out/ci/android_emulator_skia_debug_x64", - "--no-enable-impeller" - ] - }, - { - "language": "dart", - "name": "Android Scenario App Integration Tests (Skia, SurfaceTexture)", - "test_timeout_secs": 900, - "max_attempts": 2, - "test_dependencies": [ - { - "dependency": "android_virtual_device", - "version": "android_35_google_apis_x64.textpb" - }, - { - "dependency": "avd_cipd_version", - "version": "build_id:8740267484269553649" - } - ], - "contexts": [ - "android_virtual_device" - ], - "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", - "parameters": [ - "--out-dir=../out/ci/android_emulator_skia_debug_x64", - "--no-enable-impeller", - "--force-surface-producer-surface-texture" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json b/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json deleted file mode 100644 index 2f14d32c85..0000000000 --- a/engine/src/flutter/ci/builders/linux_android_emulator_skia_34.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "builds": [ - { - "drone_dimensions": [ - "device_type=none", - "os=Linux", - "kvm=1", - "cores=8" - ], - "gclient_variables": { - "use_rbe": true - }, - "gn": [ - "--android", - "--android-cpu=x64", - "--no-lto", - "--rbe", - "--no-goma", - "--target-dir", - "ci/android_emulator_skia_debug_x64" - ], - "dependencies": [ - { - "dependency": "goldctl", - "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" - } - ], - "name": "ci/android_emulator_skia_debug_x64", - "description": "Build for debug mode x64 Android Skia scenario app tests.", - "ninja": { - "config": "ci/android_emulator_skia_debug_x64", - "targets": [ - "flutter/impeller/toolkit/android:unittests", - "flutter/shell/platform/android:flutter_shell_native_unittests", - "flutter/testing/scenario_app" - ] - }, - "tests": [ - { - "language": "dart", - "name": "Android Scenario App Integration Tests (Skia)", - "test_timeout_secs": 900, - "max_attempts": 2, - "test_dependencies": [ - { - "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" - }, - { - "dependency": "avd_cipd_version", - "version": "build_id:8740267484269553649" - } - ], - "contexts": [ - "android_virtual_device" - ], - "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", - "parameters": [ - "--out-dir=../out/ci/android_emulator_skia_debug_x64", - "--no-enable-impeller" - ] - }, - { - "language": "dart", - "name": "Android Scenario App Integration Tests (Skia, SurfaceTexture)", - "test_timeout_secs": 900, - "max_attempts": 2, - "test_dependencies": [ - { - "dependency": "android_virtual_device", - "version": "android_34_google_apis_x64.textpb" - }, - { - "dependency": "avd_cipd_version", - "version": "build_id:8740267484269553649" - } - ], - "contexts": [ - "android_virtual_device" - ], - "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", - "parameters": [ - "--out-dir=../out/ci/android_emulator_skia_debug_x64", - "--no-enable-impeller", - "--force-surface-producer-surface-texture" - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/engine/src/flutter/ci/builders/linux_unopt_debug_no_rbe.json b/engine/src/flutter/ci/builders/linux_unopt_debug_no_rbe.json deleted file mode 100644 index 19f205009b..0000000000 --- a/engine/src/flutter/ci/builders/linux_unopt_debug_no_rbe.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "_comment": [ - "This build is only used to generate compile_commands.json for clangd ", - "and should not be used for any other purpose.", - "", - "Note the `flutter/tools/font_subset` target is only used because if no ", - "targets are specified, the build will fail, and if an empty list of ", - "targets are specified, all targets are built (wasteful/slow)" - ], - "builds": [ - { - "drone_dimensions": ["device_type=none", "os=Linux", "cores=32"], - "gn": [ - "--runtime-mode", - "debug", - "--unoptimized", - "--prebuilt-dart-sdk", - "--no-lto", - "--no-rbe", - "--no-goma", - "--target-dir", - "ci/linux_unopt_debug_no_rbe" - ], - "name": "ci/linux_unopt_debug_no_rbe", - "description": "Tests clangd on Linux.", - "ninja": { - "config": "ci/linux_unopt_debug_no_rbe", - "targets": ["flutter/tools/font_subset"] - }, - "tests": [ - { - "language": "dart", - "name": "clangd", - "script": "flutter/tools/clangd_check/bin/main.dart", - "parameters": [ - "--clangd=buildtools/linux-x64/clang/bin/clangd", - "--compile-commands-dir=../out/ci/linux_unopt_debug_no_rbe" - ] - } - ] - } - ] -} diff --git a/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia.json b/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia.json new file mode 100644 index 0000000000..afc6dbf6b4 --- /dev/null +++ b/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia.json @@ -0,0 +1,81 @@ +{ + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x64", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_skia_debug_x64" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_skia_debug_x64", + "description": "Build for debug mode x64 Android Skia scenario app tests.", + "ninja": { + "config": "ci/android_emulator_skia_debug_x64", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_35_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller" + ] + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia, SurfaceTexture)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_35_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller", + "--force-surface-producer-surface-texture" + ] + } + ] +} diff --git a/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia_34.json b/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia_34.json new file mode 100644 index 0000000000..cbaf9a95b7 --- /dev/null +++ b/engine/src/flutter/ci/builders/standalone/linux_android_emulator_skia_34.json @@ -0,0 +1,81 @@ +{ + "gclient_variables": { + "use_rbe": true + }, + "gn": [ + "--android", + "--android-cpu=x64", + "--no-lto", + "--rbe", + "--no-goma", + "--target-dir", + "ci/android_emulator_skia_debug_x64" + ], + "dependencies": [ + { + "dependency": "goldctl", + "version": "git_revision:720a542f6fe4f92922c3b8f0fdcc4d2ac6bb83cd" + } + ], + "name": "ci/android_emulator_skia_debug_x64", + "description": "Build for debug mode x64 Android Skia scenario app tests.", + "ninja": { + "config": "ci/android_emulator_skia_debug_x64", + "targets": [ + "flutter/impeller/toolkit/android:unittests", + "flutter/shell/platform/android:flutter_shell_native_unittests", + "flutter/testing/scenario_app" + ] + }, + "tests": [ + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller" + ] + }, + { + "language": "dart", + "name": "Android Scenario App Integration Tests (Skia, SurfaceTexture)", + "test_timeout_secs": 900, + "max_attempts": 2, + "test_dependencies": [ + { + "dependency": "android_virtual_device", + "version": "android_34_google_apis_x64.textpb" + }, + { + "dependency": "avd_cipd_version", + "version": "build_id:8740267484269553649" + } + ], + "contexts": [ + "android_virtual_device" + ], + "script": "flutter/testing/scenario_app/bin/run_android_tests.dart", + "parameters": [ + "--out-dir=../out/ci/android_emulator_skia_debug_x64", + "--no-enable-impeller", + "--force-surface-producer-surface-texture" + ] + } + ] +} diff --git a/engine/src/flutter/ci/builders/standalone/linux_unopt_debug_no_rbe.json b/engine/src/flutter/ci/builders/standalone/linux_unopt_debug_no_rbe.json new file mode 100644 index 0000000000..05a775a1ca --- /dev/null +++ b/engine/src/flutter/ci/builders/standalone/linux_unopt_debug_no_rbe.json @@ -0,0 +1,38 @@ +{ + "_comment": [ + "This build is only used to generate compile_commands.json for clangd ", + "and should not be used for any other purpose.", + "", + "Note the `flutter/tools/font_subset` target is only used because if no ", + "targets are specified, the build will fail, and if an empty list of ", + "targets are specified, all targets are built (wasteful/slow)" + ], + "gn": [ + "--runtime-mode", + "debug", + "--unoptimized", + "--prebuilt-dart-sdk", + "--no-lto", + "--no-rbe", + "--no-goma", + "--target-dir", + "ci/linux_unopt_debug_no_rbe" + ], + "name": "ci/linux_unopt_debug_no_rbe", + "description": "Tests clangd on Linux.", + "ninja": { + "config": "ci/linux_unopt_debug_no_rbe", + "targets": ["flutter/tools/font_subset"] + }, + "tests": [ + { + "language": "dart", + "name": "clangd", + "script": "flutter/tools/clangd_check/bin/main.dart", + "parameters": [ + "--clangd=buildtools/linux-x64/clang/bin/clangd", + "--compile-commands-dir=../out/ci/linux_unopt_debug_no_rbe" + ] + } + ] +}