commit | 771df4361741688ed99a439fc3e0ba9fd4ac16d0 | [log] [tgz] |
---|---|---|
author | Jacek Centkowski <geminica.programs@gmail.com> | Tue Jun 20 09:19:07 2023 +0200 |
committer | Jacek Centkowski <geminica.programs@gmail.com> | Wed Jun 28 09:07:37 2023 +0200 |
tree | 485ecd6977f978c6623f32b349fea56a28dd6b0b | |
parent | 571fc7251a28d40195f9ba8009bf57b280f5b2cb [diff] |
Modify 'sanitizeMetricName' to avoid collisions At present there is a simple 'DropWizardMetricMaker.sanitizeMetricName' implementation that: * replaces the leading `/` with `_` * reduces the repeated `/` chars to a single `/` * removes the ending `/` * replaces not supported chars with `_` As a result collision between the sanitized metric names can be easily created e.g. `foo_bar` will collide with `foo+bar`. In order to avoid collisions keep the rules about slashes (they are needed anyway) and: * replace not supported chars with `_0x[HEX CODE]_` string (code is capitalized) * the replacement prefix `0x` is prepended with another replacement prefix As a result: `foo_bar` stays `foo_bar` `foo+bar` becomes `foo_0x2B_bar` `foo_0x2B_bar` becomes `foo_0x_0x2B_bar` and collision is no longer possible The replace algorithm was inspired by the work done in If11e6576eff (kudos to Dani). Bug: Issue 40015585 Release-Notes: Enhance metric name sanitize function to remove collision on '_' between metrics. Gerrit core metrics remain unchanged but plugins metrics could be affected. Change-Id: I6a5366fa0f1fd494006e2234565371d279e8a7f3
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.