commit | f4f494800d33114ebb7cc84ef4d628874a937401 | [log] [tgz] |
---|---|---|
author | Youssef Elghareeb <ghareeb@google.com> | Wed Apr 26 18:02:33 2023 +0200 |
committer | Youssef Elghareeb <ghareeb@google.com> | Wed May 03 11:00:59 2023 +0200 |
tree | bc92b593b1df02913140a52f4a5afa973f52be66 | |
parent | ea9292caa67c13a48c8d69ce4a7fbd43bf790502 [diff] |
Add option to populate 'starred' field for change query requests We've recently moved the drafts and stars out of the change index (see change I36c1e2f5) after which the returned ChangeInfo(s) from the 'Query Changes' API always had the 'starred' field as null, since this field is no longer populated from the change index. We discovered this bug since the dashboard's data is populated from the change index. To reproduce: 1) Go to dashboard and star a change (press the star icon). 2) Refresh the page. The star is gone. Navigating to the change page after starring from dashboard shows the star icon correctly in the change page. This is because the change page is powered by the 'Get Change Detail' endpoint which does not use the index. To fix this, we add a change option to populate this field. This is done by opening the All-Users repo once, and doing a call to RefDatabase#exactRef(String... refs). Calls to #exactRef take microseconds, and since this operation is gated with a list change option (to be used by the gerrit dashboard), this operation should be performant. Google-Bug-Id: b/276296940 Release-Notes: Add option to populate 'starred' field for change queries Change-Id: Idc0cac3e3aa715d18ddc1696d7324d13bcf84ce1
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update && apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.