xref: /aosp_15_r20/external/pigweed/docs/infra/rollers.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1.. _docs-rollers:
2
3=======
4Rollers
5=======
6
7-----------------
8What is a roller?
9-----------------
10A roller is an infra job that updates the revision of a pinned project (or
11version of a pinned CIPD package) in a repository with submodules or an
12Android Repo Tool manifest. The Pigweed Infra team generally maintains the
13logic and configuration of rollers, while various project and/or package
14owners across are responsible for keeping them green.
15
16-----------
17Our rollers
18-----------
19Rollers from Pigweed into downstream projects can be seen on the
20`Pigweed Console <https://ci.chromium.org/p/pigweed/g/pigweed.pigweed/console>`_.
21Many more rollers are visible when logged in using an @google.com account than
22when not.
23
24Rollers specific to individual downstream projects can be found by browsing
25the :ref:`builder visualization <docs-builder-viz>` and looking under the
26"roll" columns.
27
28--------------------
29How do rollers work?
30--------------------
31Project rollers will poll Gitiles periodically (often every three hours, but
32this is configurable) for new commits to watched
33repositories. Package rollers will poll CIPD at their configured frequencies
34for new packages which match their watched refs (e.g. 'latest').
35
36When a new change is detected, luci-scheduler emits a 'trigger' for the
37roller. The 'trigger' does not necessarily invoke the roller immediately as
38luci-scheduler is configured to only allow a single job of each roller to be
39running at once. It will batch triggers until there is no job running, then
40create a roller job with the properties of the latest trigger in the batch.
41
42Once the roller job begins, it creates a change which updates the relevant
43project or package pin(s) and attempts to submit the change via CQ. If the CQ
44run fails, then the roller will abandon that change. If the CQ run succeeds, the
45change is submitted and the roller succeeds.
46
47On most hosts, rollers vote on the ``Bot-Commit`` label which bypasses the
48``Code-Review`` requirement. On other hosts, rollers vote on ``Code-Review``,
49or Gerrit is configured to not enforce the ``Code-Review`` requirement for
50changes uploaded by the roller.
51
52In the event of a CQ failure, if the roller attempts to re-roll the exact same
53revision or package(s), it will re-use the existing change and only re-run the
54failing portions of CQ.
55
56-------------------------------
57How do I fix a roller breakage?
58-------------------------------
59Most rollers will fix themselves. Failing rollers are periodically rerun by
60the
61`"rerunner" builders <https://ci.chromium.org/ui/p/pigweed/g/rerunner/builders>`_,
62so any flaky tests or temporary failures should resolve themselves.
63
64However, if you are a Googler on a team using Pigweed's infrastructure, you
65should be able to manually trigger a roller by finding it in the Builder Viz
66and clicking the "scheduler" link. (You may need to log in to
67luci-scheduler.) This is batched with all other 'triggers' as to not disrupt
68the normal roller flow, but will allow you to restart the roll process.
69
70-----------------------------------------------
71How do I disable a roller? Create a new roller?
72-----------------------------------------------
73*(Googlers only)* See `go/pw-config-tasks <http://go/pw-config-tasks>`_. But most
74of the time the appropriate action is to file a bug at
75`go/pw-infra-bug <http://go/pw-infra-bug>`_.
76