Steven Bennetts | 33ee0bd | 2017-03-24 21:06:06 | [diff] [blame] | 1 | # Life of a Chrome commit on Chrome OS |
| 2 | |
| 3 | This document provides a brief overview of how Chrome changes get committed |
| 4 | and tested on Chrome OS. |
| 5 | |
| 6 | For details on non-Chrome **Chrome OS** changes, see |
| 7 | [Life of a Chrome OS commit](cros_commit_pipeline.md). |
| 8 | |
| 9 | ## Create a Chrome change |
| 10 | |
| 11 | ### Make and upload changes |
| 12 | |
| 13 | See the section on [contributing code] at [chromium.org] |
| 14 | for how to create a branch and make changes. |
| 15 | |
| 16 | Once a change is completed and tested locally, upload it to [codereview]: |
| 17 | |
| 18 | ```git cl upload``` |
| 19 | |
| 20 | ### Have your change reviewed |
| 21 | |
| 22 | Use [codereview] to review your change and prepare it for the commit queue. |
| 23 | See [contributing code] for details. |
| 24 | |
| 25 | ## The Chrome commit pipeline |
| 26 | |
| 27 | ### The Commit Queue and Tryservers |
| 28 | |
| 29 | The Chrome [commit queue] has a very large pool of builders that will apply |
| 30 | *individual* changes to the master, build them, and test them. |
| 31 | |
| 32 | #### Before the patch is approved |
| 33 | |
| 34 | A developer can click on 'Choose trybots' to select specific builders to run |
| 35 | (there are a lot of them). |
| 36 | |
| 37 | Alternately they can click 'CQ dry run' to run all of the builders that the |
| 38 | CQ will run in advance, without scheduling a commit. |
| 39 | |
| 40 | #### The commit queue |
| 41 | |
| 42 | Once a change has been reviewed and approved, the developer can check |
| 43 | the 'Commit' checkbox. This will mark the change as ready for the CQ. |
| 44 | |
| 45 | Depending on what was changed, the CQ selects a suite of tryserver builders for |
| 46 | [win], [mac], [linux], and [android]. |
| 47 | |
| 48 | Note: The [linux] builders include **linux-chromeos** builders (linux builders |
| 49 | with `chromeos=1`). These run `browser_tests` and `unit_tests` for Chrome on |
| 50 | Chrome OS. |
| 51 | |
| 52 | If the CQ builders succeed then the change will be committed to the master. |
| 53 | |
| 54 | Otherwise the 'Commit' checkbox will need to be re-checked once the failure |
| 55 | is fixed or determined to be unrelated to the change. |
| 56 | |
| 57 | ### The chromium waterfall |
| 58 | |
| 59 | Once a change is committed on the master, it is picked up by the |
| 60 | [chromium waterfall]. This includes a very large number of builders that will |
| 61 | thoroughly test the commit, including a number of [linux-chromeos builders]. |
| 62 | |
| 63 | *Note: Due to lab limitations not every builder in the waterfall is included |
| 64 | in the Commit Queue. For Chrome OS there are a few Debug test builders that only |
| 65 | exist on the waterfall. Failures there are infrequent but possible, so keep an |
| 66 | eye out!* |
| 67 | |
| 68 | ## The Chrome OS commit pipeline for Chrome changes |
| 69 | |
| 70 | Once a Chrome change lands in the master, it needs to get through the [PFQ] |
| 71 | before it will be picked up by Chrome OS. This is to protect the Chrome OS |
| 72 | builders, since Chrome OS depends heavily on Chrome itself. |
| 73 | |
| 74 | ### The PFQ Informational builders |
| 75 | |
Michael Giuffrida | a5ef8e0 | 2019-01-25 23:34:44 | [diff] [blame] | 76 | Continuous PFQ builders in the [chrome_informational] group apply the most |
| 77 | recent Chrome changes to the most recent Chrome OS build. This group also has |
| 78 | open-source Chromium builders and a builder that runs telemetry unit tests. |
Steven Bennetts | 33ee0bd | 2017-03-24 21:06:06 | [diff] [blame] | 79 | |
| 80 | ### The PFQ builders |
| 81 | |
| 82 | The [PFQ] builds a daily Chrome version and the most recent Chrome OS |
| 83 | version (using the manifest from the latest CQ/paladin build). It then builds a |
| 84 | Chrome OS image and runs several test suites against the result. |
| 85 | |
| 86 | * Once daily (currently at 8 PM PT) a Chrome release branch is created and |
| 87 | tagged. |
| 88 | * Sometimes additional tags are created for the release branch, e.g. after |
| 89 | a revert or fix for a bad change is merged to the branch. |
| 90 | * Whenever such a branch tag is created, a new master [PFQ] build is triggered. |
| 91 | * The master triggers a series of Chrome and Chromium slave builders covering |
| 92 | all cpu types (arm, amd64, and x86) and important variants. Coverage is |
| 93 | ensured by [chromite/cbuildbot/binhost_test]. |
| 94 | * PFQ Builders do the following: |
| 95 | * Check out the Chrome OS source from the LKGM manifest. |
| 96 | * Check out the Chrome source from the tagged Chrome release branch. |
| 97 | * Build Chrome OS, including Chrome from the local source checkout. |
| 98 | * Run VM tests on all non ARM builders. |
| 99 | * Run HW tests on builders where HW is available, including ARC tests on |
| 100 | boards that support it. |
Michael Giuffrida | a5ef8e0 | 2019-01-25 23:34:44 | [diff] [blame] | 101 | * Verify the Simple Chrome environment for developers (in parallel with HW |
| 102 | tests). |
| 103 | * Download the tarball built by the respective Chrome OS "release" or |
| 104 | "full" builder that includes necessary dependencies for building |
| 105 | Chrome for Chrome OS. |
| 106 | * Test the [Simple Chrome workflow] with this tarball. |
| 107 | * If all non-experimental builders pass, the PFQ master generates a |
| 108 | Chromium CL to update `chromeos/CHROMEOS_LKGM` and sends it to the CQ. |
| 109 | This file determines which version of the tarball Simple Chrome will |
| 110 | try to download. |
Steven Bennetts | 33ee0bd | 2017-03-24 21:06:06 | [diff] [blame] | 111 | |
| 112 | |
Evan Benn | 6a6383b | 2019-10-31 23:01:07 | [diff] [blame^] | 113 | [contributing code]: contributing.md |
Michael Giuffrida | a5ef8e0 | 2019-01-25 23:34:44 | [diff] [blame] | 114 | [commit queue]: https://chromium.googlesource.com/chromium/src/+/master/docs/infra/cq.md |
Steven Bennetts | 33ee0bd | 2017-03-24 21:06:06 | [diff] [blame] | 115 | [chromium.org]: http://www.chromium.org |
| 116 | [codereview]: https://codereview.chromium.org/ |
| 117 | [win]: https://build.chromium.org/p/tryserver.chromium.win |
| 118 | [mac]: https://build.chromium.org/p/tryserver.chromium.mac |
| 119 | [linux]: https://build.chromium.org/p/tryserver.chromium.linux |
| 120 | [android]: https://build.chromium.org/p/tryserver.chromium.android/waterfall |
| 121 | [chromium waterfall]: https://build.chromium.org/p/chromium/waterfall |
| 122 | [linux-chromeos builders]: https://build.chromium.org/p/chromium.chromiumos/waterfall |
Michael Giuffrida | a5ef8e0 | 2019-01-25 23:34:44 | [diff] [blame] | 123 | [PFQ]: http://go/legoland |
| 124 | [chrome_informational]: http://go/legoland/builderSummary?buildBranch=master&builderGroups=chrome_informational |
Steven Bennetts | 33ee0bd | 2017-03-24 21:06:06 | [diff] [blame] | 125 | [chromite/cbuildbot/binhost_test]: https://cs.corp.google.com/chromeos_public/chromite/cbuildbot/binhost_test.py |
| 126 | [Chrome LKGM]: https://yaqs.googleplex.com/eng/q/5254238507106304 |