Coder Social home page Coder Social logo

dnfield / flutter-infra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hinoka/flutter-infra

0.0 2.0 0.0 2.53 MB

Contains configuration and tools related to Flutter's build infrastructure.

License: BSD 3-Clause "New" or "Revised" License

Python 50.18% Shell 49.82%

flutter-infra's Introduction

Flutter LUCI Service Configurations

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.

Updating the configuration

  • Edit the desired .star files (do not edit .cfg files; those are generated).
  • Execute ./config/main.star.
  • Observe that the .cfg files have been updated (e.g. via git status).
  • Create a pull request containing changes both to the .star files and .cfg files.
  • Review and submit the pull request as normal.
  • Changes propagate to LUCI automatically. Go to LUCI config UI to check that new changes have been applied.

Adding new framework test shards

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.

Testing new shards

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

Forcing the propagation of these configurations

Configuration changes are read by the LUCI Configuration Service from a git-on-borg mirror of this repo. Both the github -> googlesource mirroring and luci-config reading updated changes happen as scheduled tasks.

Once a change has reached the mirror, 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.

flutter-infra's People

Contributors

amirh avatar annagrin avatar caseyhillers avatar cbracken avatar chinmaygarde avatar christopherfujino avatar cyanglaz avatar digiter avatar dnfield avatar gaaclarke avatar goderbauer avatar godofredoc avatar gspencergoog avatar gw280 avatar hinoka avatar hixie avatar iskakaushik avatar jason-simmons avatar jiahaog avatar jmagman avatar jonahwilliams avatar keyonghan avatar longcatislooong avatar orn688 avatar piinks avatar stuartmorgan avatar yjbanov avatar yusuf-goog avatar yusufm avatar yz-zhi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.