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