commit | 32a7f5fea30a2f7c4a60392ab5b0be63f7825e07 | [log] [tgz] |
---|---|---|
author | Patrick Hiesel <hiesel@google.com> | Thu Jan 27 14:09:55 2022 +0100 |
committer | Kaushik Lingarkar <kaushik.lingarkar@linaro.org> | Thu Aug 25 13:56:16 2022 -0700 |
tree | ec6c60f9137183c6aa2722f0c110be9af0f47d01 | |
parent | 822801743850e2efde209ede3ccb03df76ea04e2 [diff] |
Move permission filtering for All-Projects from ProjectState to ProjectConfig Certain permissions cannot be used in All-Projects and are filtered out before we evaluate them. This used to be done in ProjectState and was cached when that entity was cached. Now, we cache immutable data objects (mostly AutoValues) for better thread safety. When the ProjectCache was refactored, this logic was left in ProjectState. This means it has to be recomputed quite often when permissions are evaluated. A recent profile showed that we can save CPU time (hence request time) as well as heap if we cache the outcome of this filtering. This is what this commit does. Existing tests check that permissions that are not allowed on All-Projects (e.g. OWNERS on refs/*) are indeed not evaluated. Since this filtering depends on if a project is considered to be All-Projects or not, we have to invalidate the cache when the name of All-Projects changes. We document this fact. Release-Notes: Cache permission filtering for All-Projects Change-Id: I01e08e70bf36aaf4be522564286ab4a86e7681a3
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.