Chromium DevTools has an infrastructure component that consists of recipes that define how to build and test the frontend in CQ and CI plus a set of rollers to automate dependency updates.
The configuration for the DevTools infrastructure is in the infra/config branch. The recipes are located in the chromium/tools/build repository.
Luci-config app is consuming the configuration from infra/config. You can force refresh from the app. DevTools configuration is located here.
mkdir devtools-infra cd devtools-infra fetch devtools-frontend cd devtools-frontend git checkout infra/config
Run git clean -fd and remove the rest of the remaining files from the main branch.
First, create a branch for the change and set upstream to the infra/config:
git new-branch branch-name --upstream_current
buckets/try.star: configurations for default try-jobs for a CL.buckets/try-misc.star: configurations for additional builders that can be manually added to CLs in Gerrit or via git cl try.buckets/cpp_debugging_extension.star: configurations for the C++ debugging extension tests.buckets/serving_app.star: configurations for the DevTools server app.buckets/ci.star: configurations to run on the main branch after a CL is submitted also known as CI or Waterfall builders.buckets/ci-hp.star: configurations for the highly privileged builders that rolls dependencies.After you update a .star file, re-generate generated files using lucicfg main.star.
These .star definitions roughly correspond to the CI console view https://ci.chromium.org/ui/p/devtools-frontend.
Run git cl upload. Infra changes are submitted similar to the regular frontend CLs using git cl upload. After a review on Gerrit, the change will be merged into the infra branch.
Note that the changes made in the CL are not picked up by the bots before the change is merged. After the CL is merged, the change will be deployed to the bots.
Follow the instructions at https://chromium.googlesource.com/chromium/tools/build/+/refs/heads/main/recipes/README.md and upload a CL for chromium/tools/build.
The DevTools recipes are defined in chromium/tools/build repository. Once a change is made there, the recipes are packaged as a cipd package and the infra/config data defines how to fetch that cipd package. The recipes are bundled by https://ci.chromium.org/ui/p/chrome/builders/official.infra/recipe-bundler.
DevTools recipes live at https://chromium.googlesource.com/chromium/tools/build/+/refs/heads/main/recipes/recipes/devtools/.
The try.star file in the infra/config branch contains the logic that determines which builders are needed to verify a CQ. See custom_locationsfilters for the current logic.
Some of the filters currently in use are:
cpp_debug_extension builders only trigger on changes related to the extensiondtf_check_no_bundle builder only trigger on GN changesAt the end of every release cycle Chromium will cut a new branch for the current release.
The branch cut process for DevTools is as simple as updating the beta, stable and extended branch numbers in infra/config (example CL):
lucicfg main.star), commit, upload and add liviurau@chromium.org as reviewer (or another infra team member)Changing these numbers will reconfigure the CI and CQ for beta, stable and extended branches. After landing the change the three branch consoles will get reset.
Sometimes we might need to avoid a misbehaing builder closing the tree. Or maybe we need to make a FYI builder a tree closer.
To do so find your builder buckets/ci.star file and toggle the notification_muted property (defaults to False if not present). Setting the property to True/False will remove/add the tree closer notifier for this builder. Make sure you regenerated the cfg files and upload your changes. Example.
CQ builders come in 3 flavors:
To toggle this behaviour you need to edit buckets/try.star file (example):
cq_builders.devtools_builders listcq_builders.includable_only_builders list; remove it from the list to make it a regular buildercq_builders.experiment_builders dictionary together with the desired experiment rate percentage; remove it from the list to make it a regular builderTo add a new try-builder edit the buckets/try.start file to call one of the existing functions that generate builder definitions:
try_builder used for builder with recipes that do not orchestrate other builders:dtf_check_no_bundle)devtools_frontend_linux_blink_light_rel_fastbuild)try_pair used for builders with orchestrating recipes (delegates to a compilator builder before delegating testing to swarming)Alternatively define your own builder function and call it for the instances you need (see presubmit_builder and cpp_debug_extension_try).
You will need add your new builder to the cq_builders.devtools_builders list.
To control the CL blocking behaviour of your builder see above.
To control if the builder should be not present in the CQ for branches, add your builder to cq_builders.chromium_builders list.
To add a new try-builder edit the buckets/ci.start file to add a new builder_descriptor to the builders of generate_ci_configs function call.
In your descriptor decide for the name of builder, the recipe, any other custom properties you might need and for which configurations (consoles) to include your builder (ci stands for the main waterfall console). Example.
In CQ the builders that get most attention are dtf_*_rel builders. These builders run the devtools/trybot_tester recipe and are responsible with building DevTools Frontend and running our tests.
Below is a detailed description of what happens in such a build:
bot_update and gclient runhooks step where the tip-of-tree for devtools-frontend gets checked out, your changes get patched on top of it and dependencies get updated.initialization step)bot_update of its owngn step)compile) the projectcompilator_propertiescompilator_properties to findcas_digest to be used when triggering tests on swarminge2e_non_hosted_test_list for sharding the e2e tests executionRun tests step:Trigger Tests) substep.Flake exonaration attempt step):Detect flakes in new tests stepgit diff to determine which tests were added/modifedThe first place where a build usualy fails is on bot_update and this usually happens because your changes cannot be applied on top of the current tip-of-tree. Rebase your CL and solve any merge conflicts and this failure will go away.
Another common failure is a compilation failure. You can insepct the compilator builder (dtf_*_compiler_rel) separately by following the link next to the compilator steps step.
If you have too many tests failing in the default phase the exoneration phase gets skipped.
A test might not get exonerated in your build even if your CL does not touch anything related to it. The exoneration phase will re-run previously faling tests a number of times and at any point the test passes the tests gets exonerated. Therefore a test can have a recent history of getting exonerated even if it consitently failed 4 times out of 5 runs for some time. Try to correlate your failure with a luci-analysys report on this test and skip it untill the flakiness gets resolved.