* Update plugins/hooks from branch 'stable-2.14'
to 1955d81e0ce4909a491a8340a2365fe9971eed81
- Add README
Add a README.md file in the repository root with the same content as
the "About" page.
Gitiles will render the README by default when the project is viewed
on the googlesource site [1] and this will make the configuration
documentation and list of supported hooks more easily accessible for
users who have not installed the plugin yet in their Gerrit site.
[1] https://gerrit.googlesource.com/plugins/hooks
Change-Id: Ib2ecf818cbabaca8bfddf58e12cce99842a4f038
- Reword introduction in configuration documentation
Change-Id: I428167c7929a077386e281f4898e8f4693c315f2
- Fix formatting in configuration documentation
Change-Id: I7414451eea210df7cc3e4d865de5cc1286c7a4ef
- Improve the "about" page
Add a link to the git hooks documentation which gives more context
about what is "not supported". Add links to the configuration and
list of supported hooks.
Change-Id: Ica629c70334951124bce439a4672fa28b40a2d61
Google already shut down their OpenID service nearly 2 years ago.
Rewrite the documentation related to this in past tense.
Change-Id: I6691f42a198b014afb32ee718c3e88e300655c54
All the other example commands use ssh, so using ssh in this command
makes it consistent. Also, the http command was using the `/p/` URL
infix which is no longer needed.
Change-Id: Ie9ffb50fc5f565f1d7f293dcae106fb285d6553d
* Update plugins/replication from branch 'stable-2.14'
to 43d055591174640527f5dec3fc7df00a4aa55f02
- Document how to exclude projects from replication
Change-Id: I8a12011e28be44d600a3ed63eebe596560d73e5f
In order to migrate to Caffeine, the circular dependency between
diff_summary and diff caches needs to be removed. Guava is ok with this
circular dependency but Caffeine is not and goes into an infinite loop.
1.diff_summary.get(id=1234)
2.diff_summary_loader.get(id=1234)
3.diff.get(id=1234)
4.diff_loader.get(id=1234)
5.diff_summary.put(id=1234)->blocked because cache is waiting for step 2 to complete.
This circular dependency is not mandatory, values will be populated in
the diff_summary when explicitly requested.
Change-Id: I059741bd3f7229a8cf86ed13e5ce2fabfa54c6c8
Creating ErrorDialog from Throwable was already formatting error message
nicely because it is setting the css attribute 'whiteSpace' to 'pre'.
Creating ErrorDialog from an error message string was not setting this
css attribute resulting in line break being removed.
Fix this by making both use a private method to create error message
label. Also change the attribute from 'whiteSpace' to 'white-space'
which is the real name.
Change-Id: I5932c3d547b8ab232de2f866d0ad20d968804ee8
Subclasses of BaseCommand may not initialize argv field (e.g.
ScpCommand).
Recent change [1] uses argv field which may result in NPE.
This change will guard the code from such error.
[1]: https://gerrit-review.googlesource.com/c/gerrit/+/146191
Change-Id: I6dd3afa08fd696d25741b5bdec8530deac422261
Signed-off-by: Ardo Septama <aseptama@gmail.com>
When installing web-component-tester fails with the error:
"EACCES: permission denied, mkdir"
it can be fixed by adding the `--unsafe-perm=true --allow-root` options
as described in [1].
[1] https://github.com/npm/npm/issues/17268#issuecomment-310167614
Change-Id: I397d31209c019ebbe52bf24bd9e359d71863ffd7
This adds support for running chrome in headless mode.
Support for running firefox in headless mode should work but currently
doesn't.
Moreover, i've added browser option handling to wct [1].
[1] b8388d1a8d
Bug: Issue 8023
Change-Id: I47cd9cd69fc78739219223c74d7b2edf2f97d6c7
(cherry picked from commit f633e0dcacd5f6307ef77b3a40d642310e7e60ee)
Update the documentation to clarify that it is necessary to
replace the Change-Id when re-pushing a commit to the same
destination branch. Previously the documentation also implied
that this was necessary when pushing to a different branch.
Bug: Issue 8222
Change-Id: I4a7f87322c7117f34d2ea3a8be8eec4b38fa406a
The ref-updated event is fired by ReceiveCommits, so firing it in
ReplaceOp results in the same event being fired twice when a new
patch set is added to an existing change.
Bug: Issue 8053
Change-Id: I9b87f9b9ac039856868b98a5d6f1682def4611a3
If there is password in ssh command parameters, it will be logged by
Gerrit.
This patch introduce @SensitiveData annotation to mark parameters that
contain sensitive data and hide them from logger and audit.
Audit masking must be enabled at gerrit.config:
audit.maskSensitiveData=true
Change-Id: I1f0e8e91bf971ed58b2362f89ce9f02cd8fb2ec7
Signed-off-by: Ardo Septama <aseptama@gmail.com>
Until now we only had ProjectCache.remove(Project p) which requires a
project instance. This could be a problem when running Gerrit HA in
active/active mode and a project name has to be removed from the
project-list cache on the other node. The project may not exist at that
point in time (because it was just deleted) and trying to load a Project
instance would lead to an error which would prevent removing this
project's name from the project_list cache.
Change-Id: Ida124ea95bb2cb776adbf8bd4d2bb77c0bdbbeaa
Task name is otherwise set to the command line which in ReviewCommands
case can be a multi line string which leads to pretty unreadable and
bordering on unparseable "loglines" like:
[2018-01-10 09:59:17,619] [SSH gerrit review 12345,4 --message 'Build:
http://jenkins.company.com/job/JOB_NAME/job/identifier/182/ : UNSTABLE
http://jenkins.company.com/job/JOB_NAME/job/other/13677/ : SUCCESS'\
--verified -1 --code-review 0 (jenkins)] WARN <class> : <message>
Change-Id: I74a0ff062b38a1980c4781e8e79a368bf028c549
Command line is not the best task description for all commands. The
"review" command command line are f.i. more often than not multiline.
This allows sub command to override task description.
Change-Id: I2bc42010fa91e94ea079f0e759c8ab049a61f462
The + operator on dicts is deprecated and will be removed from future
version of Bazel.
Change-Id: I9f3db02f13c1c56c3afc4cc94b142513f0ae3908
(cherry picked from commit 4c8be85fcfc83582fad77684cff6044e828d4cb6)
Double-clickers are logging in twice because the form is submitted twice
and the server will handle both requests concurrently. This is not a big
issue but it becomes one when a user login in for the first time is a
double-clicker. Server will handle both requests concurrently resulting
in creating 2 accounts for the same user.
This change disables the form submission after the first submit.
Change-Id: Ida55e632618c72ab11e536854c654ed423a0f195
When a commit is pushed, Gerrit will auto close the corresponding change
if there is one. To do so, it will query all the open changes on the
same branch, iterate through them to find a change with same change-id
as the one in the pushed commit. During the iteration, the changes are
loaded from DB. If any of the open changes is deleted between the time
the query is executed and the time the change is loaded from DB, a
NoSuchChangeException was thrown preventing the auto close operation
from completing. The net result was commit merged in the repository but
its corresponding change status not transitioned to merged.
Change-Id: I2735686455eae3575fdeea74143a6cdd5ccff91e
The labels have been always laid out alphabetically due to the fact that
they're passed as a dict, which does not guarantee order across
different labels. For more details, please see the code change[1].
[1]: https://gerrit-review.googlesource.com/#/c/gerrit/+/60246/
Change-Id: I6726ff28dd8830499747296c112048b4892dca3e
If a plugin specifies Implementation-Vendor, adding it again in the
gerrit_plugin rule results in a duplicate entry and the following
warning at build time:
WARNING: Duplicate name in Manifest: Implementation-Vendor.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
This change is the same as done in bazlets project by David Ostrovsky.
Change-Id: Iac72c1d1dbe11877e4e2042d2e11c8966147d7a9
* Update plugins/hooks from branch 'stable-2.14'
to 5df9a9dfdf4b4028393208d4412cc2c1a95fef39
- Add documentation to help with debugging hook problems
A common problem for users of the plugin is that they are not sure
if their hooks are actually being executed, and what their output
is.
Such information is logged by the plugin, but only at debug level.
Add a section in the documentation showing how to enable the logging.
Change-Id: I6e040f958ce4503f5cc0468ebe09466914d4a7eb
- Document behavior of plugin regarding configuration changes
Change-Id: I6509349994fce8405086982ee0d58bd38292ad29
If createNewCommitForAllInTarget = true is configured a commit might
identify more than one change. When trying to close changes on push
in ReceiveCommits this is not taken under consideration, instead it
tries to close the change of the first patch set that matches the
revision.
This could result in not closing changes even though patch sets
of the changes have been pushed into target.
Bug: Issue 7827
Change-Id: I085cc7129291194ffcf3b465b4db3111105c0efe
Add the following information:
1. how many rows were migrated
2. how much time it took
3. what was migration speed (rows per/sec)
So that it is more consistent with Reindex operation output.
Change-Id: If49da15ed9806f2b0dd2e63911445a55785a5cfb
This removes leading and trailing whitespace from the email.
Change-Id: Ia2e70925572a07d7d5ed170a774894f2a5bf4543
Signed-off-by: Edwin Kempin <ekempin@google.com>
Since change I51a22a933e CreateEmail has 2 apply methods, one that is
used by Gerrit and another one that can be used by plugins that want to
create emails without permission checks. The input validation should
always be done. By moving it into the apply method that is also used by
plugins it is now always executed.
The check that rejects the email creation when the realm doesn't allow
to edit emails should stay in the first apply method (see change
Ic25f07e553).
Change-Id: I47307a9d133b78d4bb0ab67b7ce889c4f95abb54
Signed-off-by: Edwin Kempin <ekempin@google.com>
This allows for aggregating review-time if defined as the timespan
between when a change is created and when it is merged.
event.eventCreatedOn - event.change.createdOn
This metric is valuable to get some sense of how effective your
code-review strategy/practice is, which in turn allows you to get a
sense for how effective actions to improve review-time is.
Change-Id: I7344ea07dad70bac871dcca0051164af20b80682
Allow to request static or Documentation content with respect to CORS.
This change was inspired by [1] and [2]. It sets
Access-Control-Allow-Origin header to origin of the client if the
client's domain matches a regular expression defined in
'site.allowOriginRegex' or when 'site.allowOriginRegex' is empty
(assumption is that access to documentation is not restricted).
[1] https://gerrit-review.googlesource.com/c/gerrit/+/84191
[2] https://gerrit-review.googlesource.com/c/gitiles/+/84151
Change-Id: I0343ac1cdce9da10fea9bc207a4114e1596fbfab
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>