blob: 24f7a9bb71977f400d2fbef2f92b943cf4af7533 [file] [log] [blame] [view]
Joe Gregorio9b5ffb22023-04-20 11:29:29 -04001# AutoRoll
borenet3e8cd1a2015-10-20 07:43:55 -07002
Eric Boren8ac38d72019-08-26 10:18:48 -04003AutoRoll is a program which creates and manages DEPS rolls of a child project,
Eric Borene1bea252016-10-19 09:36:13 -04004eg. Skia, into a parent project, eg. Chrome.
borenet3e8cd1a2015-10-20 07:43:55 -07005
Eric Borenf0928222023-05-10 17:36:31 +00006## Requests and Bug Reports
7
8To request a new roller, visit
Eric Borendadef8a2024-11-04 16:50:40 +00009https://issues.skia.org/issues/new?component=1389291&template=1850622. For all
Eric Borenf0928222023-05-10 17:36:31 +000010other autoroll-related bugs and requests, please use
Eric Borendadef8a2024-11-04 16:50:40 +000011https://issues.skia.org/issues/new?component=1389291&template=1850466.
Eric Borenf0928222023-05-10 17:36:31 +000012
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040013## For Gardeners of Parent Projects
Eric Boren8ac38d72019-08-26 10:18:48 -040014
15If a roll has caused a breakage, feel free to revert first and ask questions
16later. Generally you should stop the roller first, otherwise rolls will continue
17to land and compound the problem. The controls for the roller should be linked
18in the roll commit message. It is polite and good practice to directly contact
19someone on that team which owns the roller and work with them as needed to get
20the rolls going again.
21
22If a roller has gone rogue somehow, eg. uploading too many rolls, chewing up bot
23capacity, etc, please stop the roller and file a bug:
Josip Sokcevic1200a172023-10-06 14:07:20 -070024https://issues.skia.org/issues/new?component=1389291&template=1850622
Eric Boren8ac38d72019-08-26 10:18:48 -040025If you need immediate attention, contact skiabot@google.com. Note that we do not
Eric Boren3a28d382022-05-17 09:41:44 -040026use pagers, and our gardener is generally only active during working hours.
Eric Boren8ac38d72019-08-26 10:18:48 -040027
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040028## For Child Project Roller Owners
Eric Boren8ac38d72019-08-26 10:18:48 -040029
30In the case of any problems or unexpected behavior, please stop the roller and
31file a bug:
Josip Sokcevic1200a172023-10-06 14:07:20 -070032https://issues.skia.org/issues/new?component=1389291&template=1850622
Eric Boren8ac38d72019-08-26 10:18:48 -040033If you need immediate attention, contact skiabot@google.com. Note that we do not
Eric Boren3a28d382022-05-17 09:41:44 -040034use pagers, and our gardener is generally only active during working hours.
Eric Boren8ac38d72019-08-26 10:18:48 -040035
36If rolls are failing due to a breakage in the parent repo, you generally do not
37need to stop the roller unless you are concerned about saving commit queue
38capacity. If rolls are failing due to a broken commit in the child repo, use
39your judgment as to whether to stop the roller; it isn't strictly required,
40since the roller will continue to retry as new commits land, but it does save
41commit queue capacity if you know that the rolls are doomed to fail until a fix
42or revert lands.
43
44Stopping a roller causes any active roll to be abandoned. You can take advantage
45of this behavior if you know that the current roll is doomed to fail and the
46next will contain a fix: rather than waiting for the commit queue to fail, stop
47the roller, wait for the current roll to be abandoned, and resume the roller.
48
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040049## Configuration
Eric Boren3a28d382022-05-17 09:41:44 -040050
51Configuration files for each of the autorollers may be found
52[here](https://skia.googlesource.com/skia-autoroll-internal-config) (Googlers
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040053only). Feel free to make a CL to modify a roller config, or
Josip Sokcevic1200a172023-10-06 14:07:20 -070054[file a bug](https://issues.skia.org/issues/new?component=1389291&template=1850622)
Eric Boren3a28d382022-05-17 09:41:44 -040055to request a change.
56
Kevin Lubicka88cfda2023-05-26 09:45:05 -040057The text proto which governs configuration can be read [here](https://skia.googlesource.com/buildbot/+/refs/heads/main/autoroll/go/config/config.proto).
58
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040059## AutoRoll Modes
borenet3e8cd1a2015-10-20 07:43:55 -070060
Eric Borene1bea252016-10-19 09:36:13 -040061There are three modes in which the roller may run:
borenet3e8cd1a2015-10-20 07:43:55 -070062
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040063#### Running
borenet3e8cd1a2015-10-20 07:43:55 -070064
Eric Boren8ac38d72019-08-26 10:18:48 -040065This is the "normal" mode. The roller will upload DEPS roll CLs, close those
66which fail, and upload new CLs until the child repo is up-to-date in the parent
67repo's DEPS.
borenet3e8cd1a2015-10-20 07:43:55 -070068
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040069#### Stopped
Eric Borene1bea252016-10-19 09:36:13 -040070
Eric Boren8ac38d72019-08-26 10:18:48 -040071The roller will not upload any CLs. Any in-progress roll CL will be closed when
72the roller is stopped.
Eric Borene1bea252016-10-19 09:36:13 -040073
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040074#### Dry Run
Eric Borene1bea252016-10-19 09:36:13 -040075
76The roller will upload CLs and run the commit queue dry run. If the
77dry run succeeds, the CL is left open until either the roller is set back to
78"running" mode, in which case the CL re-enters the commit queue, or until one
Eric Boren8ac38d72019-08-26 10:18:48 -040079or more commits lands in the child repo, in which case the roller closes the
Eric Borene1bea252016-10-19 09:36:13 -040080CL and uploads a new one.
81
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040082## AutoRoll Strategies
Eric Boren23a71722022-05-02 10:50:19 -040083
84There are three strategies which the roller may use to choose the next revision
85to roll:
86
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040087#### Batch
Eric Boren23a71722022-05-02 10:50:19 -040088
89Using this strategy, the roller always chooses the most recent revision to roll,
90potentially resulting in large batches of commits in each roll.
91
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040092#### N-Batch
Eric Boren23a71722022-05-02 10:50:19 -040093
94Similar to the "batch" strategy, the roller will upload rolls containing
95multiple commits, but only up to a maximum of N commits, where N is hard-coded
96to 20 as of May 2 2022.
97
Joe Gregorio9b5ffb22023-04-20 11:29:29 -040098#### Single
Eric Boren23a71722022-05-02 10:50:19 -040099
Joe Gregorio9b5ffb22023-04-20 11:29:29 -0400100The roller will only roll a single commit at a time. This can be useful for
101keeping blamelists clear, but it has some drawbacks. If the commit queue is not
Eric Boren23a71722022-05-02 10:50:19 -0400102fast enough to keep up with the commit rate of the child project, the roller
Joe Gregorio9b5ffb22023-04-20 11:29:29 -0400103will lag behind. If a particular commit breaks the commit queue, the roller may
Eric Boren23a71722022-05-02 10:50:19 -0400104get stuck, since it won't automatically include the fix or revert in the rolls.
105Therefore, this strategy may require occasional manual intervention.
106
Joe Gregorio9b5ffb22023-04-20 11:29:29 -0400107## For Skia Infra Team Members
Eric Borene1bea252016-10-19 09:36:13 -0400108
Mike Frysinger810ad2b2022-08-22 13:55:33 -0400109See [PROD.md](./PROD.md) for information about handling alerts.