Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 1 | = Gerrit Code Review - Attention Set |
| 2 | |
Ben Rohlfs | d8192cc | 2020-07-30 09:06:55 +0200 | [diff] [blame] | 3 | Report a bug or send feedback using |
| 4 | link:https://bugs.chromium.org/p/gerrit/issues/entry?template=Attention+Set[this Monorail template]. |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 5 | You can also report a bug through the bug icon in the user hovercard and in the |
| 6 | reply dialog. |
Ben Rohlfs | d8192cc | 2020-07-30 09:06:55 +0200 | [diff] [blame] | 7 | |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 8 | [[whose-turn]] |
| 9 | == Whose turn is it? |
| 10 | |
| 11 | Code Review is a turn-based workflow going back and forth between the change |
| 12 | owner and reviewers. For every change Gerrit maintains an "Attention Set" with |
| 13 | users that are currently expected to act on the change. Both on the dashboard |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 14 | and on the change page, this is expressed by an arrow icon before a (bolded) |
| 15 | user name: |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 16 | |
| 17 | image::images/user-attention-set-icon.png["account chip with attention icon", align="center"] |
| 18 | |
| 19 | While the attention set brings clarity to the process it also comes with |
| 20 | responsibilities and expectations. To provide the best outcome for all users, we |
| 21 | suggest following these principles: |
| 22 | |
| 23 | * Reviewers are expected to respond in a timely manner when it is their turn. If |
| 24 | you don't plan to respond within ~24h, then you should either remove yourself |
| 25 | from the attention set or you should at least send a clarification message to |
| 26 | the change owner. |
| 27 | * Change owners are expected to manage the attention set of their changes |
| 28 | carefully. They should make sure that reviewers are only in the attention set |
| 29 | when the owner waits for a response from them. |
| 30 | |
| 31 | On the plus side you can strictly ignore everyone else's changes, if you are not |
| 32 | in the attention set. :-) |
| 33 | |
Ben Rohlfs | 281279d | 2020-07-27 09:04:02 +0200 | [diff] [blame] | 34 | === Rules |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 35 | |
| 36 | To help with the back and forth, Gerrit applies some basic automated rules for |
| 37 | changing the attention set: |
| 38 | |
| 39 | * If reviewers are added to a change, then they are added to the attention set. |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 40 | * Exception: A reviewer adding themselves along with a comment or vote. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 41 | * If an active change is submitted, abandoned or reset to "work in progress", |
| 42 | then all users are removed from the attention set. |
| 43 | * Replying (commenting, voting or just writing a change message) removes the |
Ben Rohlfs | d8192cc | 2020-07-30 09:06:55 +0200 | [diff] [blame] | 44 | replying user from the attention set. And it adds all participants of comment |
| 45 | conversations that the user is replying to. |
| 46 | * If a *reviewer* replies, then the change owner (and uploader) are added to the |
| 47 | attention set. |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 48 | * For merged and abandoned changes the owner is added only when a human creates |
| 49 | an unresolved comment. |
Gal Paikin | 6ce56dc | 2021-03-29 12:28:43 +0200 | [diff] [blame] | 50 | * If another user removed a user's vote, the user with the deleted vote will be |
| 51 | added to the attention set. |
Ben Rohlfs | d8192cc | 2020-07-30 09:06:55 +0200 | [diff] [blame] | 52 | * Only owner, uploader, reviewers and ccs can be in the attention set. |
Gal Paikin | 1a81645 | 2021-03-11 12:40:23 +0100 | [diff] [blame] | 53 | * The rules for service accounts are different, see link:#bots[Bots]. |
Gal Paikin | 102f6d8 | 2021-04-13 15:21:51 +0200 | [diff] [blame] | 54 | * Users are not added by automatic rules when the change is work in progress. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 55 | |
| 56 | *!IMPORTANT!* These rules are not meant to be super smart and to always do the |
| 57 | right thing, e.g. if the change owner sends a reply, then they are often |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 58 | expected to individually select whose turn it is. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 59 | |
| 60 | Note that just uploading a new patchset is not a relevant event for the |
| 61 | attention set to change. |
| 62 | |
Ben Rohlfs | 281279d | 2020-07-27 09:04:02 +0200 | [diff] [blame] | 63 | === Interaction |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 64 | |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 65 | There are three ways to interact with the attention set: The attention icon, |
| 66 | the hovercard of owner and reviewer chips and the "Reply" dialog. |
| 67 | |
| 68 | *The attention icon* can be used to quickly remove yourself (or someone else) |
| 69 | from the attention set. Just click the icon, and it will disappear: |
| 70 | |
| 71 | image::images/user-attention-set-icon-click.png["attention set icon with tooltip", align="center"] |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 72 | |
| 73 | *The hovercard* (on both the Dashboard and Change page) contains information |
| 74 | about whether, why and when a user was added to the attention set. It also |
| 75 | contains an action for adding/removing the user to/from the attention set. |
| 76 | |
| 77 | image::images/user-attention-set-hovercard.png["user hovercard with info and action", align="center"] |
| 78 | |
| 79 | *The reply dialog* contains a section for controlling to whom the turn should be |
| 80 | passed. |
| 81 | |
| 82 | image::images/user-attention-set-reply-modify.png["reply dialog section for modifying", align="center"] |
| 83 | |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 84 | If you click "MODIFY", then the section will |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 85 | expand and you can select and de-select users by clicking on their chips. |
| 86 | Whatever you select here will be the new state of the attention set for this |
| 87 | change. As a change owner make sure to remove reviewers that you don't expect to |
| 88 | take action. |
| 89 | |
| 90 | image::images/user-attention-set-reply-select.png["reply dialog section for selecting users", align="center"] |
| 91 | |
Gal Paikin | 1a81645 | 2021-03-11 12:40:23 +0100 | [diff] [blame] | 92 | === Bots [[bots]] |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 93 | |
| 94 | The attention set is meant for human reviews only. Triggering bots and reacting |
| 95 | to their results is a different workflow and not in scope of the attenion set. |
Patrick Hiesel | e587c40 | 2020-08-07 16:11:29 +0200 | [diff] [blame] | 96 | Thus members of the "Service Users" group will never be added to the |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 97 | attention set. And replies by such users will only add the change owner (and |
| 98 | uploader) to the attention set, if it comes along with a negative vote. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 99 | |
Ben Rohlfs | 281279d | 2020-07-27 09:04:02 +0200 | [diff] [blame] | 100 | === Dashboard |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 101 | |
| 102 | The default *dashboard* contains a new section at the top called "Your Turn". It |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 103 | lists all changes where the logged-in user is in the attention set. When you are |
| 104 | a reviewer, the change is highlighted and is shown at the top of the section. |
| 105 | The "Waiting" column indicates how long the owner has already been waiting for |
| 106 | you to act. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 107 | |
| 108 | image::images/user-attention-set-dashboard.png["dashboard with Your Turn section", align="center"] |
| 109 | |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 110 | As an active developer, one of your daily goals will be to iterate over this |
| 111 | list and clear it. |
Ben Rohlfs | e69d1fc | 2020-08-28 12:44:59 +0200 | [diff] [blame] | 112 | |
| 113 | image::images/user-attention-set-dashboard-empty.png["dashboard with empty Your Turn section", align="center"] |
| 114 | |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 115 | Note that you can also navigate to other users' dashboards to check their |
| 116 | "Your Turn" section. |
| 117 | |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 118 | === Emails |
| 119 | |
| 120 | Every email begins with `Attention is currently required from: ...`, so you can |
| 121 | identify at a glance whether you are expected to act. |
| 122 | |
| 123 | You can even change your email notification preferences in the user settings to |
| 124 | only receive emails when you are in the attention set of a change: |
| 125 | |
| 126 | image::images/user-attention-set-user-prefs.png["user preference for email notifications", align="center"] |
| 127 | |
| 128 | If you prefer setting up customized filters in your mail client, then you can |
| 129 | make use of the `Gerrit-Attention:` footer lines that are added for every user |
| 130 | in the attention set, e.g. |
| 131 | |
| 132 | ---- |
| 133 | Gerrit-Attention: Marian Harbach <mharbach@google.com> |
| 134 | ---- |
| 135 | |
Ben Rohlfs | 281279d | 2020-07-27 09:04:02 +0200 | [diff] [blame] | 136 | === Assignee |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 137 | |
| 138 | While the "Assignee" feature can still be used together with the attention set, |
| 139 | we do not recommend doing so. Using both features is likely confusing. The |
| 140 | distinct feature of the "Assignee" compared to the attention set is that only |
| 141 | one user can be the assignee at the same time. So the assignee can be used to |
| 142 | single out one person or escalate, if there are multiple reviewers. Since |
| 143 | *every* reviewer in the attention set is expected to take action, singling out |
| 144 | is not likely to be important and also still achievable with the attention set. |
| 145 | Otherwise "Assignee" and "Attention Set" are very much overlapping, so we |
| 146 | recommend to only use one of them. |
| 147 | |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 148 | If you don't expect action from reviewers, then consider adding them to CC |
| 149 | instead. |
| 150 | |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 151 | The "Assignee" feature can be turned on/off with the |
David Ostrovsky | 8fd931d | 2021-04-30 15:45:00 +0200 | [diff] [blame] | 152 | link:config-gerrit.html#change.enableAssignee[enableAssignee] config option. |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 153 | |
Ben Rohlfs | 281279d | 2020-07-27 09:04:02 +0200 | [diff] [blame] | 154 | === Bold Changes / Mark Reviewed |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 155 | |
| 156 | Before the attention set feature, changes were bolded in the dashboard when |
| 157 | *something* happened and you could explicitly "mark a change reviewed" on the |
| 158 | change page. This former way of keeping track of what you should look at has |
| 159 | been replaced by the attention set. |
| 160 | |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 161 | === For Gerrit Admins |
| 162 | |
Jan Kundrát | ecbde33 | 2021-01-01 20:40:36 +0100 | [diff] [blame] | 163 | The Attention Set has been available since the 3.3 release (late 2020). It |
Ben Rohlfs | 848ad1a | 2020-10-28 09:14:10 +0100 | [diff] [blame] | 164 | is enabled by default, but you can disable it by setting |
| 165 | link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet] to false. |
Ben Rohlfs | f6e338a | 2020-10-16 12:06:28 +0200 | [diff] [blame] | 166 | |
Antoine Musso | c81f668 | 2020-12-22 12:01:53 +0100 | [diff] [blame] | 167 | As part of Gerrit 3.3 upgrade, the user group "Non-Interactive Users" is |
| 168 | renamed "Service Users". For a new installation, the group is automatically |
| 169 | created upon initialization. |
| 170 | |
Gal Paikin | 8f3229d | 2020-10-20 16:36:39 +0300 | [diff] [blame] | 171 | === Important note for all host owners, project owners, and bot owners |
| 172 | |
| 173 | If you are a host/project owner, please make sure all bots that run against your |
Antoine Musso | c81f668 | 2020-12-22 12:01:53 +0100 | [diff] [blame] | 174 | host/project are part of the link:access-control.html#service_users[Service Users] group. |
Gal Paikin | 8f3229d | 2020-10-20 16:36:39 +0300 | [diff] [blame] | 175 | |
| 176 | If you are a bot owner, please make sure your bot is part of the "Service Users" |
| 177 | group on all hosts it runs on. |
| 178 | |
| 179 | To add users to the "Service Users" group, first ensure that the group exists on |
| 180 | your host. If it doesn't, create it. The name must exactly be "Service Users". |
| 181 | |
| 182 | To create a group, use the Gerrit UI; BROWSE -> Groups -> CREATE NEW. |
| 183 | |
| 184 | Then, add the bots as members in this group. Alternatively, add an existing |
| 185 | group that has multiple bots as a subgroup of "Service Users". |
| 186 | |
| 187 | To add members or subgroups, use the Gerrit UI; BROWSE -> Groups -> |
| 188 | search for "Service Users" -> Members. |
| 189 | |
Ben Rohlfs | b5f82ee | 2020-07-22 17:15:58 +0200 | [diff] [blame] | 190 | GERRIT |
| 191 | ------ |
| 192 | Part of link:index.html[Gerrit Code Review] |
| 193 | |
| 194 | SEARCHBOX |
| 195 | --------- |