Merge branch 'stable-3.3' into master
* stable-3.3: Add instructions to add bots to the "Service Users" group Update the attention set documentation Update git submodules Update git submodules Update git submodules Update git submodules Update git submodules ReceiveCommits: nit - closing bracket in usage String Update git submodules TestProjectCreation: add owners setting MigrateToNoteDb: add option to force state change with skipped project setNoteDbPrimary: update in chunks, one DB connection per chunk GC repositories regularly during noteDb migration NoteDbMigrator: set thread name to show project slice being processed NoteDbMigrator: shuffle slices to reduce concurrency on same repo NoteDbMigrator: Fix contention on single database connection MigrateToNoteDb: implement option --verbose NoteDbMigrator: log total progress of the migration every 1000 changes Use multiple threads per project to migrate changes to noteDb Update Jetty to 9.4.32.v20200930 Change-Id: Icc77edaefc99f0a51b66e073fd3600ad4b4dd1b9
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 89 KiB |
BIN
Documentation/images/user-attention-set-user-prefs.png
Normal file
After Width: | Height: | Size: 13 KiB |
@@ -1,10 +1,5 @@
|
||||
= Gerrit Code Review - Attention Set
|
||||
|
||||
The Attention Set will be part of the upcoming 3.3 release (due late 2020).
|
||||
We are testing at on some hosts on `googlesource.com` right now. If you build
|
||||
your Gerrit from master, you can enable it using
|
||||
link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet].
|
||||
|
||||
Report a bug or send feedback using
|
||||
link:https://bugs.chromium.org/p/gerrit/issues/entry?template=Attention+Set[this Monorail template].
|
||||
You can also report a bug through the bug icon in the user hovercard and in the
|
||||
@@ -16,7 +11,8 @@ reply dialog.
|
||||
Code Review is a turn-based workflow going back and forth between the change
|
||||
owner and reviewers. For every change Gerrit maintains an "Attention Set" with
|
||||
users that are currently expected to act on the change. Both on the dashboard
|
||||
and on the change page, this is expressed by an arrow icon before the user name:
|
||||
and on the change page, this is expressed by an arrow icon before a (bolded)
|
||||
user name:
|
||||
|
||||
image::images/user-attention-set-icon.png["account chip with attention icon", align="center"]
|
||||
|
||||
@@ -41,6 +37,7 @@ To help with the back and forth, Gerrit applies some basic automated rules for
|
||||
changing the attention set:
|
||||
|
||||
* If reviewers are added to a change, then they are added to the attention set.
|
||||
* Exception: A reviewer adding themselves along with a comment or vote.
|
||||
* If an active change is submitted, abandoned or reset to "work in progress",
|
||||
then all users are removed from the attention set.
|
||||
* Replying (commenting, voting or just writing a change message) removes the
|
||||
@@ -48,8 +45,8 @@ changing the attention set:
|
||||
conversations that the user is replying to.
|
||||
* If a *reviewer* replies, then the change owner (and uploader) are added to the
|
||||
attention set.
|
||||
* For merged and abandoned changes the owner is added when a new human comment
|
||||
is created.
|
||||
* For merged and abandoned changes the owner is added only when a human creates
|
||||
an unresolved comment.
|
||||
* Only owner, uploader, reviewers and ccs can be in the attention set.
|
||||
|
||||
*!IMPORTANT!* These rules are not meant to be super smart and to always do the
|
||||
@@ -99,18 +96,39 @@ uploader) to the attention set, if it comes along with a negative vote.
|
||||
=== Dashboard
|
||||
|
||||
The default *dashboard* contains a new section at the top called "Your Turn". It
|
||||
lists all changes where the logged-in user is in the attention set.
|
||||
lists all changes where the logged-in user is in the attention set. When you are
|
||||
a reviewer, the change is highlighted and is shown at the top of the section.
|
||||
The "Waiting" column indicates how long the owner has already been waiting for
|
||||
you to act.
|
||||
|
||||
image::images/user-attention-set-dashboard.png["dashboard with Your Turn section", align="center"]
|
||||
|
||||
As an active developer one of your daily goals will be to iterate over this list
|
||||
and clear it.
|
||||
As an active developer, one of your daily goals will be to iterate over this
|
||||
list and clear it.
|
||||
|
||||
image::images/user-attention-set-dashboard-empty.png["dashboard with empty Your Turn section", align="center"]
|
||||
|
||||
Note that you can also navigate to other users' dashboards to check their
|
||||
"Your Turn" section.
|
||||
|
||||
=== Emails
|
||||
|
||||
Every email begins with `Attention is currently required from: ...`, so you can
|
||||
identify at a glance whether you are expected to act.
|
||||
|
||||
You can even change your email notification preferences in the user settings to
|
||||
only receive emails when you are in the attention set of a change:
|
||||
|
||||
image::images/user-attention-set-user-prefs.png["user preference for email notifications", align="center"]
|
||||
|
||||
If you prefer setting up customized filters in your mail client, then you can
|
||||
make use of the `Gerrit-Attention:` footer lines that are added for every user
|
||||
in the attention set, e.g.
|
||||
|
||||
----
|
||||
Gerrit-Attention: Marian Harbach <mharbach@google.com>
|
||||
----
|
||||
|
||||
=== Assignee
|
||||
|
||||
While the "Assignee" feature can still be used together with the attention set,
|
||||
@@ -123,6 +141,9 @@ is not likely to be important and also still achievable with the attention set.
|
||||
Otherwise "Assignee" and "Attention Set" are very much overlapping, so we
|
||||
recommend to only use one of them.
|
||||
|
||||
If you don't expect action from reviewers, then consider adding them to CC
|
||||
instead.
|
||||
|
||||
The "Assignee" feature can be turned on/off with the
|
||||
link:config-gerrit.html#change.enableAttentionSet[enableAssignee] config option.
|
||||
|
||||
@@ -133,6 +154,32 @@ Before the attention set feature, changes were bolded in the dashboard when
|
||||
change page. This former way of keeping track of what you should look at has
|
||||
been replaced by the attention set.
|
||||
|
||||
=== For Gerrit Admins
|
||||
|
||||
The Attention Set will be part of the upcoming 3.3 release (due late 2020).
|
||||
We are testing it on `googlesource.com` right now. If you build your Gerrit from
|
||||
master, you can enable it using
|
||||
link:config-gerrit.html#change.enableAttentionSet[enableAttentionSet].
|
||||
|
||||
=== Important note for all host owners, project owners, and bot owners
|
||||
|
||||
If you are a host/project owner, please make sure all bots that run against your
|
||||
host/project are part of the "Service Users" group.
|
||||
|
||||
If you are a bot owner, please make sure your bot is part of the "Service Users"
|
||||
group on all hosts it runs on.
|
||||
|
||||
To add users to the "Service Users" group, first ensure that the group exists on
|
||||
your host. If it doesn't, create it. The name must exactly be "Service Users".
|
||||
|
||||
To create a group, use the Gerrit UI; BROWSE -> Groups -> CREATE NEW.
|
||||
|
||||
Then, add the bots as members in this group. Alternatively, add an existing
|
||||
group that has multiple bots as a subgroup of "Service Users".
|
||||
|
||||
To add members or subgroups, use the Gerrit UI; BROWSE -> Groups ->
|
||||
search for "Service Users" -> Members.
|
||||
|
||||
GERRIT
|
||||
------
|
||||
Part of link:index.html[Gerrit Code Review]
|
||||
|
16
WORKSPACE
@@ -907,48 +907,48 @@ maven_jar(
|
||||
sha1 = "7e060dd5b19431e6d198e91ff670644372f60fbd",
|
||||
)
|
||||
|
||||
JETTY_VERS = "9.4.30.v20200611"
|
||||
JETTY_VERS = "9.4.32.v20200930"
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-servlet",
|
||||
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VERS,
|
||||
sha1 = "ca3dea2cd34ee88cec017001603af0c9e74781d6",
|
||||
sha1 = "4253dd46c099e0bca4dd763fc1e10774e10de00a",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-security",
|
||||
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VERS,
|
||||
sha1 = "1a5261f6ad4081ad9e9bb01416d639931d391273",
|
||||
sha1 = "16a6110fa40e49050146de5f597ab3a3a3fa83b5",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-server",
|
||||
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VERS,
|
||||
sha1 = "e5ede3724d062717d0c04e4c77f74fe8115c2a6f",
|
||||
sha1 = "d2d89099be5237cf68254bc943a7d800d3ee1945",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-jmx",
|
||||
artifact = "org.eclipse.jetty:jetty-jmx:" + JETTY_VERS,
|
||||
sha1 = "653559eaec0f9a335a0d12e90bc764b28f341241",
|
||||
sha1 = "5e8e87a6f89b8eabf5b5b1765e3d758209001570",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-http",
|
||||
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VERS,
|
||||
sha1 = "cd6223382e4f82b9ea807d8cdb04a23e5d629f1c",
|
||||
sha1 = "5fdcefd82178d11f895690f4fe6e843be69394b3",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-io",
|
||||
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VERS,
|
||||
sha1 = "9c360d08e903b2dbd5d1f8e889a32046948628ce",
|
||||
sha1 = "0d0f32c3b511d6b3a542787f95ed229731588810",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
name = "jetty-util",
|
||||
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VERS,
|
||||
sha1 = "39ec6aa4745952077f5407cb1394d8ba2db88b13",
|
||||
sha1 = "efefd29006dcc9c9960a679263504287ce4e6896",
|
||||
)
|
||||
|
||||
maven_jar(
|
||||
|
@@ -96,7 +96,7 @@ public class ProjectOperationsImpl implements ProjectOperations {
|
||||
args.createEmptyCommit = projectCreation.createEmptyCommit().orElse(true);
|
||||
projectCreation.parent().ifPresent(p -> args.newParent = p);
|
||||
// ProjectCreator wants non-null owner IDs.
|
||||
args.ownerIds = new ArrayList<>();
|
||||
args.ownerIds = new ArrayList<>(projectCreation.owners());
|
||||
projectCreation.submitType().ifPresent(st -> args.submitType = st);
|
||||
projectCreator.createProject(args);
|
||||
return Project.nameKey(name);
|
||||
|
@@ -14,10 +14,13 @@
|
||||
|
||||
package com.google.gerrit.acceptance.testsuite.project;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.gerrit.acceptance.testsuite.ThrowingFunction;
|
||||
import com.google.gerrit.entities.AccountGroup;
|
||||
import com.google.gerrit.entities.Project;
|
||||
import com.google.gerrit.extensions.client.SubmitType;
|
||||
import java.util.Optional;
|
||||
@@ -39,6 +42,8 @@ public abstract class TestProjectCreation {
|
||||
|
||||
public abstract Optional<SubmitType> submitType();
|
||||
|
||||
public abstract ImmutableSet<AccountGroup.UUID> owners();
|
||||
|
||||
abstract ThrowingFunction<TestProjectCreation, Project.NameKey> projectCreator();
|
||||
|
||||
public static Builder builder(
|
||||
@@ -76,6 +81,13 @@ public abstract class TestProjectCreation {
|
||||
return createEmptyCommit(false);
|
||||
}
|
||||
|
||||
public TestProjectCreation.Builder addOwner(AccountGroup.UUID owner) {
|
||||
ownersBuilder().add(requireNonNull(owner, "owner"));
|
||||
return this;
|
||||
}
|
||||
|
||||
abstract ImmutableSet.Builder<AccountGroup.UUID> ownersBuilder();
|
||||
|
||||
abstract TestProjectCreation.Builder projectCreator(
|
||||
ThrowingFunction<TestProjectCreation, Project.NameKey> projectCreator);
|
||||
|
||||
|
@@ -1591,7 +1591,7 @@ class ReceiveCommits {
|
||||
name = "--label",
|
||||
aliases = {"-l"},
|
||||
metaVar = "LABEL+VALUE",
|
||||
usage = "label(s) to assign (defaults to +1 if no value provided")
|
||||
usage = "label(s) to assign (defaults to +1 if no value provided)")
|
||||
void addLabel(String token) throws CmdLineException {
|
||||
LabelVote v = LabelVote.parse(token);
|
||||
try {
|
||||
|
@@ -38,7 +38,9 @@ import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableListMultimap;
|
||||
import com.google.common.truth.Correspondence;
|
||||
import com.google.gerrit.acceptance.AbstractDaemonTest;
|
||||
import com.google.gerrit.acceptance.testsuite.group.GroupOperations;
|
||||
import com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.TestPermission;
|
||||
import com.google.gerrit.entities.AccountGroup;
|
||||
import com.google.gerrit.entities.Permission;
|
||||
import com.google.gerrit.entities.Project;
|
||||
import com.google.gerrit.entities.RefNames;
|
||||
@@ -57,6 +59,7 @@ import org.junit.Test;
|
||||
public class ProjectOperationsImplTest extends AbstractDaemonTest {
|
||||
|
||||
@Inject private ProjectOperations projectOperations;
|
||||
@Inject private GroupOperations groupsOperations;
|
||||
|
||||
@Test
|
||||
public void defaultName() throws Exception {
|
||||
@@ -121,6 +124,13 @@ public class ProjectOperationsImplTest extends AbstractDaemonTest {
|
||||
assertThat(head).isEqualTo(RefNames.REFS_CONFIG);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createWithOwners() throws Exception {
|
||||
AccountGroup.UUID uuid = groupsOperations.newGroup().create();
|
||||
Project.NameKey key = projectOperations.newProject().addOwner(uuid).create();
|
||||
assertPermissions(key, groupRef(uuid), "refs/*", false, Permission.OWNER);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getProjectConfig() throws Exception {
|
||||
Project.NameKey key = projectOperations.newProject().create();
|
||||
|