Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 1 | # AutoRoll |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 2 | |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 3 | AutoRoll is a program which creates and manages DEPS rolls of a child project, |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 4 | eg. Skia, into a parent project, eg. Chrome. |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 5 | |
Eric Boren | f092822 | 2023-05-10 17:36:31 +0000 | [diff] [blame] | 6 | ## Requests and Bug Reports |
| 7 | |
| 8 | To request a new roller, visit |
Eric Boren | dadef8a | 2024-11-04 16:50:40 +0000 | [diff] [blame] | 9 | https://issues.skia.org/issues/new?component=1389291&template=1850622. For all |
Eric Boren | f092822 | 2023-05-10 17:36:31 +0000 | [diff] [blame] | 10 | other autoroll-related bugs and requests, please use |
Eric Boren | dadef8a | 2024-11-04 16:50:40 +0000 | [diff] [blame] | 11 | https://issues.skia.org/issues/new?component=1389291&template=1850466. |
Eric Boren | f092822 | 2023-05-10 17:36:31 +0000 | [diff] [blame] | 12 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 13 | ## For Gardeners of Parent Projects |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 14 | |
| 15 | If a roll has caused a breakage, feel free to revert first and ask questions |
| 16 | later. Generally you should stop the roller first, otherwise rolls will continue |
| 17 | to land and compound the problem. The controls for the roller should be linked |
| 18 | in the roll commit message. It is polite and good practice to directly contact |
| 19 | someone on that team which owns the roller and work with them as needed to get |
| 20 | the rolls going again. |
| 21 | |
| 22 | If a roller has gone rogue somehow, eg. uploading too many rolls, chewing up bot |
| 23 | capacity, etc, please stop the roller and file a bug: |
Josip Sokcevic | 1200a17 | 2023-10-06 14:07:20 -0700 | [diff] [blame] | 24 | https://issues.skia.org/issues/new?component=1389291&template=1850622 |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 25 | If you need immediate attention, contact skiabot@google.com. Note that we do not |
Eric Boren | 3a28d38 | 2022-05-17 09:41:44 -0400 | [diff] [blame] | 26 | use pagers, and our gardener is generally only active during working hours. |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 27 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 28 | ## For Child Project Roller Owners |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 29 | |
| 30 | In the case of any problems or unexpected behavior, please stop the roller and |
| 31 | file a bug: |
Josip Sokcevic | 1200a17 | 2023-10-06 14:07:20 -0700 | [diff] [blame] | 32 | https://issues.skia.org/issues/new?component=1389291&template=1850622 |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 33 | If you need immediate attention, contact skiabot@google.com. Note that we do not |
Eric Boren | 3a28d38 | 2022-05-17 09:41:44 -0400 | [diff] [blame] | 34 | use pagers, and our gardener is generally only active during working hours. |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 35 | |
| 36 | If rolls are failing due to a breakage in the parent repo, you generally do not |
| 37 | need to stop the roller unless you are concerned about saving commit queue |
| 38 | capacity. If rolls are failing due to a broken commit in the child repo, use |
| 39 | your judgment as to whether to stop the roller; it isn't strictly required, |
| 40 | since the roller will continue to retry as new commits land, but it does save |
| 41 | commit queue capacity if you know that the rolls are doomed to fail until a fix |
| 42 | or revert lands. |
| 43 | |
| 44 | Stopping a roller causes any active roll to be abandoned. You can take advantage |
| 45 | of this behavior if you know that the current roll is doomed to fail and the |
| 46 | next will contain a fix: rather than waiting for the commit queue to fail, stop |
| 47 | the roller, wait for the current roll to be abandoned, and resume the roller. |
| 48 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 49 | ## Configuration |
Eric Boren | 3a28d38 | 2022-05-17 09:41:44 -0400 | [diff] [blame] | 50 | |
| 51 | Configuration files for each of the autorollers may be found |
| 52 | [here](https://skia.googlesource.com/skia-autoroll-internal-config) (Googlers |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 53 | only). Feel free to make a CL to modify a roller config, or |
Josip Sokcevic | 1200a17 | 2023-10-06 14:07:20 -0700 | [diff] [blame] | 54 | [file a bug](https://issues.skia.org/issues/new?component=1389291&template=1850622) |
Eric Boren | 3a28d38 | 2022-05-17 09:41:44 -0400 | [diff] [blame] | 55 | to request a change. |
| 56 | |
Kevin Lubick | a88cfda | 2023-05-26 09:45:05 -0400 | [diff] [blame] | 57 | The text proto which governs configuration can be read [here](https://skia.googlesource.com/buildbot/+/refs/heads/main/autoroll/go/config/config.proto). |
| 58 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 59 | ## AutoRoll Modes |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 60 | |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 61 | There are three modes in which the roller may run: |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 62 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 63 | #### Running |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 64 | |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 65 | This is the "normal" mode. The roller will upload DEPS roll CLs, close those |
| 66 | which fail, and upload new CLs until the child repo is up-to-date in the parent |
| 67 | repo's DEPS. |
borenet | 3e8cd1a | 2015-10-20 07:43:55 -0700 | [diff] [blame] | 68 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 69 | #### Stopped |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 70 | |
Eric Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 71 | The roller will not upload any CLs. Any in-progress roll CL will be closed when |
| 72 | the roller is stopped. |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 73 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 74 | #### Dry Run |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 75 | |
| 76 | The roller will upload CLs and run the commit queue dry run. If the |
| 77 | dry 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 Boren | 8ac38d7 | 2019-08-26 10:18:48 -0400 | [diff] [blame] | 79 | or more commits lands in the child repo, in which case the roller closes the |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 80 | CL and uploads a new one. |
| 81 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 82 | ## AutoRoll Strategies |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 83 | |
| 84 | There are three strategies which the roller may use to choose the next revision |
| 85 | to roll: |
| 86 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 87 | #### Batch |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 88 | |
| 89 | Using this strategy, the roller always chooses the most recent revision to roll, |
| 90 | potentially resulting in large batches of commits in each roll. |
| 91 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 92 | #### N-Batch |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 93 | |
| 94 | Similar to the "batch" strategy, the roller will upload rolls containing |
| 95 | multiple commits, but only up to a maximum of N commits, where N is hard-coded |
| 96 | to 20 as of May 2 2022. |
| 97 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 98 | #### Single |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 99 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 100 | The roller will only roll a single commit at a time. This can be useful for |
| 101 | keeping blamelists clear, but it has some drawbacks. If the commit queue is not |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 102 | fast enough to keep up with the commit rate of the child project, the roller |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 103 | will lag behind. If a particular commit breaks the commit queue, the roller may |
Eric Boren | 23a7172 | 2022-05-02 10:50:19 -0400 | [diff] [blame] | 104 | get stuck, since it won't automatically include the fix or revert in the rolls. |
| 105 | Therefore, this strategy may require occasional manual intervention. |
| 106 | |
Joe Gregorio | 9b5ffb2 | 2023-04-20 11:29:29 -0400 | [diff] [blame] | 107 | ## For Skia Infra Team Members |
Eric Boren | e1bea25 | 2016-10-19 09:36:13 -0400 | [diff] [blame] | 108 | |
Mike Frysinger | 810ad2b | 2022-08-22 13:55:33 -0400 | [diff] [blame] | 109 | See [PROD.md](./PROD.md) for information about handling alerts. |