commit | 1a9f92f01bb9d51f744e22b907e7a3c728793e9d | [log] [tgz] |
---|---|---|
author | Keyong Han <keyonghan@google.com> | Wed Aug 31 17:30:18 2022 +0000 |
committer | CQ Bot Account <flutter-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Aug 31 17:30:18 2022 +0000 |
tree | bf4ded0005a4e5fb6fda48256cff504936f09d79 | |
parent | b4ae030ea42a1488e95cbf6b0e48f4bd5c7f068f [diff] |
Revert "Trigger a staging builder by another builder" This reverts commit 47e301c7bb9201a8301d7a529bb8f2f6514a70a1. Reason for revert: This is not working as expected. Original change's description: > Trigger a staging builder by another builder > > We have been working on devicelab build+test separation. This CL investigate how a builder is triggered by another builder. We expect to trigger test step builders by build step builders when they finish building the artifact. > > Change-Id: I94e13c2ee7a7a33f4dc7ef3fcf8c099bd0c48db0 > Reviewed-on: https://flutter-review.googlesource.com/c/infra/+/33126 > Reviewed-by: Yusuf Mohsinally <mohsinally@google.com> > Commit-Queue: Keyong Han <keyonghan@google.com> TBR=godofredoc@google.com,keyonghan@google.com,flutter-scoped@luci-project-accounts.iam.gserviceaccount.com,mohsinally@google.com,ricardoamador@google.com Change-Id: Ib6962dee6051d0fcbf2c16c54e87d92a593f15e1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://flutter-review.googlesource.com/c/infra/+/33243 Reviewed-by: Keyong Han <keyonghan@google.com> Commit-Queue: Keyong Han <keyonghan@google.com>
Contains configuration and tools related to Flutter's build infrastructure.
Configuration is generated by lucicfg
, which is part of depot_tools
. Rather than updating the individual .cfg files, updates should be made to config/main.star
. That file can then be run to regenerate the configuration.
.star
files (do not edit .cfg
files; those are generated)../config/main.star
..cfg
files have been updated (e.g. via git status
)..star
files and .cfg
files.This section talks about test shards defined in dev/bots/test.dart used to split framework tests into smaller chunks that can be tested in parallel. This does not refer to LUCI/Swarming shards.
When you add a new shard it does not automatically run in LUCI. To add it to LUCI you need to add a new builder in the framework_config.star. Typically, you'll add two builders, one “try” builder that tests PRs, and one “prod” builder that tests submitted PRs on the master branch.
Here's an example of a “try” builder:
common.linux_try_builder( name = "Linux web_tests|web_tests", recipe = "flutter/flutter", repo = repos.FLUTTER, list_view_name = list_view_name, properties = { "shard": "web_tests", "subshards": ["0", "1", "2", "3", "4", "5", "6", "7_last"], "dependencies": [{"dependency": "android_sdk"}, {"dependency": "chrome_and_driver"}, {"dependency": "goldctl"}], }, caches = [ swarming.cache(name = "pub_cache", path = ".pub_cache"), swarming.cache(name = "android_sdk", path = "android29"), ], )
The easiest way to add a new one is to copy an existing builder and tweak the parameters.
As of today, it is not possible to test configuration changes until after they propagated to LUCI. One way to mitigate the risk of breakage is to run your test shard using an existing builder. To do that, find a builder in one of the .star
files (e.g. framework_config.star
) that satisfies the dependencies of the new test shard, then use the led
tool (bundled with depot_tools
) to run it.
For example, let‘s say you are adding an integration test shard for web, and the new shard needs a Linux builder with Chrome and ChromeDriver in order to run. Luckily, there’s already the Linux web_tests
builder that satisfies these dependencies. To test the new shard, use the Linux web_tests
builder, but ask it to run a different shards and/or subshard. Let‘s say the new test shard is called “foo”, it has 3 subshards (0, 1, 2_last) and it’s currently staged in pull request 99999. You can run it using the following led
command:
led get-builder "luci.flutter.try:Linux web_tests" \ | led edit -pa git_ref='refs/pull/99999/head' \ | led edit -pa git_url='https://github.com/flutter/flutter' \ | led edit -pa shard='foo' \ | led edit -pa subshard='1' \ | led launch
One may speed up the propagation of the new configuration files by visiting the luci-config web ui, logging in, and searching for projects/flutter. from there, one may click on the projects/flutter search result and click the download icon to force an update.