780 Commits

Author SHA1 Message Date
Han-Wen Nienhuys
277e1a9cbc Merge "Bump asm to version 7.2" 2019-12-18 12:59:13 +00:00
David Ostrovsky
6e56ee257d Bump jetty version to 9.4.24.v20191120
Change-Id: I71d88128f3e5b744d2f5515ed9b394ab943c1f0e
2019-12-12 20:48:25 -08:00
David Ostrovsky
3e33194bd7 Bump asm to version 7.2
Change-Id: Idb26a30811879dd7c38ad4ba85054ed98164f0f7
2019-12-11 11:36:01 -08:00
David Pursehouse
4113e4f86c Merge branch 'stable-3.1'
* stable-3.1:
  Update replication plugin to get fixes for CI flakiness
  Use consistent capitalization for term NoteDb in documentation
  Hide refs/meta/config on git protocol v2
  GitProtocolV2IT: Split git client version check to a separate method
  CreateTag: Trim revision that is provided in input
  CreateTag: Allow revision in input to be empty
  RefUtil#parseBaseRevision: Do not log an error if baseRevision is invalid
  InvalidRevisionException: Include invalid revision into message
  CreateBranch: Trim revision that is provided in input
  CreateBranch: Allow revision in input to be empty
  CreateBranchIT: Add tests that set revision in the input
  Upgrade gitiles blame-cache to 0.2-7.1
  GitProtocolV2IT: Fail if git client is too old to support v2
  Document how to backup Gerrit
  Update rules_closure to latest version

Change-Id: Ic2efebe3a1379f5c7c642b152b4fec78e1cbcb47
2019-12-07 21:07:53 +09:00
David Pursehouse
97e2a12000 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Use consistent capitalization for term NoteDb in documentation
  Document how to backup Gerrit
  Update rules_closure to latest version

Change-Id: I91e82cc4cbf8336ca5c9b47fcb380dfacae6a57f
2019-12-07 09:20:20 +09:00
David Pursehouse
0e3b7bcb9c Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Use consistent capitalization for term NoteDb in documentation
  Document how to backup Gerrit
  Update rules_closure to latest version

Change-Id: I4847dcda27466ece557641e9c579fcf70f7f88c1
2019-12-07 09:19:37 +09:00
Edwin Kempin
0051dc987c Merge "Update rules_closure to latest version" into stable-2.16 2019-12-06 13:43:58 +00:00
David Pursehouse
9a5061212f Upgrade gitiles blame-cache to 0.2-7.1
Version 0.2-7 is quite old and does not include fixes that have
since been included in versions up to the latest 0.2-11 and on the
stable-0.2 branch.

We cannot upgrade directly to 0.2-11 because that also includes updates
to JGit and soy which are not compatible with core Gerrit's 2.16 series.
Hence, 0.2-7.1 has been released which includes all of the bug fixes
and improvements, but not the library upgrades

Change-Id: If208520b23f0b16d97d716ee2da85d98974ab440
2019-12-06 08:58:44 +09:00
David Pursehouse
cefe82afc5 Merge branch 'stable-3.1'
* stable-3.1:
  ElasticV6QueryChangesTest: Align with changes done in V7
  Update git submodules
  Update git submodules
  ElasticV6QueryChangesTest: Close indices after test
  Update git submodules
  Switch PatchListCache to using legacy cache backend
  Replace guava caches with caffeine
  Fix undefined branch in create-destination-dialog
  Add support for Elasticsearch version 7.5.*

Change-Id: I436f3a67ce12ed618b48c30b02af5028b822d767
2019-12-04 19:33:48 +09:00
David Pursehouse
0f15c89195 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Switch PatchListCache to using legacy cache backend
  Replace guava caches with caffeine

Change-Id: If7ac2b18f61ed95dd365ab2690280003ff83e838
2019-12-04 19:21:47 +09:00
David Pursehouse
791d19e0f4 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Switch PatchListCache to using legacy cache backend
  Replace guava caches with caffeine

Add caffeine and caffeine-guava to Documentation/licenses.txt
which did not exist on earlier branches.

Change-Id: I40fb2798a8b6eda2e92e4409c1e57042a8e59ef4
2019-12-04 18:26:21 +09:00
David Ostrovsky
d18a85e195 Update rules_closure to latest version
Change-Id: Ifae9462251bea0b3fd683452f16572572d4a7cea
2019-12-03 21:30:04 -08:00
David Ostrovsky
06c86046fe Replace guava caches with caffeine
Replacing Guava caches with Caffeine reduces the chances of having the
deadlocks and improves the cache performance.

This was already attempted in: I8d2b17a94d0, but got reverted in:
If65560b4a9b due to recursion in PatchListLoader. This recursion issue
is present on current master. While this change replaces all caches
with Caffeine backend, the follow-up change in this series will switch
back to using Guava backend for PatchListCache implementation.

For seamless integration, the caffeine-guava adapter library is used.
Given that the final artifact for the adapter is also called guava,
there is only the version number that differentiates that artifact from
the guava library itself so that we have a danger for naming collision.
To avoid potential naming collision risk, rename the library name to
caffeine-guava.jar during the fetch from Maven Central.

Alternatives considered is not to use the caffeine-guava adapter
library. But then the Cache and LoadingCache classes and friends would
change the package name from com.google.common.cache package to
com.github.benmanes.caffeine.cache package and this change would also
affect some gerrit plugins and thus considered to be a quite intrusive
change.  Still we can consider to do this change in one of the future
gerrit releases.

Bug: Issue 7645
Bug: Issue 11484
Change-Id: I6af4c15d6c15f438becd62409b7d233c309be8de
(cherry picked from commit 0050a9b5f61da67a9f33fda0bb170f8b1df6080a)
2019-12-04 01:19:23 +01:00
David Pursehouse
d772e2c859 Merge branch 'stable-3.1'
* stable-3.1:
  CommentsIT#postCommentsUnreachableData: Remove unnecessary setApiUser call
  ChangeDraftUpdate: Remove unused local variable
  Fix deletion of draft comment refs
  Upgrade testcontainers to 1.12.4
  Fix loading font-roboto-local in the ui
  ExternalIdCacheLoader: suppress warning if cache is not persisted.
  ChangeEmail: add project to email headers
  OutgoingEmail: use consistently va.smtpRcptTo reference
  NotificationEmail: use MailHeader for 'Gerrit-Branch' footer name
  Update git submodules
  Update git submodules
  Update git submodules
  Fix "TypeError: groups is not iterable" in _disableAgreements
  Fix typos: Aggreements -> Agreements
  Upgrade gitiles-servlet and blame-cache to 0.3-7

Change-Id: I3640f489c25eebaa024fe8b6992adc5956d71547
2019-12-03 12:51:23 +09:00
David Pursehouse
c1d16336ba Upgrade gitiles-servlet and blame-cache to 0.3-7
Includes the following changes:

2e5f39b - Bump version to 0.3-7
2ab0f9f - Bump bazel version to 1.2.0
219a919 - Format Java files with google-java-format
e5a8b41 - Correct license for VisibilityChecker
c16518b - Correct license header for VisibilityCacheTest
9ca395d - VisibilityChecker: Remove topoSort argument
f0b1806 - VisibilityCache: Use jgit's ReachabilityChecker
284a35a - Accept first-parent parameter in LogServlet
11af49e - Upgrade JGit to 5.5.1.201910021850-r
beb12ac - Check BLOB content size before trying to render it

Notably this includes beb12ac which is the fix for [1], which
is a JVM crash when a large XML document is rendered.

[1] https://github.com/google/gitiles/issues/192

Change-Id: If837e84500d00b05659c1bbbbe39ce9c5879a4d8
2019-11-28 14:19:14 +00:00
David Pursehouse
fe1d3814ed Remove SSHD_VERS from WORKSPACE
The SSHD_VERS constant should have been moved to tools/nongoogle.bzl
in the merge from stable-3.0 (change I011ace795), but was left over
during conflict resolution.

Change-Id: Icfaaa6032841195d26f1d852adba56025faa11ea
2019-11-15 09:04:57 -08:00
David Ostrovsky
0050a9b5f6 Replace guava caches with caffeine
Replacing Guava caches with Caffeine reduces the chances of having the
deadlocks and improves the cache performance.

This was already attempted in: I8d2b17a94d0, but got reverted in:
If65560b4a9b due to recursion in PatchListLoader. This recursion issue
is present on current master. While this change replaces all caches
with Caffeine backend, the follow-up change in this series will switch
back to using Guava backend for PatchListCache implementation.

For seamless integration, the caffeine-guava adapter library is used.
Given that the final artifact for the adapter is also called guava,
there is only the version number that differentiates that artifact from
the guava library itself so that we have a danger for naming collision.
To avoid potential naming collision risk, rename the library name to
caffeine-guava.jar during the fetch from Maven Central.

Alternatives considered is not to use the caffeine-guava adapter
library. But then the Cache and LoadingCache classes and friends would
change the package name from com.google.common.cache package to
com.github.benmanes.caffeine.cache package and this change would also
affect some gerrit plugins and thus considered to be a quite intrusive
change.  Still we can consider to do this change in one of the future
gerrit releases.

Bug: Issue 7645
Bug: Issue 11484
Change-Id: I6af4c15d6c15f438becd62409b7d233c309be8de
2019-11-15 07:26:46 -08:00
David Pursehouse
69db64291f Merge branch 'stable-3.1'
* stable-3.1:
  Set version to 3.1.1-SNAPSHOT
  Set version to 3.1.0
  Upgrade JGit to latest master
  Upgrade gitiles-servlet and blame-cache to 0.3-6
  Add sshd-common to lib/nongoogle_test.sh
  Increase 'execution.defaultThreadPoolSize' default and min to 2
  Upgrade gitiles-servlet and blame-cache to 0.2-11
  Fix formatting of submission IDs
  LazyPostReceiveHookChain: Simplify check for pack size
  Update highlight.js
  ChangeNotesParser: Skip parsing meta data of deleted patch sets
  Add a --header-box-shadow theme css variable
  Don't allow "show 2 more" reviewers
  Bazel: Expedite the LC process
  Update Jgit to latest master revision
  Move tooltip to below the button for change detail actions
  LazyPostReceiveHookChain: Catch IllegalStateException on ReceivePack.getPackSize

Change-Id: I8e118de48a692ef60171d4f4d26f69bafb330c70
2019-11-15 00:27:29 -08:00
Patrick Hiesel
df70c64da1 Merge "Replace Jetty Continuation with AsyncContext" 2019-11-15 01:37:40 +00:00
David Pursehouse
214541a762 Upgrade gitiles-servlet and blame-cache to 0.3-6
Includes a fix in the blame cache. Test for this fix are on gerrit's
stable-3.0 branch and will be brought in by merge later.

Bug: Issue 5082
Change-Id: I56ce7e36e60b0fef413668b99f9da0d4dcbcd968
2019-11-14 15:06:27 -08:00
Nasser Grainawi
3b145b7c5c Replace Jetty Continuation with AsyncContext
Continuation is deprecated in Jetty 9.4 and removed in Jetty 10. Migrate
ProjectQoSFilter to use javax.servlet.AsyncContext instead.

Change-Id: I398fca0f75b675ad683a6d4c572ffb844c23e364
2019-11-14 14:11:41 -08:00
Edwin Kempin
59e3f0b6fa Upgrade gitiles-servlet and blame-cache to 0.2-11
If a file doesn't exist in a commit we expect the GetBlame REST endpoint
to return an empty BlameInfo list. This works well unless the file
existed once and had been deleted. E.g. if there is a change that
recreates a file and the user clicks on 'SHOW BLAME' on the diff screen
the request to get the blame info for the base commit fails with 500
Internal Server Error. For example the newly added
GetBlameIT#forRecreatedFileFromBase test was failing like this:

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2051)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4873)
	at com.google.gitiles.blame.cache.BlameCacheImpl.get(BlameCacheImpl.java:114)
	at com.google.gerrit.server.restapi.change.GetBlame.blame(GetBlame.java:145)
	at com.google.gerrit.server.restapi.change.GetBlame.apply(GetBlame.java:118)
	at com.google.gerrit.server.api.changes.FileApiImpl$2.get(FileApiImpl.java:149)
	at com.google.gerrit.acceptance.api.revision.GetBlameIT.forRecreatedFileFromBase(GetBlameIT.java:123)
        ...
Caused by: java.lang.NullPointerException
	at com.google.gitiles.blame.cache.BlameCacheImpl.loadRegions(BlameCacheImpl.java:156)
	at com.google.gitiles.blame.cache.BlameCacheImpl.loadBlame(BlameCacheImpl.java:139)
	at com.google.gitiles.blame.cache.BlameCacheImpl.lambda$newLoader$1(BlameCacheImpl.java:103)
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4878)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
	... 48 more

The updated version of blame-cache includes a fix for this.

Likely we want to have more tests for the GetBlame REST endpoint, but
adding those is outside the scope of this change.

Bug: Issue 5082
Change-Id: I11b529b48495e563148040dfb7f56379de13d128
Signed-off-by: Edwin Kempin <ekempin@google.com>
2019-11-14 11:29:10 -08:00
David Ostrovsky
764c5c5652 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Update highlight.js
  Bazel: Expedite the LC process

Change-Id: I011ace7956963534d4899618d27541236b308768
2019-11-14 11:25:07 -08:00
David Pursehouse
beba231e4e Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Update highlight.js
  Bazel: Expedite the LC process

Change-Id: Ieaed23c1254b6e43033fefc2e1fef4743a7421a6
2019-11-14 08:53:44 -08:00
David Ostrovsky
eba485b530 Bazel: Expedite the LC process
Move dependencies not used by Google to tools/nongoogle.bzl. Upgrading
the versions in tools/nongoogle.bzl file does not require LC-Vote.

Change-Id: Ib0dd147bd2611ac9ba282cfcaed5c412ab38e464
2019-11-13 16:40:58 -08:00
David Pursehouse
900833599c Merge branch 'stable-3.1'
* stable-3.1:
  Fix JSDoc comments for behaviors
  Use attribute binding for data-... attributes
  Fix missing HTML links
  Avoid browser caching for diff on edit patch
  MergeValidationListener: Include the change Id in onPreMerge
  Upgrade jackson-core to 2.10.1
  Add border between robot comment and action buttons

Change-Id: Ifdded7a4f552ea3222e178d15adc2f4febcde177
2019-11-12 14:59:53 -08:00
David Pursehouse
b226a69ba3 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Avoid browser caching for diff on edit patch
  MergeValidationListener: Include the change Id in onPreMerge
  Upgrade jackson-core to 2.10.1

Change-Id: Ie35736b6dcfd4f85c96f87d705e1257ea801a355
2019-11-12 14:13:04 -08:00
David Pursehouse
4504f514a0 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Avoid browser caching for diff on edit patch
  MergeValidationListener: Include the change Id in onPreMerge
  Upgrade jackson-core to 2.10.1

Change-Id: I1eb449cda2fa0d95029271f29a7b5c0e161edb97
2019-11-12 13:36:34 -08:00
David Pursehouse
8f5013449f Upgrade jackson-core to 2.10.1
Change-Id: I396450676605a8441c8140984f1d6c3b314b364a
2019-11-12 09:24:01 -08:00
Marco Miller
a27c66b3ca Merge branch 'stable-3.1'
* stable-3.1:
  Documentation: Fix word typo in Eclipse Setup page
  Update elasticsearch-rest-client to 7.4.2
  GetAccess: Access MetaDataUpdate.Factory via Provider
  ElasticContainer: Use 6.8.4 image for V6_8 tests
  SetParent: Access MetaDataUpdate.Factory via Provider
  PutDescription: Access MetaDataUpdate.Factory via Provider

Change-Id: I1523e9dec1fd0175bc6594f01e041de9fe2632d8
2019-11-01 20:35:21 -04:00
Marco Miller
424b0ebc90 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Documentation: Fix word typo in Eclipse Setup page
  Update elasticsearch-rest-client to 7.4.2
  GetAccess: Access MetaDataUpdate.Factory via Provider
  ElasticContainer: Use 6.8.4 image for V6_8 tests
  SetParent: Access MetaDataUpdate.Factory via Provider
  PutDescription: Access MetaDataUpdate.Factory via Provider

Change-Id: I58cf2bfc1e5841c015772b9131b72d0dc2574dd2
2019-11-01 16:53:14 -04:00
Marco Miller
cfdde57414 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Documentation: Fix word typo in Eclipse Setup page
  Update elasticsearch-rest-client to 7.4.2
  GetAccess: Access MetaDataUpdate.Factory via Provider
  ElasticContainer: Use 6.8.4 image for V6_8 tests
  SetParent: Access MetaDataUpdate.Factory via Provider
  PutDescription: Access MetaDataUpdate.Factory via Provider

Change-Id: I71423e5603f17fce9daf45c3a023ddd7dbc02d79
2019-11-01 13:45:25 -04:00
Marco Miller
ebe25fbae9 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Update elasticsearch-rest-client to 7.4.2
  ElasticContainer: Use 6.8.4 image for V6_8 tests

Change-Id: I8f76f205123bed5bd96cdfa5e339eee93dfab44a
2019-11-01 11:52:03 -04:00
David Pursehouse
e212914cd5 Update elasticsearch-rest-client to 7.4.2
Also use this version for the test image.

Change-Id: Id9fed03f8251861017f26791d5c59e0b7fa6af5a
2019-11-01 16:59:33 +09:00
David Pursehouse
450cf11087 Upgrade metrics-core to 4.1.1
Change-Id: I972629c5afb3cf2d490819bab5115725baf7fb24
2019-11-01 08:04:56 +09:00
David Pursehouse
68cd96e7e4 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  OutgoingEmail: Sanity check recipients of multipart and plaintext
  OutgoingEmail: Log when email is sent as multipart and plaintext
  OutgoingEmail: Log the reason that email is not being sent
  OutgoingEmail#send: Check first if email sending is enabled
  Upgrade jackson-core to 2.10.0

Change-Id: I51a03d657f0631b1913be10ff8cb7dafca42232b
2019-10-31 20:32:24 +09:00
David Pursehouse
f2b83b7df5 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Upgrade jackson-core to 2.10.0

Change-Id: I82da6eac1bd19ce23b19da8882b51d7d53043383
2019-10-31 20:31:42 +09:00
David Pursehouse
151830e94a Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Upgrade jackson-core to 2.10.0

Change-Id: Idd26b7175b51d37d67ec9a04a492ef184ea824b7
2019-10-31 20:30:56 +09:00
David Pursehouse
b81fc07574 Upgrade jackson-core to 2.10.0
Includes a fix for CVE-2019-12384 [1] that affects versions prior
to 2.9.9.1.

Note that so far we only use Jackson in the Elasticsearch integration
and we have a pending investigation of whether it's possible to remove
this dependency [2].

[1] https://nvd.nist.gov/vuln/detail/CVE-2019-12384
[2] https://bugs.chromium.org/p/gerrit/issues/detail?id=11641

Change-Id: I3fa5993ab2d010c0a4b5a249112678a6318e9852
2019-10-31 09:36:28 +09:00
David Pursehouse
eda796ef3b Upgrade metrics-core to 4.0.7
This is the latest stable release and includes several bug fixes.

Change-Id: I1740a327f25e2282ce4dd2c9aad86c7e4e7adeb6
2019-10-31 08:25:50 +09:00
David Ostrovsky
2baf248afa Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Bump Bazel version to 1.1.0

Change-Id: I7e0c8dcf2d88b95245d33a392a7f2d65ad92f86e
2019-10-30 16:40:39 +09:00
David Ostrovsky
653a623123 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Bump Bazel version to 1.1.0

Change-Id: Id02df8320a94b5a452c8a978a32881c4345d3509
2019-10-30 16:38:24 +09:00
David Ostrovsky
002ea27286 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Bump Bazel version to 1.1.0

Change-Id: I73da330919e42edc1ae23b919c40252ba4b95dd7
2019-10-30 16:36:34 +09:00
David Ostrovsky
52169c6d3c Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
  Bump Bazel version to 1.1.0

Change-Id: I4a4716d5d77167f6b524177de48933b16c4c9c5d
2019-10-30 07:24:13 +01:00
David Pursehouse
ba30ff7d36 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Upgrade testcontainers to 1.12.3
  Hide "HTTP Credentials" if auth is not HTTP or HTTP_LDAP

Change-Id: I825a51ac1fcba5a201eeacccfecfe15825e3f9ec
2019-10-29 16:44:29 +09:00
David Pursehouse
028328c96b Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Upgrade testcontainers to 1.12.3
  Hide "HTTP Credentials" if auth is not HTTP or HTTP_LDAP

Change-Id: I4aaec1fec13327c0800dc4d062c61f57ec9aac25
2019-10-29 16:43:58 +09:00
David Pursehouse
08f262def4 Merge branch 'stable-2.15' into stable-2.16
* stable-2.15:
  Upgrade testcontainers to 1.12.3
  Hide "HTTP Credentials" if auth is not HTTP or HTTP_LDAP

Change-Id: I83d7bb1b8c12f5ddcef6896092d4bfc84029716d
2019-10-29 16:43:09 +09:00
Marco Miller
47f1fb0018 Upgrade testcontainers to 1.12.3
Change-Id: I3f008ca18f198afd6da4bfa555487a978f02f6e5
2019-10-28 17:08:23 -04:00
David Pursehouse
0f72706713 Merge branch 'stable-3.0' into stable-3.1
* stable-3.0:
  Fix computing label extremes
  Upgrade elasticsearch-rest-client to 7.4.1

Change-Id: I6de47400e73e9749257fa50477a0fdf4ce931eca
2019-10-26 10:50:57 +09:00
David Pursehouse
b165bcf646 Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
  Fix computing label extremes
  Upgrade elasticsearch-rest-client to 7.4.1

Change-Id: I5af834a173406f15c586f2a5cd61a54e5e9e1b7c
2019-10-26 10:50:02 +09:00